From 3f3d7ed598c61f42c9b33e0c1eb6f3dd2266cedc Mon Sep 17 00:00:00 2001 From: Jacob Thomason Date: Tue, 7 Dec 2021 22:55:24 -0500 Subject: [PATCH] Removed phpstan ignores and resolved other phpstan issues --- src/Propel/Generator/Builder/DataModelBuilder.php | 8 +------- src/Propel/Runtime/Parser/CsvParser.php | 4 ++-- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/Propel/Generator/Builder/DataModelBuilder.php b/src/Propel/Generator/Builder/DataModelBuilder.php index faa5790421..d0519bc71b 100644 --- a/src/Propel/Generator/Builder/DataModelBuilder.php +++ b/src/Propel/Generator/Builder/DataModelBuilder.php @@ -450,16 +450,10 @@ public function setTable(Table $table) /** * Returns the current Table object. * - * @throws \BadMethodCallException - * * @return \Propel\Generator\Model\Table */ - public function getTable() + public function getTable(): Table { - if ($this->table === null) { - throw new BadMethodCallException('No $table set to return.'); - } - return $this->table; } diff --git a/src/Propel/Runtime/Parser/CsvParser.php b/src/Propel/Runtime/Parser/CsvParser.php index e428bb8bad..0a1df260af 100644 --- a/src/Propel/Runtime/Parser/CsvParser.php +++ b/src/Propel/Runtime/Parser/CsvParser.php @@ -234,10 +234,10 @@ public function toCSV($array, $isList = false, $includeHeading = true) */ public function toArray($data, $rootKey = null, $isList = false, $includeHeading = true) { - $rows = explode($this->lineTerminator, $data); // @phpstan-ignore-line + $rows = explode($this->lineTerminator, $data); if ($includeHeading) { $heading = array_shift($rows); - $keys = explode($this->delimiter, $heading); // @phpstan-ignore-line + $keys = explode($this->delimiter, $heading); } else { $keys = range(0, count($this->getColumns($rows[0])) - 1); }