@@ -559,7 +559,7 @@ private function parseDefinition(string $id, $service, string $file, array $defa
559
559
}
560
560
}
561
561
562
- $ tags = isset ( $ service ['tags ' ]) ? $ service [ ' tags ' ] : [];
562
+ $ tags = $ service ['tags ' ] ?? [];
563
563
if (!\is_array ($ tags )) {
564
564
throw new InvalidArgumentException (sprintf ('Parameter "tags" must be an array for service "%s" in "%s". Check your YAML syntax. ' , $ id , $ file ));
565
565
}
@@ -615,8 +615,8 @@ private function parseDefinition(string $id, $service, string $file, array $defa
615
615
throw new InvalidArgumentException (sprintf ('Invalid value "%s" for attribute "decoration_on_invalid" on service "%s". Did you mean "exception", "ignore" or null in "%s"? ' , $ decorationOnInvalid , $ id , $ file ));
616
616
}
617
617
618
- $ renameId = isset ( $ service ['decoration_inner_name ' ]) ? $ service [ ' decoration_inner_name ' ] : null ;
619
- $ priority = isset ( $ service ['decoration_priority ' ]) ? $ service [ ' decoration_priority ' ] : 0 ;
618
+ $ renameId = $ service ['decoration_inner_name ' ] ?? null ;
619
+ $ priority = $ service ['decoration_priority ' ] ?? 0 ;
620
620
621
621
$ definition ->setDecoratedService ($ decorates , $ renameId , $ priority , $ invalidBehavior );
622
622
}
@@ -666,8 +666,8 @@ private function parseDefinition(string $id, $service, string $file, array $defa
666
666
if (!\is_string ($ service ['resource ' ])) {
667
667
throw new InvalidArgumentException (sprintf ('A "resource" attribute must be of type string for service "%s" in "%s". Check your YAML syntax. ' , $ id , $ file ));
668
668
}
669
- $ exclude = isset ( $ service ['exclude ' ]) ? $ service [ ' exclude ' ] : null ;
670
- $ namespace = isset ( $ service ['namespace ' ]) ? $ service [ ' namespace ' ] : $ id ;
669
+ $ exclude = $ service ['exclude ' ] ?? null ;
670
+ $ namespace = $ service ['namespace ' ] ?? $ id ;
671
671
$ this ->registerClasses ($ definition , $ namespace , $ service ['resource ' ], $ exclude );
672
672
} else {
673
673
$ this ->setDefinition ($ id , $ definition );
@@ -841,7 +841,7 @@ private function resolveServices($value, string $file, bool $isParameter = false
841
841
$ instanceof = $ this ->instanceof ;
842
842
$ this ->instanceof = [];
843
843
844
- $ id = sprintf ('.%d_%s ' , ++$ this ->anonymousServicesCount , preg_replace ('/^.* \\\\/ ' , '' , isset ( $ argument ['class ' ]) ? $ argument [ ' class ' ] : '' ).$ this ->anonymousServicesSuffix );
844
+ $ id = sprintf ('.%d_%s ' , ++$ this ->anonymousServicesCount , preg_replace ('/^.* \\\\/ ' , '' , $ argument ['class ' ] ?? '' ).$ this ->anonymousServicesSuffix );
845
845
$ this ->parseDefinition ($ id , $ argument , $ file , []);
846
846
847
847
if (!$ this ->container ->hasDefinition ($ id )) {
0 commit comments