@@ -508,7 +508,7 @@ private function parseDefinition(string $id, $service, string $file, array $defa
508
508
}
509
509
}
510
510
511
- $ tags = isset ( $ service ['tags ' ]) ? $ service [ ' tags ' ] : [];
511
+ $ tags = $ service ['tags ' ] ?? [];
512
512
if (!\is_array ($ tags )) {
513
513
throw new InvalidArgumentException (sprintf ('Parameter "tags" must be an array for service "%s" in "%s". Check your YAML syntax. ' , $ id , $ file ));
514
514
}
@@ -559,8 +559,8 @@ private function parseDefinition(string $id, $service, string $file, array $defa
559
559
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 ));
560
560
}
561
561
562
- $ renameId = isset ( $ service ['decoration_inner_name ' ]) ? $ service [ ' decoration_inner_name ' ] : null ;
563
- $ priority = isset ( $ service ['decoration_priority ' ]) ? $ service [ ' decoration_priority ' ] : 0 ;
562
+ $ renameId = $ service ['decoration_inner_name ' ] ?? null ;
563
+ $ priority = $ service ['decoration_priority ' ] ?? 0 ;
564
564
565
565
$ definition ->setDecoratedService ($ decorates , $ renameId , $ priority , $ invalidBehavior );
566
566
}
@@ -606,8 +606,8 @@ private function parseDefinition(string $id, $service, string $file, array $defa
606
606
if (!\is_string ($ service ['resource ' ])) {
607
607
throw new InvalidArgumentException (sprintf ('A "resource" attribute must be of type string for service "%s" in "%s". Check your YAML syntax. ' , $ id , $ file ));
608
608
}
609
- $ exclude = isset ( $ service ['exclude ' ]) ? $ service [ ' exclude ' ] : null ;
610
- $ namespace = isset ( $ service ['namespace ' ]) ? $ service [ ' namespace ' ] : $ id ;
609
+ $ exclude = $ service ['exclude ' ] ?? null ;
610
+ $ namespace = $ service ['namespace ' ] ?? $ id ;
611
611
$ this ->registerClasses ($ definition , $ namespace , $ service ['resource ' ], $ exclude );
612
612
} else {
613
613
$ this ->setDefinition ($ id , $ definition );
@@ -789,7 +789,7 @@ private function resolveServices($value, string $file, bool $isParameter = false
789
789
$ instanceof = $ this ->instanceof ;
790
790
$ this ->instanceof = [];
791
791
792
- $ id = sprintf ('.%d_%s ' , ++$ this ->anonymousServicesCount , preg_replace ('/^.* \\\\/ ' , '' , isset ( $ argument ['class ' ]) ? $ argument [ ' class ' ] : '' ).$ this ->anonymousServicesSuffix );
792
+ $ id = sprintf ('.%d_%s ' , ++$ this ->anonymousServicesCount , preg_replace ('/^.* \\\\/ ' , '' , $ argument ['class ' ] ?? '' ).$ this ->anonymousServicesSuffix );
793
793
$ this ->parseDefinition ($ id , $ argument , $ file , []);
794
794
795
795
if (!$ this ->container ->hasDefinition ($ id )) {
0 commit comments