File tree Expand file tree Collapse file tree 2 files changed +7
-14
lines changed
src/Tempest/Framework/Commands Expand file tree Collapse file tree 2 files changed +7
-14
lines changed Original file line number Diff line number Diff line change 4949 "adam-paterson/oauth2-slack" : " ^1.1" ,
5050 "aws/aws-sdk-php" : " ^3.338.0" ,
5151 "azure-oss/storage-blob-flysystem" : " ^1.2" ,
52+ "brianium/paratest" : " ^7.14" ,
5253 "carthage-software/mago" : " 1.0.0-beta.28" ,
5354 "depotwarehouse/oauth2-twitch" : " ^1.3" ,
5455 "guzzlehttp/psr7" : " ^2.6.1" ,
8788 "tempest/blade" : " dev-main" ,
8889 "thenetworg/oauth2-azure" : " ^2.2" ,
8990 "twig/twig" : " ^3.16" ,
90- "wohali/oauth2-discord-new" : " ^1.2" ,
91- "brianium/paratest" : " ^7.14"
91+ "wohali/oauth2-discord-new" : " ^1.2"
9292 },
9393 "replace" : {
9494 "tempest/auth" : " self.version" ,
Original file line number Diff line number Diff line change @@ -60,20 +60,13 @@ private function makeData(ViewComponent $viewComponent): ImmutableArray
6060 private function resolveViewComponent (string $ viewComponent ): ?ViewComponent
6161 {
6262 if (is_file ($ viewComponent )) {
63- foreach ($ this ->viewConfig ->viewComponents as $ registeredViewComponent ) {
64- if ($ registeredViewComponent ->file !== $ viewComponent ) {
65- continue ;
66- }
67-
68- $ viewComponent = $ registeredViewComponent ;
69-
70- break ;
71- }
72- } else {
73- $ viewComponent = $ this ->viewConfig ->viewComponents [$ viewComponent ] ?? null ;
63+ return array_find (
64+ array: $ this ->viewConfig ->viewComponents ,
65+ callback: fn ($ registeredViewComponent ) => $ registeredViewComponent ->file === $ viewComponent ,
66+ );
7467 }
7568
76- return $ viewComponent ;
69+ return $ this -> viewConfig -> viewComponents [ $ viewComponent] ?? null ;
7770 }
7871
7972 private function resolveSlots (ViewComponent $ viewComponent ): ImmutableArray
You can’t perform that action at this time.
0 commit comments