Skip to content

Commit f9822fd

Browse files
authored
ignore error by identifier (#753)
* ignore error by identifier * Update PdoQueryReflector.php
1 parent f33136c commit f9822fd

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

src/DbSchema/SchemaHasherMysql.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function hashDb(): string
7878

7979
try {
8080
$result = $this->connection->query($query);
81-
if ($result instanceof \mysqli_result) { // @phpstan-ignore-line
81+
if ($result instanceof \mysqli_result) { // @phpstan-ignore instanceof.alwaysTrue
8282
$row = $result->fetch_assoc();
8383
$hash = $row['dbsignature'] ?? '';
8484
}

src/QueryReflection/PdoQueryReflector.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
* This class was kept for BC reasons.
1111
*
1212
* @deprecated use PdoMysqlQueryReflector instead
13+
* @phpstan-ignore class.extendsFinalByPhpDoc
1314
*/
14-
final class PdoQueryReflector extends PdoMysqlQueryReflector // @phpstan-ignore-line
15+
final class PdoQueryReflector extends PdoMysqlQueryReflector
1516
{
1617
public function __construct(PDO $pdo)
1718
{

src/QueryReflection/ReflectionCache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ private function readCachedRecords(bool $useReadLock): ?array
172172
throw new ShouldNotHappenException();
173173
}
174174

175-
return $this->typeSerializer->unserialize($cache['records']); // @phpstan-ignore-line
175+
return $this->typeSerializer->unserialize($cache['records']); // @phpstan-ignore argument.type
176176
}
177177

178178
public function persist(): void

src/TypeMapping/MysqliTypeMapper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function __construct(?DbaApi $dbaApi)
2626
$constants = get_defined_constants(true);
2727
if (
2828
! array_key_exists('mysqli', $constants)
29-
|| ! is_array($constants['mysqli']) // @phpstan-ignore-line
29+
|| ! is_array($constants['mysqli']) // @phpstan-ignore function.alreadyNarrowedType
3030
) {
3131
$constants['mysqli'] = [];
3232
}
@@ -37,7 +37,7 @@ public function __construct(?DbaApi $dbaApi)
3737
continue;
3838
}
3939

40-
if (! is_string($c)) { // @phpstan-ignore-line
40+
if (! is_string($c)) { // @phpstan-ignore function.alreadyNarrowedType
4141
continue;
4242
}
4343

0 commit comments

Comments
 (0)