Skip to content

Commit 428be52

Browse files
committed
PHPStan
1 parent 0c97fbd commit 428be52

File tree

2 files changed

+8
-15
lines changed

2 files changed

+8
-15
lines changed

phpstan-baseline.neon

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -528,18 +528,6 @@ parameters:
528528
count: 1
529529
path: tests/DependencyInjection/AbstractMongoDBExtensionTestCase.php
530530

531-
-
532-
message: '#^Call to function method_exists\(\) with ''Doctrine\\\\ODM\\\\MongoDB\\\\Configuration'' and ''setUseLazyGhostObje…'' will always evaluate to true\.$#'
533-
identifier: function.alreadyNarrowedType
534-
count: 1
535-
path: tests/DependencyInjection/ConfigurationTest.php
536-
537-
-
538-
message: '#^Call to function method_exists\(\) with ''Doctrine\\\\ODM\\\\MongoDB\\\\Configuration'' and ''setUseNativeLazyObj…'' will always evaluate to true\.$#'
539-
identifier: function.alreadyNarrowedType
540-
count: 1
541-
path: tests/DependencyInjection/ConfigurationTest.php
542-
543531
-
544532
message: '#^Method Doctrine\\Bundle\\MongoDBBundle\\Tests\\DependencyInjection\\ConfigurationTest\:\:testFullConfiguration\(\) has parameter \$config with no value type specified in iterable type array\.$#'
545533
identifier: missingType.iterableValue
@@ -829,7 +817,13 @@ parameters:
829817
path: tests/ServiceRepositoryTest.php
830818

831819
-
832-
message: '#^Call to function method_exists\(\) with Doctrine\\ODM\\MongoDB\\Configuration and ''setUseLazyGhostObje…'' will always evaluate to true\.$#'
820+
message: '#^Call to function method_exists\(\) with ''Doctrine\\\\ODM\\\\MongoDB\\\\Configuration'' and ''setUseLazyGhostObje…'' will always evaluate to true\.$#'
821+
identifier: function.alreadyNarrowedType
822+
count: 1
823+
path: tests/TestCase.php
824+
825+
-
826+
message: '#^Call to function method_exists\(\) with ''Doctrine\\\\ODM\\\\MongoDB\\\\Configuration'' and ''setUseNativeLazyObj…'' will always evaluate to true\.$#'
833827
identifier: function.alreadyNarrowedType
834828
count: 1
835829
path: tests/TestCase.php

tests/DependencyInjection/ConfigurationTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
use function array_key_exists;
2727
use function array_merge;
2828
use function file_get_contents;
29-
use function method_exists;
3029

3130
class ConfigurationTest extends TestCase
3231
{
@@ -42,7 +41,7 @@ public function testDefaults(): void
4241
'auto_generate_hydrator_classes' => false,
4342
'auto_generate_proxy_classes' => ODMConfiguration::AUTOGENERATE_EVAL,
4443
'auto_generate_persistent_collection_classes' => ODMConfiguration::AUTOGENERATE_NEVER,
45-
'enable_lazy_ghost_objects' => method_exists(ODMConfiguration::class, 'setUseLazyGhostObject'),
44+
'enable_lazy_ghost_objects' => self::useLazyGhostObject(),
4645
'enable_native_lazy_objects' => self::useNativeLazyObject(),
4746
'default_database' => 'default',
4847
'document_managers' => [],

0 commit comments

Comments
 (0)