Skip to content

Commit d6ab6e3

Browse files
committed
Update type hints to allow nullable strings and cleanup phpstan-baseline
1 parent be3d27e commit d6ab6e3

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

phpstan-baseline.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,9 @@
22

33
$ignoreErrors = [];
44
$ignoreErrors[] = [
5-
'message' => '#^Property Doctrine\\\\ORM\\\\Mapping\\\\ClassMetadataInfo\\<object\\>\\:\\:\\$table \\(array\\{name\\: string, schema\\?\\: string, indexes\\?\\: array, uniqueConstraints\\?\\: array, options\\?\\: array\\<string, mixed\\>, quoted\\?\\: bool\\}\\) does not accept array\\{\\}\\.$#',
5+
'message' => '#^Property Doctrine\\\\ORM\\\\Mapping\\\\ClassMetadata\\<object\\>\\:\\:\\$table \\(array\\{name\\: string, schema\\?\\: string, indexes\\?\\: array, uniqueConstraints\\?\\: array, options\\?\\: array\\<string, mixed\\>, quoted\\?\\: bool\\}\\) does not accept array\\{\\}\\.$#',
66
'count' => 1,
77
'path' => __DIR__ . '/src/Bridge/Doctrine/MetadataLoadInterceptor.php',
88
];
9-
$ignoreErrors[] = [
10-
'message' => '#^Call to function file_get_contents\\(\\) on a separate line has no effect\\.$#',
11-
'count' => 1,
12-
'path' => __DIR__ . '/src/Instrument/ClassLoading/CacheWarmer.php',
13-
];
149

1510
return ['parameters' => ['ignoreErrors' => $ignoreErrors]];

src/Instrument/ClassLoading/CachePathManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public function getCachePathForResource(string $resource)
121121
*
122122
* @return array|null Information or null if no record in the cache
123123
*/
124-
public function queryCacheState(string $resource = null): ?array
124+
public function queryCacheState(?string $resource = null): ?array
125125
{
126126
if ($resource === null) {
127127
return $this->cacheState;

src/Instrument/Transformer/StreamMetaData.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class StreamMetaData
8585
* @param string $source Source code or null
8686
* @throws InvalidArgumentException for invalid stream
8787
*/
88-
public function __construct($stream, string $source = null)
88+
public function __construct($stream, ?string $source = null)
8989
{
9090
if (!is_resource($stream)) {
9191
throw new InvalidArgumentException('Stream should be valid resource');

0 commit comments

Comments
 (0)