diff --git a/src/DI/Definitions/Statement.php b/src/DI/Definitions/Statement.php index 47231c01e..ec2a035cd 100644 --- a/src/DI/Definitions/Statement.php +++ b/src/DI/Definitions/Statement.php @@ -45,7 +45,7 @@ public function __construct($entity, array $arguments = []) || $entity[0] instanceof self || $entity[0] instanceof Reference || $entity[0] instanceof Definition) - )) { + )) { throw new Nette\InvalidArgumentException('Argument is not valid Statement entity.'); } diff --git a/src/DI/DependencyChecker.php b/src/DI/DependencyChecker.php index 663543d51..884950e67 100644 --- a/src/DI/DependencyChecker.php +++ b/src/DI/DependencyChecker.php @@ -87,7 +87,8 @@ public static function isExpired( array $classes, array $functions, string $hash - ): bool { + ): bool + { try { $currentFiles = @array_map('filemtime', array_combine($tmp = array_keys($files), $tmp)); // @ - files may not exist $origPhpFiles = $phpFiles; diff --git a/src/DI/Extensions/ServicesExtension.php b/src/DI/Extensions/ServicesExtension.php index 02e83f1fd..e9649c851 100644 --- a/src/DI/Extensions/ServicesExtension.php +++ b/src/DI/Extensions/ServicesExtension.php @@ -60,7 +60,7 @@ private function loadDefinition(?string $name, \stdClass $config): void $def = $this->retrieveDefinition($name, $config); - static $methods = [ + $methods = [ Definitions\ServiceDefinition::class => 'updateServiceDefinition', Definitions\AccessorDefinition::class => 'updateAccessorDefinition', Definitions\FactoryDefinition::class => 'updateFactoryDefinition', diff --git a/src/DI/Resolver.php b/src/DI/Resolver.php index 8b02facbd..9648f58ac 100644 --- a/src/DI/Resolver.php +++ b/src/DI/Resolver.php @@ -531,7 +531,8 @@ public static function autowireArguments( \ReflectionFunctionAbstract $method, array $arguments, callable $getter - ): array { + ): array + { $optCount = 0; $useName = false; $num = -1; diff --git a/tests/DI/ContainerBuilder.enum.phpt b/tests/DI/ContainerBuilder.enum.phpt index 217ce91e1..4854584c9 100644 --- a/tests/DI/ContainerBuilder.enum.phpt +++ b/tests/DI/ContainerBuilder.enum.phpt @@ -13,7 +13,8 @@ use Tester\Assert; require __DIR__ . '/../bootstrap.php'; -enum Suit { +enum Suit +{ case Clubs; case Diamonds; case Hearts; diff --git a/tests/DI/ContainerBuilder.factory.resolveClass.phpt b/tests/DI/ContainerBuilder.factory.resolveClass.phpt index af17c05b5..18130311b 100644 --- a/tests/DI/ContainerBuilder.factory.resolveClass.phpt +++ b/tests/DI/ContainerBuilder.factory.resolveClass.phpt @@ -71,8 +71,7 @@ namespace C } } -namespace -{ +namespace { use Nette\DI; use Tester\Assert; diff --git a/tests/DI/Definitions.AccessorDefinition.render.phpt b/tests/DI/Definitions.AccessorDefinition.render.phpt index 758e32613..c8fd0df2a 100644 --- a/tests/DI/Definitions.AccessorDefinition.render.phpt +++ b/tests/DI/Definitions.AccessorDefinition.render.phpt @@ -55,7 +55,7 @@ public function createServiceAbc(): Good2 }; } XX -, + , $method->__toString() ); }); diff --git a/tests/DI/Definitions.ImportedDefinition.phpt b/tests/DI/Definitions.ImportedDefinition.phpt index 1ff490e4e..067b61eae 100644 --- a/tests/DI/Definitions.ImportedDefinition.phpt +++ b/tests/DI/Definitions.ImportedDefinition.phpt @@ -47,7 +47,7 @@ public function createServiceAbc(): void throw new Nette\DI\ServiceCreationException('Unable to create imported service \'abc\', it must be added using addService()'); } XX -, + , $method->__toString() ); }); diff --git a/tests/DI/Definitions.LocatorDefinition.render.create.phpt b/tests/DI/Definitions.LocatorDefinition.render.create.phpt index 2550d0611..85a14ccc7 100644 --- a/tests/DI/Definitions.LocatorDefinition.render.create.phpt +++ b/tests/DI/Definitions.LocatorDefinition.render.create.phpt @@ -60,7 +60,7 @@ public function createServiceAbc(): Good }; } XX -, + , $method->__toString() ); }); diff --git a/tests/DI/Definitions.LocatorDefinition.render.get.phpt b/tests/DI/Definitions.LocatorDefinition.render.get.phpt index e12b207f2..cda41e2e7 100644 --- a/tests/DI/Definitions.LocatorDefinition.render.get.phpt +++ b/tests/DI/Definitions.LocatorDefinition.render.get.phpt @@ -60,7 +60,7 @@ public function createServiceAbc(): Good }; } XX -, + , $method->__toString() ); }); diff --git a/tests/DI/Definitions.LocatorDefinition.render.multi.phpt b/tests/DI/Definitions.LocatorDefinition.render.multi.phpt index 036048d66..a7ed6800c 100644 --- a/tests/DI/Definitions.LocatorDefinition.render.multi.phpt +++ b/tests/DI/Definitions.LocatorDefinition.render.multi.phpt @@ -64,7 +64,7 @@ public function createServiceAbc(): Good }; } XX -, + , $method->__toString() ); }); diff --git a/tests/DI/InjectExtension.getInjectProperties().php74.phpt b/tests/DI/InjectExtension.getInjectProperties().php74.phpt index 9a5381d73..33a5cb95e 100644 --- a/tests/DI/InjectExtension.getInjectProperties().php74.phpt +++ b/tests/DI/InjectExtension.getInjectProperties().php74.phpt @@ -25,8 +25,7 @@ namespace A } } -namespace -{ +namespace { use Nette\DI\Extensions\InjectExtension; use Tester\Assert; diff --git a/tests/DI/InjectExtension.getInjectProperties().phpt b/tests/DI/InjectExtension.getInjectProperties().phpt index 616c6a39a..79c00b86e 100644 --- a/tests/DI/InjectExtension.getInjectProperties().phpt +++ b/tests/DI/InjectExtension.getInjectProperties().phpt @@ -69,8 +69,7 @@ namespace C } } -namespace -{ +namespace { use Nette\DI\Extensions\InjectExtension; use Tester\Assert; diff --git a/tests/DI/InjectExtension.getInjectProperties().traits.phpt b/tests/DI/InjectExtension.getInjectProperties().traits.phpt index 6eecf733b..1fc6c211e 100644 --- a/tests/DI/InjectExtension.getInjectProperties().traits.phpt +++ b/tests/DI/InjectExtension.getInjectProperties().traits.phpt @@ -34,8 +34,7 @@ namespace C } } -namespace -{ +namespace { use Nette\DI\Extensions\InjectExtension; use Tester\Assert; diff --git a/tests/DI/NeonAdapter.basic.phpt b/tests/DI/NeonAdapter.basic.phpt index 18a2d67d2..8c5830fad 100644 --- a/tests/DI/NeonAdapter.basic.phpt +++ b/tests/DI/NeonAdapter.basic.phpt @@ -67,4 +67,4 @@ services: - Lorem(1)::foo() EOD -, $adapter->dump($data)); + , $adapter->dump($data)); diff --git a/tests/DI/NeonAdapter.preprocess.phpt b/tests/DI/NeonAdapter.preprocess.phpt index 17d6e8b8a..f462c4391 100644 --- a/tests/DI/NeonAdapter.preprocess.phpt +++ b/tests/DI/NeonAdapter.preprocess.phpt @@ -43,7 +43,7 @@ Assert::match(<<<'EOD' - ent(2)::inner(3, 4) - ent(3)::inner(5) EOD -, $adapter->dump($data)); + , $adapter->dump($data)); // references @@ -58,7 +58,7 @@ Assert::match(<<<'EOD' a: @foo::method(@bar) b: @foo() EOD -, $adapter->dump($data)); + , $adapter->dump($data)); // _ diff --git a/tests/DI/PhpAdapter.phpt b/tests/DI/PhpAdapter.phpt index 5e46af9b8..24e25e037 100644 --- a/tests/DI/PhpAdapter.phpt +++ b/tests/DI/PhpAdapter.phpt @@ -47,4 +47,4 @@ return [ ], ]; EOD -, file_get_contents(TEMP_FILE)); + , file_get_contents(TEMP_FILE));