@@ -10,7 +10,7 @@ |
||
10 | 10 | #[\Attribute(\Attribute::TARGET_CLASS), NamedArgumentConstructor] |
11 | 11 | final class TargetWorker extends BootloadConfig |
12 | 12 | { |
13 | - public function __construct(array|string $workers) |
|
13 | + public function __construct(array | string $workers) |
|
14 | 14 | { |
15 | 15 | parent::__construct(allowEnv: ['RR_MODE' => $workers]); |
16 | 16 | } |
@@ -12,5 +12,5 @@ |
||
12 | 12 | /** |
13 | 13 | * @param class-string<BootloaderInterface>|BootloaderInterface $bootloader |
14 | 14 | */ |
15 | - public function canInitialize(string|BootloaderInterface $bootloader, ?BootloadConfig $config = null): bool; |
|
15 | + public function canInitialize(string | BootloaderInterface $bootloader, ?BootloadConfig $config = null): bool; |
|
16 | 16 | } |
@@ -10,6 +10,6 @@ |
||
10 | 10 | public function __construct( |
11 | 11 | private string $foo, |
12 | 12 | private string $bar, |
13 | - ) { |
|
13 | + ){ |
|
14 | 14 | } |
15 | 15 | } |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | |
3 | 3 | declare(strict_types=1); |
4 | 4 | |
5 | -if (!\function_exists('inject')) { |
|
5 | +if (!\function_exists('inject')){ |
|
6 | 6 | /** |
7 | 7 | * Macro function to be replaced by the injected value. |
8 | 8 | */ |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | } |
13 | 13 | } |
14 | 14 | |
15 | -if (!\function_exists('injected')) { |
|
15 | +if (!\function_exists('injected')){ |
|
16 | 16 | /** |
17 | 17 | * Return true if block value has been defined. |
18 | 18 | * |
@@ -2,7 +2,8 @@ discard block |
||
2 | 2 | |
3 | 3 | declare(strict_types=1); |
4 | 4 | |
5 | -if (!\function_exists('inject')) { |
|
5 | +if (!\function_exists('inject')) |
|
6 | +{ |
|
6 | 7 | /** |
7 | 8 | * Macro function to be replaced by the injected value. |
8 | 9 | */ |
@@ -12,7 +13,8 @@ discard block |
||
12 | 13 | } |
13 | 14 | } |
14 | 15 | |
15 | -if (!\function_exists('injected')) { |
|
16 | +if (!\function_exists('injected')) |
|
17 | +{ |
|
16 | 18 | /** |
17 | 19 | * Return true if block value has been defined. |
18 | 20 | * |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | { |
23 | 23 | public function testListenWithJobTypeFromConfig(): void |
24 | 24 | { |
25 | - $handler = new class($this->createMock(InvokerInterface::class)) extends JobHandler {}; |
|
25 | + $handler = new class($this->createMock(InvokerInterface::class)) extends JobHandler{}; |
|
26 | 26 | |
27 | 27 | $container = new Container(); |
28 | 28 | $container->bind('test', new PhpSerializer()); |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | |
59 | 59 | public function testListenWithJobTypeFromAttribute(): void |
60 | 60 | { |
61 | - $handler = new class($this->createMock(InvokerInterface::class)) extends JobHandler {}; |
|
61 | + $handler = new class($this->createMock(InvokerInterface::class)) extends JobHandler{}; |
|
62 | 62 | |
63 | 63 | $container = new Container(); |
64 | 64 | $container->bind('test', new PhpSerializer()); |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | |
95 | 95 | public function testListenWithJobTypeFromClass(): void |
96 | 96 | { |
97 | - $handler = new class($this->createMock(InvokerInterface::class)) extends JobHandler {}; |
|
97 | + $handler = new class($this->createMock(InvokerInterface::class)) extends JobHandler{}; |
|
98 | 98 | |
99 | 99 | $container = new Container(); |
100 | 100 | $container->bind('test', new PhpSerializer()); |
@@ -22,7 +22,9 @@ discard block |
||
22 | 22 | { |
23 | 23 | public function testListenWithJobTypeFromConfig(): void |
24 | 24 | { |
25 | - $handler = new class($this->createMock(InvokerInterface::class)) extends JobHandler {}; |
|
25 | + $handler = new class($this->createMock(InvokerInterface::class)) extends JobHandler |
|
26 | + { |
|
27 | +}; |
|
26 | 28 | |
27 | 29 | $container = new Container(); |
28 | 30 | $container->bind('test', new PhpSerializer()); |
@@ -58,7 +60,9 @@ discard block |
||
58 | 60 | |
59 | 61 | public function testListenWithJobTypeFromAttribute(): void |
60 | 62 | { |
61 | - $handler = new class($this->createMock(InvokerInterface::class)) extends JobHandler {}; |
|
63 | + $handler = new class($this->createMock(InvokerInterface::class)) extends JobHandler |
|
64 | + { |
|
65 | +}; |
|
62 | 66 | |
63 | 67 | $container = new Container(); |
64 | 68 | $container->bind('test', new PhpSerializer()); |
@@ -94,7 +98,9 @@ discard block |
||
94 | 98 | |
95 | 99 | public function testListenWithJobTypeFromClass(): void |
96 | 100 | { |
97 | - $handler = new class($this->createMock(InvokerInterface::class)) extends JobHandler {}; |
|
101 | + $handler = new class($this->createMock(InvokerInterface::class)) extends JobHandler |
|
102 | + { |
|
103 | +}; |
|
98 | 104 | |
99 | 105 | $container = new Container(); |
100 | 106 | $container->bind('test', new PhpSerializer()); |
@@ -23,7 +23,7 @@ |
||
23 | 23 | |
24 | 24 | $this->container = new Container(); |
25 | 25 | $this->container->bind(Tokenizer::class, $this->getTokenizer(['scopes' => [ |
26 | - 'foo' => ['directories' => [__DIR__ . '/Classes/Inner'], 'exclude' => []], |
|
26 | + 'foo' => ['directories' => [__DIR__.'/Classes/Inner'], 'exclude' => []], |
|
27 | 27 | ]])); |
28 | 28 | $this->container->bindSingleton(ScopedClassesInterface::class, ScopedClassLocator::class); |
29 | 29 | } |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | protected function setUp(): void |
17 | 17 | { |
18 | 18 | $this->finder = new Finder(); |
19 | - $this->finder->files()->in([__DIR__ . '/Classes'])->name('*.php'); |
|
19 | + $this->finder->files()->in([__DIR__.'/Classes'])->name('*.php'); |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | public function testHasIncludesMessage(): void |
@@ -56,9 +56,9 @@ discard block |
||
56 | 56 | ); |
57 | 57 | $class->setLogger($logger); |
58 | 58 | |
59 | - try { |
|
59 | + try{ |
|
60 | 60 | $ref->invoke($class, 'foo'); |
61 | - } catch (LocatorException) { |
|
61 | + }catch (LocatorException){ |
|
62 | 62 | } |
63 | 63 | } |
64 | 64 | |
@@ -71,9 +71,9 @@ discard block |
||
71 | 71 | $logger->expects($this->never())->method('error'); |
72 | 72 | $class->setLogger($logger); |
73 | 73 | |
74 | - try { |
|
74 | + try{ |
|
75 | 75 | $ref->invoke($class, 'foo'); |
76 | - } catch (LocatorException) { |
|
76 | + }catch (LocatorException){ |
|
77 | 77 | } |
78 | 78 | } |
79 | 79 | |
@@ -89,9 +89,9 @@ discard block |
||
89 | 89 | ); |
90 | 90 | $class->setLogger($logger); |
91 | 91 | |
92 | - try { |
|
92 | + try{ |
|
93 | 93 | $ref->invoke($class, 'foo'); |
94 | - } catch (LocatorException) { |
|
94 | + }catch (LocatorException){ |
|
95 | 95 | } |
96 | 96 | } |
97 | 97 | |
@@ -104,14 +104,14 @@ discard block |
||
104 | 104 | $logger->expects($this->never())->method('error'); |
105 | 105 | $class->setLogger($logger); |
106 | 106 | |
107 | - try { |
|
107 | + try{ |
|
108 | 108 | $ref->invoke($class, 'foo'); |
109 | - } catch (LocatorException) { |
|
109 | + }catch (LocatorException){ |
|
110 | 110 | } |
111 | 111 | } |
112 | 112 | |
113 | 113 | private function getLocator(bool $debug = false): AbstractLocator |
114 | 114 | { |
115 | - return new class($this->finder, $debug) extends AbstractLocator {}; |
|
115 | + return new class($this->finder, $debug) extends AbstractLocator{}; |
|
116 | 116 | } |
117 | 117 | } |
@@ -56,9 +56,12 @@ discard block |
||
56 | 56 | ); |
57 | 57 | $class->setLogger($logger); |
58 | 58 | |
59 | - try { |
|
59 | + try |
|
60 | + { |
|
60 | 61 | $ref->invoke($class, 'foo'); |
61 | - } catch (LocatorException) { |
|
62 | + } |
|
63 | + catch (LocatorException) |
|
64 | + { |
|
62 | 65 | } |
63 | 66 | } |
64 | 67 | |
@@ -71,9 +74,12 @@ discard block |
||
71 | 74 | $logger->expects($this->never())->method('error'); |
72 | 75 | $class->setLogger($logger); |
73 | 76 | |
74 | - try { |
|
77 | + try |
|
78 | + { |
|
75 | 79 | $ref->invoke($class, 'foo'); |
76 | - } catch (LocatorException) { |
|
80 | + } |
|
81 | + catch (LocatorException) |
|
82 | + { |
|
77 | 83 | } |
78 | 84 | } |
79 | 85 | |
@@ -89,9 +95,12 @@ discard block |
||
89 | 95 | ); |
90 | 96 | $class->setLogger($logger); |
91 | 97 | |
92 | - try { |
|
98 | + try |
|
99 | + { |
|
93 | 100 | $ref->invoke($class, 'foo'); |
94 | - } catch (LocatorException) { |
|
101 | + } |
|
102 | + catch (LocatorException) |
|
103 | + { |
|
95 | 104 | } |
96 | 105 | } |
97 | 106 | |
@@ -104,14 +113,19 @@ discard block |
||
104 | 113 | $logger->expects($this->never())->method('error'); |
105 | 114 | $class->setLogger($logger); |
106 | 115 | |
107 | - try { |
|
116 | + try |
|
117 | + { |
|
108 | 118 | $ref->invoke($class, 'foo'); |
109 | - } catch (LocatorException) { |
|
119 | + } |
|
120 | + catch (LocatorException) |
|
121 | + { |
|
110 | 122 | } |
111 | 123 | } |
112 | 124 | |
113 | 125 | private function getLocator(bool $debug = false): AbstractLocator |
114 | 126 | { |
115 | - return new class($this->finder, $debug) extends AbstractLocator {}; |
|
127 | + return new class($this->finder, $debug) extends AbstractLocator |
|
128 | + { |
|
129 | +}; |
|
116 | 130 | } |
117 | 131 | } |
@@ -25,7 +25,7 @@ |
||
25 | 25 | |
26 | 26 | $this->container = new Container(); |
27 | 27 | $this->container->bind(Tokenizer::class, $this->getTokenizer([ |
28 | - 'scopes' => ['foo' => ['directories' => [__DIR__ . '/Enums/Inner'], 'exclude' => []]], |
|
28 | + 'scopes' => ['foo' => ['directories' => [__DIR__.'/Enums/Inner'], 'exclude' => []]], |
|
29 | 29 | ])); |
30 | 30 | $this->container->bindSingleton(ScopedEnumsInterface::class, ScopedEnumLocator::class); |
31 | 31 | } |
@@ -25,7 +25,7 @@ |
||
25 | 25 | |
26 | 26 | $this->container = new Container(); |
27 | 27 | $this->container->bind(Tokenizer::class, $this->getTokenizer(['scopes' => [ |
28 | - 'foo' => ['directories' => [__DIR__ . '/Interfaces/Inner'], 'exclude' => []], |
|
28 | + 'foo' => ['directories' => [__DIR__.'/Interfaces/Inner'], 'exclude' => []], |
|
29 | 29 | ]])); |
30 | 30 | $this->container->bindSingleton(ScopedInterfacesInterface::class, ScopedInterfaceLocator::class); |
31 | 31 | } |