@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | { |
16 | 16 | public function __construct( |
17 | 17 | private InputManager $input, |
18 | - ) { |
|
18 | + ){ |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | public function withPrefix(string $prefix, bool $add = true): InputInterface |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | |
29 | 29 | public function getValue(string $source, mixed $name = null): mixed |
30 | 30 | { |
31 | - if (!$this->input->hasBag($source) && !\method_exists($this->input, $source)) { |
|
31 | + if (!$this->input->hasBag($source) && !\method_exists($this->input, $source)){ |
|
32 | 32 | throw new InputException(\sprintf('Undefined input source %s', $source)); |
33 | 33 | } |
34 | 34 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | public function hasValue(string $source, string $name): bool |
39 | 39 | { |
40 | - if (!$this->input->hasBag($source)) { |
|
40 | + if (!$this->input->hasBag($source)){ |
|
41 | 41 | return false; |
42 | 42 | } |
43 | 43 |
@@ -28,7 +28,8 @@ discard block |
||
28 | 28 | |
29 | 29 | public function getValue(string $source, mixed $name = null): mixed |
30 | 30 | { |
31 | - if (!$this->input->hasBag($source) && !\method_exists($this->input, $source)) { |
|
31 | + if (!$this->input->hasBag($source) && !\method_exists($this->input, $source)) |
|
32 | + { |
|
32 | 33 | throw new InputException(\sprintf('Undefined input source %s', $source)); |
33 | 34 | } |
34 | 35 | |
@@ -37,7 +38,8 @@ discard block |
||
37 | 38 | |
38 | 39 | public function hasValue(string $source, string $name): bool |
39 | 40 | { |
40 | - if (!$this->input->hasBag($source)) { |
|
41 | + if (!$this->input->hasBag($source)) |
|
42 | + { |
|
41 | 43 | return false; |
42 | 44 | } |
43 | 45 |
@@ -9,10 +9,12 @@ |
||
9 | 9 | |
10 | 10 | final class UpdateClass |
11 | 11 | { |
12 | - public function do(OutputInterface $output): void |
|
12 | + public function do{ |
|
13 | + (OutputInterface $output): void |
|
13 | 14 | { |
14 | 15 | $output->write('OK'); |
15 | 16 | } |
17 | + } |
|
16 | 18 | |
17 | 19 | public function err(OutputInterface $output): void |
18 | 20 | { |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | #[DataProvider('serializersDataProvider')] |
82 | 82 | public function testDefaultSerializer( |
83 | 83 | SerializerRegistry $registry, |
84 | - string|SerializerInterface|Autowire $serializer |
|
84 | + string | SerializerInterface | Autowire $serializer |
|
85 | 85 | ): void { |
86 | 86 | $this->mockContainer->bind(QueueConfig::class, new QueueConfig(['defaultSerializer' => $serializer])); |
87 | 87 | $this->mockContainer->bind(SerializerRegistryInterface::class, $registry); |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | } |
91 | 91 | |
92 | 92 | #[DataProvider('serializersDataProvider')] |
93 | - public function testSerializer(SerializerRegistry $registry, string|SerializerInterface|Autowire $serializer): void |
|
93 | + public function testSerializer(SerializerRegistry $registry, string | SerializerInterface | Autowire $serializer): void |
|
94 | 94 | { |
95 | 95 | $this->mockContainer->bind(SerializerRegistryInterface::class, $registry); |
96 | 96 |
@@ -18,9 +18,9 @@ |
||
18 | 18 | |
19 | 19 | public static function trailingProvider(): \Traversable |
20 | 20 | { |
21 | - yield ['name7', 7, 'name',]; |
|
22 | - yield ['name', 0, 'name',]; |
|
23 | - yield ['name0', 0, 'name',]; |
|
21 | + yield ['name7', 7, 'name', ]; |
|
22 | + yield ['name', 0, 'name', ]; |
|
23 | + yield ['name0', 0, 'name', ]; |
|
24 | 24 | yield ['name1', 1, 'name']; |
25 | 25 | yield ['name-1', 1, 'name-']; |
26 | 26 | yield ['name-1', -1, 'name']; |
@@ -22,15 +22,15 @@ |
||
22 | 22 | // empty input |
23 | 23 | yield [[], 5, 5]; |
24 | 24 | // in the gap (not taken) |
25 | - yield [[3, 4, 8, 9,], 6, 6]; |
|
26 | - yield [[3, 4, 8, 9,], 1, 1]; |
|
25 | + yield [[3, 4, 8, 9, ], 6, 6]; |
|
26 | + yield [[3, 4, 8, 9, ], 1, 1]; |
|
27 | 27 | // in the sequence (taken) |
28 | - yield [[3, 4, 8, 9,], 4, 0]; |
|
29 | - yield [[0, 1, 4, 5,], 5, 2]; |
|
28 | + yield [[3, 4, 8, 9, ], 4, 0]; |
|
29 | + yield [[0, 1, 4, 5, ], 5, 2]; |
|
30 | 30 | // do not use "1" |
31 | - yield [[0, 3, 4, 8,], 4, 2]; |
|
31 | + yield [[0, 3, 4, 8, ], 4, 2]; |
|
32 | 32 | // full sequence, take next |
33 | - yield [[0, 1, 2, 3,], 3, 4]; |
|
33 | + yield [[0, 1, 2, 3, ], 3, 4]; |
|
34 | 34 | yield [[0], 0, 2]; |
35 | 35 | } |
36 | 36 |
@@ -21,7 +21,7 @@ |
||
21 | 21 | #[DataProvider('listenersDataProvider')] |
22 | 22 | public function testProcess(array $listener, array $args): void |
23 | 23 | { |
24 | - $registry = new class() implements ListenerRegistryInterface { |
|
24 | + $registry = new class() implements ListenerRegistryInterface{ |
|
25 | 25 | |
26 | 26 | public string $event; |
27 | 27 | public \Closure $listener; |
@@ -21,7 +21,8 @@ |
||
21 | 21 | #[DataProvider('listenersDataProvider')] |
22 | 22 | public function testProcess(array $listener, array $args): void |
23 | 23 | { |
24 | - $registry = new class() implements ListenerRegistryInterface { |
|
24 | + $registry = new class() implements ListenerRegistryInterface |
|
25 | + { |
|
25 | 26 | |
26 | 27 | public string $event; |
27 | 28 | public \Closure $listener; |
@@ -40,7 +40,7 @@ |
||
40 | 40 | public function testAllows(): void |
41 | 41 | { |
42 | 42 | $this->permission->method('hasRole') |
43 | - ->willReturnCallback(function (...$args) { |
|
43 | + ->willReturnCallback(function (...$args){ |
|
44 | 44 | static $series = [ |
45 | 45 | [['user'], false], |
46 | 46 | [['admin'], true], |
@@ -40,7 +40,8 @@ |
||
40 | 40 | public function testAllows(): void |
41 | 41 | { |
42 | 42 | $this->permission->method('hasRole') |
43 | - ->willReturnCallback(function (...$args) { |
|
43 | + ->willReturnCallback(function (...$args) |
|
44 | + { |
|
44 | 45 | static $series = [ |
45 | 46 | [['user'], false], |
46 | 47 | [['admin'], true], |
@@ -78,7 +78,8 @@ |
||
78 | 78 | |
79 | 79 | $this->rules->method('has')->willReturn(true); |
80 | 80 | $this->rules->method('get') |
81 | - ->willReturnCallback(function (...$args) use (&$series) { |
|
81 | + ->willReturnCallback(function (...$args) use (&$series) |
|
82 | + { |
|
82 | 83 | [$expectedArgs, $return] = \array_shift($series); |
83 | 84 | self::assertSame($expectedArgs, $args); |
84 | 85 |
@@ -91,8 +91,8 @@ |
||
91 | 91 | self::assertEquals($allowRule, $manager->getRule(static::ROLE, static::PERMISSION)); |
92 | 92 | |
93 | 93 | // test pattern permission |
94 | - self::assertEquals($manager, $manager->associate(static::ROLE, static::PERMISSION . '.*', AllowRule::class)); |
|
95 | - self::assertEquals($allowRule, $manager->getRule(static::ROLE, static::PERMISSION . '.' . static::PERMISSION)); |
|
94 | + self::assertEquals($manager, $manager->associate(static::ROLE, static::PERMISSION.'.*', AllowRule::class)); |
|
95 | + self::assertEquals($allowRule, $manager->getRule(static::ROLE, static::PERMISSION.'.'.static::PERMISSION)); |
|
96 | 96 | |
97 | 97 | self::assertEquals($manager, $manager->deassociate(static::ROLE, static::PERMISSION)); |
98 | 98 | self::assertEquals($forbidRule, $manager->getRule(static::ROLE, static::PERMISSION)); |
@@ -22,7 +22,7 @@ |
||
22 | 22 | public function setUp(): void |
23 | 23 | { |
24 | 24 | $this->app = TestApp::create([ |
25 | - 'root' => __DIR__ . '/App', |
|
25 | + 'root' => __DIR__.'/App', |
|
26 | 26 | ], false)->run(); |
27 | 27 | } |
28 | 28 | } |