Skip to content

Commit 139b88a

Browse files
committed
PHPStan fix
1 parent 72eae6f commit 139b88a

2 files changed

Lines changed: 9 additions & 10 deletions

File tree

phpstan.neon

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,6 @@ parameters:
1313
count: 1
1414
path: src/Commands/TypeToNewIndex.php
1515

16-
-
17-
message: "#^Call to method addSetup\\(\\) on an unknown class Nette\\\\DI\\\\Definitions\\\\ServiceDefinition\\.$#"
18-
count: 1
19-
path: src/DI/SpameriElasticSearchExtension.php
20-
21-
-
22-
message: "#^PHPDoc tag @var for variable \\$definition contains unknown class Nette\\\\DI\\\\Definitions\\\\ServiceDefinition\\.$#"
23-
count: 1
24-
path: src/DI/SpameriElasticSearchExtension.php
25-
2616
-
2717
message: "#^Call to function array_key_exists\\(\\) with string and array\\<int, mixed\\> will always evaluate to false\\.$#"
2818
count: 1
@@ -38,6 +28,11 @@ parameters:
3828
count: 2
3929
path: src/Model/TypeToNewIndex/Migrate.php
4030

31+
-
32+
message: "#^Static method Nette\\\\DI\\\\Compiler\\:\\:loadDefinitions\\(\\) invoked with 3 parameters, 0 required\\.$#"
33+
count: 1
34+
path: src/DI/SpameriElasticSearchExtension.php
35+
4136

4237
checkGenericClassInNonGenericObjectType: false
4338
checkMissingIterableValueType: false

tests/bootstrap.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
* source code.
1010
*/
1111

12+
if (\defined('__PHPSTAN_RUNNING__')) {
13+
return;
14+
}
15+
1216
$loader = include __DIR__ . '/../vendor/autoload.php';
1317
if ( ! $loader) {
1418
echo 'Install Nette Tester using `composer update --dev`';

0 commit comments

Comments
 (0)