@@ -30,12 +30,12 @@ discard block |
||
| 30 | 30 | SampleBoot::class, |
| 31 | 31 | ], |
| 32 | 32 | [ |
| 33 | - static function (Container $container, SampleBoot $boot) { |
|
| 33 | + static function (Container $container, SampleBoot $boot){ |
|
| 34 | 34 | $container->bind('efg', $boot); |
| 35 | 35 | }, |
| 36 | 36 | ], |
| 37 | 37 | [ |
| 38 | - static function (Container $container, SampleBoot $boot) { |
|
| 38 | + static function (Container $container, SampleBoot $boot){ |
|
| 39 | 39 | $container->bind('ghi', $boot); |
| 40 | 40 | }, |
| 41 | 41 | ], |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | $bootloader = $this->getBootloadManager(); |
| 98 | 98 | |
| 99 | 99 | $bootloader->bootload([ |
| 100 | - new class () extends Bootloader { |
|
| 100 | + new class () extends Bootloader{ |
|
| 101 | 101 | public const BINDINGS = ['abc' => self::class]; |
| 102 | 102 | public const SINGLETONS = ['single' => self::class]; |
| 103 | 103 | |
@@ -30,12 +30,14 @@ discard block |
||
| 30 | 30 | SampleBoot::class, |
| 31 | 31 | ], |
| 32 | 32 | [ |
| 33 | - static function (Container $container, SampleBoot $boot) { |
|
| 33 | + static function (Container $container, SampleBoot $boot) |
|
| 34 | + { |
|
| 34 | 35 | $container->bind('efg', $boot); |
| 35 | 36 | }, |
| 36 | 37 | ], |
| 37 | 38 | [ |
| 38 | - static function (Container $container, SampleBoot $boot) { |
|
| 39 | + static function (Container $container, SampleBoot $boot) |
|
| 40 | + { |
|
| 39 | 41 | $container->bind('ghi', $boot); |
| 40 | 42 | }, |
| 41 | 43 | ], |
@@ -97,7 +99,8 @@ discard block |
||
| 97 | 99 | $bootloader = $this->getBootloadManager(); |
| 98 | 100 | |
| 99 | 101 | $bootloader->bootload([ |
| 100 | - new class () extends Bootloader { |
|
| 102 | + new class () extends Bootloader |
|
| 103 | + { |
|
| 101 | 104 | public const BINDINGS = ['abc' => self::class]; |
| 102 | 105 | public const SINGLETONS = ['single' => self::class]; |
| 103 | 106 | |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | class BootloaderR extends Bootloader |
| 11 | 11 | { |
| 12 | 12 | #[BindMethod] |
| 13 | - private function bind(): SampleClass|SampleClassInterface |
|
| 13 | + private function bind(): SampleClass | SampleClassInterface |
|
| 14 | 14 | { |
| 15 | 15 | return new SampleClass(); |
| 16 | 16 | } |
@@ -43,13 +43,13 @@ discard block |
||
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | #[BindMethod] |
| 46 | - private function bindMethodC(): SampleClass2|string|int |
|
| 46 | + private function bindMethodC(): SampleClass2 | string | int |
|
| 47 | 47 | { |
| 48 | 48 | return new SampleClass2(); |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | #[BindMethod] |
| 52 | - private function bindMethodD(): SampleClass|SampleClassInterface |
|
| 52 | + private function bindMethodD(): SampleClass | SampleClassInterface |
|
| 53 | 53 | { |
| 54 | 54 | return new SampleClass(); |
| 55 | 55 | } |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | #[SampleMethod('sampleMethod')] |
| 70 | - private function sampleMethod(): SampleClass|string|int |
|
| 70 | + private function sampleMethod(): SampleClass | string | int |
|
| 71 | 71 | { |
| 72 | 72 | return new SampleClass(); |
| 73 | 73 | } |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | #[InjectorMethod(alias: SampleInjectableClass::class)] |
| 76 | 76 | protected function sampleInjector(): InjectorInterface |
| 77 | 77 | { |
| 78 | - return new class implements InjectorInterface { |
|
| 78 | + return new class implements InjectorInterface{ |
|
| 79 | 79 | public function createInjection(\ReflectionClass $class, ?string $context = null): object |
| 80 | 80 | { |
| 81 | 81 | return new SampleInjectableClass('foo'); |
@@ -75,7 +75,8 @@ |
||
| 75 | 75 | #[InjectorMethod(alias: SampleInjectableClass::class)] |
| 76 | 76 | protected function sampleInjector(): InjectorInterface |
| 77 | 77 | { |
| 78 | - return new class implements InjectorInterface { |
|
| 78 | + return new class implements InjectorInterface |
|
| 79 | + { |
|
| 79 | 80 | public function createInjection(\ReflectionClass $class, ?string $context = null): object |
| 80 | 81 | { |
| 81 | 82 | return new SampleInjectableClass('foo'); |
@@ -8,5 +8,5 @@ |
||
| 8 | 8 | { |
| 9 | 9 | public function __construct( |
| 10 | 10 | public string $name, |
| 11 | - ) {} |
|
| 11 | + ){} |
|
| 12 | 12 | } |
@@ -8,5 +8,6 @@ |
||
| 8 | 8 | { |
| 9 | 9 | public function __construct( |
| 10 | 10 | public string $name, |
| 11 | - ) {} |
|
| 11 | + ) { |
|
| 12 | +} |
|
| 12 | 13 | } |
@@ -4,4 +4,4 @@ |
||
| 4 | 4 | |
| 5 | 5 | namespace Spiral\Tests\Boot\Fixtures; |
| 6 | 6 | |
| 7 | -interface SampleClassInterface {} |
|
| 7 | +interface SampleClassInterface{} |
|
@@ -4,4 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | namespace Spiral\Tests\Boot\Fixtures; |
| 6 | 6 | |
| 7 | -interface SampleClassInterface {} |
|
| 7 | +interface SampleClassInterface |
|
| 8 | +{ |
|
| 9 | +} |
|
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | class BootloaderM extends Bootloader |
| 11 | 11 | { |
| 12 | 12 | #[SingletonMethod] |
| 13 | - private function bind(): int|object |
|
| 13 | + private function bind(): int | object |
|
| 14 | 14 | { |
| 15 | 15 | return new SampleClass2(); |
| 16 | 16 | } |
@@ -4,4 +4,4 @@ |
||
| 4 | 4 | |
| 5 | 5 | namespace Spiral\Tests\Boot\Fixtures; |
| 6 | 6 | |
| 7 | -class SampleClass2 {} |
|
| 7 | +class SampleClass2{} |
|
@@ -4,4 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | namespace Spiral\Tests\Boot\Fixtures; |
| 6 | 6 | |
| 7 | -class SampleClass2 {} |
|
| 7 | +class SampleClass2 |
|
| 8 | +{ |
|
| 9 | +} |
|
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | class BootloaderL extends Bootloader |
| 11 | 11 | { |
| 12 | 12 | #[BindMethod] |
| 13 | - private function bind(): int|string|object |
|
| 13 | + private function bind(): int | string | object |
|
| 14 | 14 | { |
| 15 | 15 | return new SampleClass2(); |
| 16 | 16 | } |
@@ -6,4 +6,4 @@ |
||
| 6 | 6 | |
| 7 | 7 | |
| 8 | 8 | #[\Attribute(\Attribute::TARGET_METHOD)] |
| 9 | -final class SampleMethod extends \Spiral\Boot\Attribute\AbstractMethod {} |
|
| 9 | +final class SampleMethod extends \Spiral\Boot\Attribute\AbstractMethod{} |
|