Fix invalid test

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
This commit is contained in:
Kamil Tekiela 2024-11-23 20:18:40 +00:00
parent 50123a39ac
commit b39fa91f40
3 changed files with 3 additions and 9 deletions

View File

@ -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

View File

@ -50,7 +50,7 @@ class TableProperty
*/
public string $ext;
/** @param mixed[] $row table row */
/** @param list<string|null> $row table row */
public function __construct(array $row)
{
$this->name = trim((string) $row[0]);

View File

@ -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);