@@ -25,8 +25,8 @@ discard block |
||
25 | 25 | use MockeryPHPUnitIntegration; |
26 | 26 | |
27 | 27 | private InterfaceLocatorByTarget $locator; |
28 | - private InterfacesInterface|m\LegacyMockInterface|m\MockInterface $interfaces; |
|
29 | - private ScopedInterfacesInterface|m\LegacyMockInterface|m\MockInterface $scopedInterfaces; |
|
28 | + private InterfacesInterface | m\LegacyMockInterface | m\MockInterface $interfaces; |
|
29 | + private ScopedInterfacesInterface | m\LegacyMockInterface | m\MockInterface $scopedInterfaces; |
|
30 | 30 | |
31 | 31 | protected function setUp(): void |
32 | 32 | { |
@@ -105,11 +105,11 @@ discard block |
||
105 | 105 | $attr = $attr->getAttributes()[0]; |
106 | 106 | $attribute = $attr->newInstance(); |
107 | 107 | |
108 | - if ($attribute->getScope() === null) { |
|
108 | + if ($attribute->getScope() === null){ |
|
109 | 109 | $this->interfaces |
110 | 110 | ->shouldReceive('getInterfaces') |
111 | 111 | ->andReturn($interfaces); |
112 | - } else { |
|
112 | + }else{ |
|
113 | 113 | $this->scopedInterfaces |
114 | 114 | ->shouldReceive('getScopedInterfaces') |
115 | 115 | ->with($attribute->getScope()) |
@@ -105,11 +105,14 @@ |
||
105 | 105 | $attr = $attr->getAttributes()[0]; |
106 | 106 | $attribute = $attr->newInstance(); |
107 | 107 | |
108 | - if ($attribute->getScope() === null) { |
|
108 | + if ($attribute->getScope() === null) |
|
109 | + { |
|
109 | 110 | $this->interfaces |
110 | 111 | ->shouldReceive('getInterfaces') |
111 | 112 | ->andReturn($interfaces); |
112 | - } else { |
|
113 | + } |
|
114 | + else |
|
115 | + { |
|
113 | 116 | $this->scopedInterfaces |
114 | 117 | ->shouldReceive('getScopedInterfaces') |
115 | 118 | ->with($attribute->getScope()) |
@@ -13,7 +13,7 @@ |
||
13 | 13 | protected function someFunction() |
14 | 14 | { |
15 | 15 | $result = $this->sampleMethod('hello world'); |
16 | - print_r(self::sampleMethod($result . 'plus')); |
|
16 | + print_r(self::sampleMethod($result.'plus')); |
|
17 | 17 | } |
18 | 18 | |
19 | 19 | public function testInstance(): void |
@@ -26,7 +26,7 @@ |
||
26 | 26 | |
27 | 27 | protected function mapDirectories(array $directories): array |
28 | 28 | { |
29 | - $dir = \dirname(__DIR__) . '/Fixtures'; |
|
29 | + $dir = \dirname(__DIR__).'/Fixtures'; |
|
30 | 30 | |
31 | 31 | return $directories + ['config' => $dir, 'app' => $dir, 'resources' => $dir, 'runtime' => $dir]; |
32 | 32 | } |
@@ -26,7 +26,7 @@ |
||
26 | 26 | |
27 | 27 | protected function mapDirectories(array $directories): array |
28 | 28 | { |
29 | - $dir = \dirname(__DIR__) . '/Fixtures'; |
|
29 | + $dir = \dirname(__DIR__).'/Fixtures'; |
|
30 | 30 | |
31 | 31 | return $directories + ['config' => $dir, 'app' => $dir, 'resources' => $dir, 'runtime' => $dir]; |
32 | 32 | } |
@@ -11,6 +11,6 @@ |
||
11 | 11 | { |
12 | 12 | public function init(TokenizerBootloader $tokenizer): void |
13 | 13 | { |
14 | - $tokenizer->addDirectory(\dirname(__DIR__, 2) . '/Fixtures/Bootloader'); |
|
14 | + $tokenizer->addDirectory(\dirname(__DIR__, 2).'/Fixtures/Bootloader'); |
|
15 | 15 | } |
16 | 16 | } |
@@ -11,7 +11,7 @@ |
||
11 | 11 | |
12 | 12 | public function __construct(array $casters = []) |
13 | 13 | { |
14 | - foreach ($casters as $caster) { |
|
14 | + foreach ($casters as $caster){ |
|
15 | 15 | $this->register($caster); |
16 | 16 | } |
17 | 17 | } |
@@ -11,7 +11,8 @@ |
||
11 | 11 | |
12 | 12 | public function __construct(array $casters = []) |
13 | 13 | { |
14 | - foreach ($casters as $caster) { |
|
14 | + foreach ($casters as $caster) |
|
15 | + { |
|
15 | 16 | $this->register($caster); |
16 | 17 | } |
17 | 18 | } |
@@ -31,9 +31,9 @@ |
||
31 | 31 | |
32 | 32 | public function updateValue(mixed $value): mixed |
33 | 33 | { |
34 | - try { |
|
34 | + try{ |
|
35 | 35 | return ($this->filter)($value, ...$this->args); |
36 | - } catch (\Throwable $e) { |
|
36 | + }catch (\Throwable $e){ |
|
37 | 37 | throw new SetterException($e); |
38 | 38 | } |
39 | 39 | } |
@@ -31,9 +31,12 @@ |
||
31 | 31 | |
32 | 32 | public function updateValue(mixed $value): mixed |
33 | 33 | { |
34 | - try { |
|
34 | + try |
|
35 | + { |
|
35 | 36 | return ($this->filter)($value, ...$this->args); |
36 | - } catch (\Throwable $e) { |
|
37 | + } |
|
38 | + catch (\Throwable $e) |
|
39 | + { |
|
37 | 40 | throw new SetterException($e); |
38 | 41 | } |
39 | 42 | } |
@@ -32,11 +32,11 @@ |
||
32 | 32 | public function hasInstance(string $alias): bool |
33 | 33 | { |
34 | 34 | $parent = $this->scope->getParent(); |
35 | - if ($parent !== null && $parent->hasInstance($alias)) { |
|
35 | + if ($parent !== null && $parent->hasInstance($alias)){ |
|
36 | 36 | return true; |
37 | 37 | } |
38 | 38 | |
39 | - if (!$this->container->has($alias)) { |
|
39 | + if (!$this->container->has($alias)){ |
|
40 | 40 | return false; |
41 | 41 | } |
42 | 42 |
@@ -32,11 +32,13 @@ |
||
32 | 32 | public function hasInstance(string $alias): bool |
33 | 33 | { |
34 | 34 | $parent = $this->scope->getParent(); |
35 | - if ($parent !== null && $parent->hasInstance($alias)) { |
|
35 | + if ($parent !== null && $parent->hasInstance($alias)) |
|
36 | + { |
|
36 | 37 | return true; |
37 | 38 | } |
38 | 39 | |
39 | - if (!$this->container->has($alias)) { |
|
40 | + if (!$this->container->has($alias)) |
|
41 | + { |
|
40 | 42 | return false; |
41 | 43 | } |
42 | 44 |
@@ -18,7 +18,7 @@ |
||
18 | 18 | { |
19 | 19 | public function testListen(): void |
20 | 20 | { |
21 | - $handler = new class($this->createMock(InvokerInterface::class)) extends JobHandler {}; |
|
21 | + $handler = new class($this->createMock(InvokerInterface::class)) extends JobHandler{}; |
|
22 | 22 | |
23 | 23 | $registry = new QueueRegistry( |
24 | 24 | new Container(), |
@@ -18,7 +18,9 @@ |
||
18 | 18 | { |
19 | 19 | public function testListen(): void |
20 | 20 | { |
21 | - $handler = new class($this->createMock(InvokerInterface::class)) extends JobHandler {}; |
|
21 | + $handler = new class($this->createMock(InvokerInterface::class)) extends JobHandler |
|
22 | + { |
|
23 | +}; |
|
22 | 24 | |
23 | 25 | $registry = new QueueRegistry( |
24 | 26 | new Container(), |