File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 33 "description" : " Dependency injection service container" ,
44 "type" : " library" ,
55 "license" : " MIT" ,
6- "version" : " 0.1 " ,
6+ "version" : " 0.2 " ,
77 "autoload" : {
88 "psr-4" : {
99 "Micro\\ Component\\ DependencyInjection\\ " : " src/"
Original file line number Diff line number Diff line change @@ -110,8 +110,14 @@ protected function initializeService(string $serviceId): void
110110
111111 $ decorators = $ this ->decorators [$ serviceId ];
112112
113- usort ($ decorators , function (array $ left , array $ right ): bool {
114- return $ left [1 ] > $ right [1 ];
113+ usort ($ decorators , function (array $ left , array $ right ): int {
114+ $ l = $ left [1 ];
115+ $ r = $ right [1 ];
116+ if ($ l === $ r ) {
117+ return 0 ;
118+ }
119+
120+ return $ left [1 ] > $ right [1 ] ? 1 : -1 ;
115121 });
116122
117123 /** @var array<Closure, int> $decorator */
You can’t perform that action at this time.
0 commit comments