Test Failed
Pull Request — master (#872)
by Maxim
08:41
created
src/Console/src/Configurator/Configurator.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,13 +16,13 @@
 block discarded – undo
16 16
      */
17 17
     public function __construct(
18 18
         private readonly array $configurators = []
19
-    ) {
19
+    ){
20 20
     }
21 21
 
22 22
     public function configure(Command $command, \ReflectionClass $reflection): void
23 23
     {
24
-        foreach ($this->configurators as $configurator) {
25
-            if ($configurator->canConfigure($command, $reflection)) {
24
+        foreach ($this->configurators as $configurator){
25
+            if ($configurator->canConfigure($command, $reflection)){
26 26
                 $configurator->configure($command, $reflection);
27 27
                 return;
28 28
             }
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,10 @@
 block discarded – undo
21 21
 
22 22
     public function configure(Command $command, \ReflectionClass $reflection): void
23 23
     {
24
-        foreach ($this->configurators as $configurator) {
25
-            if ($configurator->canConfigure($command, $reflection)) {
24
+        foreach ($this->configurators as $configurator)
25
+        {
26
+            if ($configurator->canConfigure($command, $reflection))
27
+            {
26 28
                 $configurator->configure($command, $reflection);
27 29
                 return;
28 30
             }
Please login to merge, or discard this patch.
src/Console/src/Configurator/SignatureConfigurator.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 {
15 15
     public function __construct(
16 16
         private readonly Parser $parser
17
-    ) {
17
+    ){
18 18
     }
19 19
 
20 20
     public function canConfigure(Command $command, \ReflectionClass $reflection): bool
@@ -24,15 +24,15 @@  discard block
 block discarded – undo
24 24
 
25 25
     public function configure(Command $command, \ReflectionClass $reflection): void
26 26
     {
27
-        $result = $this->parser->parse((string) $reflection->getConstant('SIGNATURE'));
27
+        $result = $this->parser->parse((string)$reflection->getConstant('SIGNATURE'));
28 28
 
29 29
         $command->setName($result->name);
30 30
 
31
-        foreach ($result->options as $option) {
31
+        foreach ($result->options as $option){
32 32
             $command->getDefinition()->addOption($option);
33 33
         }
34 34
 
35
-        foreach ($result->arguments as $argument) {
35
+        foreach ($result->arguments as $argument){
36 36
             $command->getDefinition()->addArgument($argument);
37 37
         }
38 38
     }
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,11 +28,13 @@
 block discarded – undo
28 28
 
29 29
         $command->setName($result->name);
30 30
 
31
-        foreach ($result->options as $option) {
31
+        foreach ($result->options as $option)
32
+        {
32 33
             $command->getDefinition()->addOption($option);
33 34
         }
34 35
 
35
-        foreach ($result->arguments as $argument) {
36
+        foreach ($result->arguments as $argument)
37
+        {
36 38
             $command->getDefinition()->addArgument($argument);
37 39
         }
38 40
     }
Please login to merge, or discard this patch.
src/Console/src/PromptArguments.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -16,15 +16,15 @@  discard block
 block discarded – undo
16 16
 {
17 17
     public function __construct(
18 18
         protected readonly ReaderInterface $reader
19
-    ) {
19
+    ){
20 20
     }
21 21
 
22 22
     public function promptMissedArguments(Command $command, InputInterface $input, OutputInterface $output): void
23 23
     {
24 24
         $io = new SymfonyStyle($input, $output);
25 25
 
26
-        foreach ($command->getDefinition()->getArguments() as $argument) {
27
-            if ($argument->isRequired() && $input->getArgument($argument->getName()) === null) {
26
+        foreach ($command->getDefinition()->getArguments() as $argument){
27
+            if ($argument->isRequired() && $input->getArgument($argument->getName()) === null){
28 28
                 $input->setArgument(
29 29
                     $argument->getName(),
30 30
                     $io->ask($this->getQuestion($command, $argument))
@@ -37,25 +37,25 @@  discard block
 block discarded – undo
37 37
     {
38 38
         $reflection = new \ReflectionClass($command);
39 39
 
40
-        foreach ($this->reader->getClassMetadata($reflection, Question::class) as $question) {
41
-            if ($question->argument === null) {
40
+        foreach ($this->reader->getClassMetadata($reflection, Question::class) as $question){
41
+            if ($question->argument === null){
42 42
                 throw new ConsoleException(
43 43
                     'When using a `Question` attribute on a console command class, the argument parameter is required.'
44 44
                 );
45 45
             }
46 46
 
47
-            if ($argument->getName() === $question->argument) {
47
+            if ($argument->getName() === $question->argument){
48 48
                 return $question->question;
49 49
             }
50 50
         }
51 51
 
52
-        foreach ($reflection->getProperties() as $property) {
52
+        foreach ($reflection->getProperties() as $property){
53 53
             $question = $this->reader->firstPropertyMetadata($property, Question::class);
54
-            if ($question === null) {
54
+            if ($question === null){
55 55
                 continue;
56 56
             }
57 57
 
58
-            if ($argument->getName() === ($question->argument ?? $property->getName())) {
58
+            if ($argument->getName() === ($question->argument ?? $property->getName())){
59 59
                 return $question->question;
60 60
             }
61 61
         }
Please login to merge, or discard this patch.
Braces   +16 added lines, -8 removed lines patch added patch discarded remove patch
@@ -23,8 +23,10 @@  discard block
 block discarded – undo
23 23
     {
24 24
         $io = new SymfonyStyle($input, $output);
25 25
 
26
-        foreach ($command->getDefinition()->getArguments() as $argument) {
27
-            if ($argument->isRequired() && $input->getArgument($argument->getName()) === null) {
26
+        foreach ($command->getDefinition()->getArguments() as $argument)
27
+        {
28
+            if ($argument->isRequired() && $input->getArgument($argument->getName()) === null)
29
+            {
28 30
                 $input->setArgument(
29 31
                     $argument->getName(),
30 32
                     $io->ask($this->getQuestion($command, $argument))
@@ -37,25 +39,31 @@  discard block
 block discarded – undo
37 39
     {
38 40
         $reflection = new \ReflectionClass($command);
39 41
 
40
-        foreach ($this->reader->getClassMetadata($reflection, Question::class) as $question) {
41
-            if ($question->argument === null) {
42
+        foreach ($this->reader->getClassMetadata($reflection, Question::class) as $question)
43
+        {
44
+            if ($question->argument === null)
45
+            {
42 46
                 throw new ConsoleException(
43 47
                     'When using a `Question` attribute on a console command class, the argument parameter is required.'
44 48
                 );
45 49
             }
46 50
 
47
-            if ($argument->getName() === $question->argument) {
51
+            if ($argument->getName() === $question->argument)
52
+            {
48 53
                 return $question->question;
49 54
             }
50 55
         }
51 56
 
52
-        foreach ($reflection->getProperties() as $property) {
57
+        foreach ($reflection->getProperties() as $property)
58
+        {
53 59
             $question = $this->reader->firstPropertyMetadata($property, Question::class);
54
-            if ($question === null) {
60
+            if ($question === null)
61
+            {
55 62
                 continue;
56 63
             }
57 64
 
58
-            if ($argument->getName() === ($question->argument ?? $property->getName())) {
65
+            if ($argument->getName() === ($question->argument ?? $property->getName()))
66
+            {
59 67
                 return $question->question;
60 68
             }
61 69
         }
Please login to merge, or discard this patch.
src/Console/src/Command.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      */
76 76
     protected function execute(InputInterface $input, OutputInterface $output): int
77 77
     {
78
-        if ($this->container === null) {
78
+        if ($this->container === null){
79 79
             throw new ScopeException('Container is not set');
80 80
         }
81 81
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 
84 84
         $core = $this->buildCore();
85 85
 
86
-        try {
86
+        try{
87 87
             [$this->input, $this->output] = [$this->prepareInput($input), $this->prepareOutput($input, $output)];
88 88
 
89 89
             $this->eventDispatcher?->dispatch(new CommandStarting($this, $this->input, $this->output));
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
             $this->eventDispatcher?->dispatch(new CommandFinished($this, $code, $this->input, $this->output));
99 99
 
100 100
             return $code;
101
-        } finally {
101
+        }finally{
102 102
             [$this->input, $this->output] = [null, null];
103 103
         }
104 104
     }
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 
110 110
         $interceptableCore = new InterceptableCore($core, $this->eventDispatcher);
111 111
 
112
-        foreach ($this->interceptors as $interceptor) {
112
+        foreach ($this->interceptors as $interceptor){
113 113
             $interceptableCore->addInterceptor($this->container->get($interceptor));
114 114
         }
115 115
         $interceptableCore->addInterceptor($this->container->get(AttributeInterceptor::class));
Please login to merge, or discard this patch.
Braces   +9 added lines, -4 removed lines patch added patch discarded remove patch
@@ -75,7 +75,8 @@  discard block
 block discarded – undo
75 75
      */
76 76
     protected function execute(InputInterface $input, OutputInterface $output): int
77 77
     {
78
-        if ($this->container === null) {
78
+        if ($this->container === null)
79
+        {
79 80
             throw new ScopeException('Container is not set');
80 81
         }
81 82
 
@@ -83,7 +84,8 @@  discard block
 block discarded – undo
83 84
 
84 85
         $core = $this->buildCore();
85 86
 
86
-        try {
87
+        try
88
+        {
87 89
             [$this->input, $this->output] = [$this->prepareInput($input), $this->prepareOutput($input, $output)];
88 90
 
89 91
             $this->eventDispatcher?->dispatch(new CommandStarting($this, $this->input, $this->output));
@@ -98,7 +100,9 @@  discard block
 block discarded – undo
98 100
             $this->eventDispatcher?->dispatch(new CommandFinished($this, $code, $this->input, $this->output));
99 101
 
100 102
             return $code;
101
-        } finally {
103
+        }
104
+        finally
105
+        {
102 106
             [$this->input, $this->output] = [null, null];
103 107
         }
104 108
     }
@@ -109,7 +113,8 @@  discard block
 block discarded – undo
109 113
 
110 114
         $interceptableCore = new InterceptableCore($core, $this->eventDispatcher);
111 115
 
112
-        foreach ($this->interceptors as $interceptor) {
116
+        foreach ($this->interceptors as $interceptor)
117
+        {
113 118
             $interceptableCore->addInterceptor($this->container->get($interceptor));
114 119
         }
115 120
         $interceptableCore->addInterceptor($this->container->get(AttributeInterceptor::class));
Please login to merge, or discard this patch.
src/Console/src/Interceptor/AttributeInterceptor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 {
15 15
     public function __construct(
16 16
         private readonly Parser $parser
17
-    ) {
17
+    ){
18 18
     }
19 19
 
20 20
     public function process(string $controller, string $action, array $parameters, CoreInterface $core): int
Please login to merge, or discard this patch.