diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 324e99b53f..2d4d955576 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -14109,12 +14109,6 @@ parameters: count: 2 path: src/Plugins/Export/Helpers/Pdf.php - - - message: '#^Cannot cast mixed to string\.$#' - identifier: cast.string - count: 6 - path: src/Plugins/Export/Helpers/TableProperty.php - - message: '#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\.$#' identifier: foreach.nonIterable diff --git a/src/Plugins/Export/Helpers/TableProperty.php b/src/Plugins/Export/Helpers/TableProperty.php index 51e202c104..f10c4cd7ca 100644 --- a/src/Plugins/Export/Helpers/TableProperty.php +++ b/src/Plugins/Export/Helpers/TableProperty.php @@ -50,7 +50,7 @@ class TableProperty */ public string $ext; - /** @param mixed[] $row table row */ + /** @param list $row table row */ public function __construct(array $row) { $this->name = trim((string) $row[0]); diff --git a/tests/unit/Plugins/Export/Helpers/TablePropertyTest.php b/tests/unit/Plugins/Export/Helpers/TablePropertyTest.php index b8e7db3386..96f0d7dda4 100644 --- a/tests/unit/Plugins/Export/Helpers/TablePropertyTest.php +++ b/tests/unit/Plugins/Export/Helpers/TablePropertyTest.php @@ -21,7 +21,7 @@ class TablePropertyTest extends AbstractTestCase { parent::setUp(); - $row = [' name ', 'int ', true, ' PRI', '0', 'mysql']; + $row = [' name ', 'int ', 'YES', ' PRI', '0', 'mysql']; $this->object = new TableProperty($row); } @@ -41,7 +41,7 @@ class TablePropertyTest extends AbstractTestCase self::assertSame('int', $this->object->type); - self::assertEquals(1, $this->object->nullable); + self::assertEquals('YES', $this->object->nullable); self::assertSame('PRI', $this->object->key);