Skip to content

Commit

Permalink
drop unnecessary list type
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Nov 15, 2024
1 parent 8438614 commit ce0cddc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/QueryReflection/BasePdoQueryReflector.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ abstract class BasePdoQueryReflector implements QueryReflector, RecordingReflect
protected const MAX_CACHE_SIZE = 50;

/**
* @var array<string, PDOException|list<ColumnMeta>|null>
* @var array<string, PDOException|array<ColumnMeta>|null>
*/
protected array $cache = [];

Expand All @@ -69,7 +69,7 @@ abstract class BasePdoQueryReflector implements QueryReflector, RecordingReflect
protected $stmt = null;

/**
* @var array<string, array<string, list<string>>>
* @var array<string, array<string, array<int, string>>>
*/
protected array $emulatedFlags = [];

Expand Down Expand Up @@ -138,7 +138,7 @@ public function getResultType(string $queryString, int $fetchType): ?Type
}

/**
* @return list<string>
* @return array<int, string>
*/
protected function emulateFlags(string $nativeType, string $tableName, string $columnName): array
{
Expand Down Expand Up @@ -175,7 +175,7 @@ public function getDatasource()
}

/**
* @return PDOException|list<ColumnMeta>|null
* @return PDOException|array<ColumnMeta>|null
*/
abstract protected function simulateQuery(string $queryString);

Expand Down
4 changes: 2 additions & 2 deletions src/QueryReflection/MysqliQueryReflector.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ final class MysqliQueryReflector implements QueryReflector, RecordingReflector
private const MAX_CACHE_SIZE = 50;

/**
* @var array<string, mysqli_sql_exception|list<object>|null>
* @var array<string, mysqli_sql_exception|array<object>|null>
*/
private array $cache = [];

Expand Down Expand Up @@ -131,7 +131,7 @@ public function setupDbaApi(?DbaApi $dbaApi): void
}

/**
* @return mysqli_sql_exception|list<object>|null
* @return mysqli_sql_exception|array<object>|null
*/
private function simulateQuery(string $queryString)
{
Expand Down
2 changes: 1 addition & 1 deletion src/QueryReflection/PdoMysqlQueryReflector.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function __construct(PDO $pdo)
}

/**
* @return PDOException|list<ColumnMeta>|null
* @return PDOException|array<ColumnMeta>|null
*/
protected function simulateQuery(string $queryString)
{
Expand Down
6 changes: 3 additions & 3 deletions src/QueryReflection/PdoPgSqlQueryReflector.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use function array_shift;

/**
* @phpstan-type PDOColumnMeta array{name: string, table?: string, native_type: string, len: int, flags: list<string>}
* @phpstan-type PDOColumnMeta array{name: string, table?: string, native_type: string, len: int, flags: array<int, string>}
*/
final class PdoPgSqlQueryReflector extends BasePdoQueryReflector
{
Expand All @@ -28,9 +28,9 @@ public function __construct(PDO $pdo)
}

/**
* @return PDOException|list<PDOColumnMeta>|null
* @return PDOException|array<PDOColumnMeta>|null
*/
protected function simulateQuery(string $queryString) // @phpstan-ignore-line
protected function simulateQuery(string $queryString)
{
if (\array_key_exists($queryString, $this->cache)) {
return $this->cache[$queryString];
Expand Down

0 comments on commit ce0cddc

Please sign in to comment.