Passed
Pull Request — master (#1207)
by Aleksei
10:55
created
src/Prototype/src/Command/UsageCommand.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     public function perform(): int
16 16
     {
17 17
         $prototyped = $this->locator->getTargetClasses();
18
-        if ($prototyped === []) {
18
+        if ($prototyped === []){
19 19
             $this->writeln('<comment>No prototyped classes found.</comment>');
20 20
 
21 21
             return self::SUCCESS;
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 
24 24
         $grid = $this->table(['Class:', 'Property:', 'Target:']);
25 25
 
26
-        foreach ($prototyped as $class) {
26
+        foreach ($prototyped as $class){
27 27
             $proto = $this->getPrototypeProperties($class, $prototyped);
28 28
 
29 29
             $grid->addRow([$class->getName(), $this->mergeNames($proto), $this->mergeTargets($proto)]);
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,8 @@  discard block
 block discarded – undo
15 15
     public function perform(): int
16 16
     {
17 17
         $prototyped = $this->locator->getTargetClasses();
18
-        if ($prototyped === []) {
18
+        if ($prototyped === [])
19
+        {
19 20
             $this->writeln('<comment>No prototyped classes found.</comment>');
20 21
 
21 22
             return self::SUCCESS;
@@ -23,7 +24,8 @@  discard block
 block discarded – undo
23 24
 
24 25
         $grid = $this->table(['Class:', 'Property:', 'Target:']);
25 26
 
26
-        foreach ($prototyped as $class) {
27
+        foreach ($prototyped as $class)
28
+        {
27 29
             $proto = $this->getPrototypeProperties($class, $prototyped);
28 30
 
29 31
             $grid->addRow([$class->getName(), $this->mergeNames($proto), $this->mergeTargets($proto)]);
Please login to merge, or discard this patch.
src/Prototype/src/Config/PrototypeConfig.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,6 +27,6 @@
 block discarded – undo
27 27
      */
28 28
     public function getBindings(): array
29 29
     {
30
-        return (array) ($this->config['bindings'] ?? []);
30
+        return (array)($this->config['bindings'] ?? []);
31 31
     }
32 32
 }
Please login to merge, or discard this patch.
src/Prototype/src/Command/ListCommand.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
     public function perform(): int
13 13
     {
14 14
         $bindings = $this->getRegistry()->getPropertyBindings();
15
-        if ($bindings === []) {
15
+        if ($bindings === []){
16 16
             $this->comment('No prototype dependencies found.');
17 17
 
18 18
             return self::SUCCESS;
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 
21 21
         $grid = $this->table(['Name:', 'Target:']);
22 22
 
23
-        foreach ($bindings as $binding) {
23
+        foreach ($bindings as $binding){
24 24
             $grid->addRow([$binding->property, $binding->type->name()]);
25 25
         }
26 26
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,8 @@  discard block
 block discarded – undo
12 12
     public function perform(): int
13 13
     {
14 14
         $bindings = $this->getRegistry()->getPropertyBindings();
15
-        if ($bindings === []) {
15
+        if ($bindings === [])
16
+        {
16 17
             $this->comment('No prototype dependencies found.');
17 18
 
18 19
             return self::SUCCESS;
@@ -20,7 +21,8 @@  discard block
 block discarded – undo
20 21
 
21 22
         $grid = $this->table(['Name:', 'Target:']);
22 23
 
23
-        foreach ($bindings as $binding) {
24
+        foreach ($bindings as $binding)
25
+        {
24 26
             $grid->addRow([$binding->property, $binding->type->name()]);
25 27
         }
26 28
 
Please login to merge, or discard this patch.
src/Prototype/src/Command/DumpCommand.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
     public function perform(Writer $writer): int
24 24
     {
25 25
         $dependencies = $this->getRegistry()->getPropertyBindings();
26
-        if ($dependencies === []) {
26
+        if ($dependencies === []){
27 27
             $this->comment('No prototyped shortcuts found.');
28 28
 
29 29
             return self::SUCCESS;
@@ -35,22 +35,22 @@  discard block
 block discarded – undo
35 35
         $file = FileDeclaration::fromReflection($ref);
36 36
         $trait = $file->getTrait(PrototypeTrait::class);
37 37
 
38
-        try {
38
+        try{
39 39
             $this->buildAnnotation($trait, $dependencies);
40 40
 
41 41
             $writer->write($ref->getFileName(), $file);
42
-        } catch (\Throwable $e) {
43
-            $this->write('<fg=red>' . $e->getMessage() . "</fg=red>\n");
42
+        }catch (\Throwable $e){
43
+            $this->write('<fg=red>'.$e->getMessage()."</fg=red>\n");
44 44
 
45 45
             return self::FAILURE;
46 46
         }
47 47
 
48 48
         $this->write("<fg=green>complete</fg=green>\n");
49 49
 
50
-        if ($this->isVerbose()) {
50
+        if ($this->isVerbose()){
51 51
             $grid = $this->table(['Property:', 'Target:']);
52 52
 
53
-            foreach ($dependencies as $dependency) {
53
+            foreach ($dependencies as $dependency){
54 54
                 $grid->addRow([$dependency->var, $dependency->type->fullName]);
55 55
             }
56 56
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         $trait->addComment('This DocComment is auto-generated, do not edit or commit this file to repository.');
67 67
         $trait->addComment('');
68 68
 
69
-        foreach ($dependencies as $dependency) {
69
+        foreach ($dependencies as $dependency){
70 70
             $trait->addComment(\sprintf('@property \\%s $%s', $dependency->type->fullName, $dependency->var));
71 71
         }
72 72
     }
Please login to merge, or discard this patch.
Braces   +13 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,7 +23,8 @@  discard block
 block discarded – undo
23 23
     public function perform(Writer $writer): int
24 24
     {
25 25
         $dependencies = $this->getRegistry()->getPropertyBindings();
26
-        if ($dependencies === []) {
26
+        if ($dependencies === [])
27
+        {
27 28
             $this->comment('No prototyped shortcuts found.');
28 29
 
29 30
             return self::SUCCESS;
@@ -35,11 +36,14 @@  discard block
 block discarded – undo
35 36
         $file = FileDeclaration::fromReflection($ref);
36 37
         $trait = $file->getTrait(PrototypeTrait::class);
37 38
 
38
-        try {
39
+        try
40
+        {
39 41
             $this->buildAnnotation($trait, $dependencies);
40 42
 
41 43
             $writer->write($ref->getFileName(), $file);
42
-        } catch (\Throwable $e) {
44
+        }
45
+        catch (\Throwable $e)
46
+        {
43 47
             $this->write('<fg=red>' . $e->getMessage() . "</fg=red>\n");
44 48
 
45 49
             return self::FAILURE;
@@ -47,10 +51,12 @@  discard block
 block discarded – undo
47 51
 
48 52
         $this->write("<fg=green>complete</fg=green>\n");
49 53
 
50
-        if ($this->isVerbose()) {
54
+        if ($this->isVerbose())
55
+        {
51 56
             $grid = $this->table(['Property:', 'Target:']);
52 57
 
53
-            foreach ($dependencies as $dependency) {
58
+            foreach ($dependencies as $dependency)
59
+            {
54 60
                 $grid->addRow([$dependency->var, $dependency->type->fullName]);
55 61
             }
56 62
 
@@ -66,7 +72,8 @@  discard block
 block discarded – undo
66 72
         $trait->addComment('This DocComment is auto-generated, do not edit or commit this file to repository.');
67 73
         $trait->addComment('');
68 74
 
69
-        foreach ($dependencies as $dependency) {
75
+        foreach ($dependencies as $dependency)
76
+        {
70 77
             $trait->addComment(\sprintf('@property \\%s $%s', $dependency->type->fullName, $dependency->var));
71 78
         }
72 79
     }
Please login to merge, or discard this patch.
src/Boot/src/Bootloader/BootloaderRegistryInterface.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
      *  1. SimpleBootloader::class,
17 17
      *  2. [SimpleBootloader::class => ['option' => 'value']]
18 18
      */
19
-    public function registerSystem(string|array $bootloader): void;
19
+    public function registerSystem(string | array $bootloader): void;
20 20
 
21 21
     /**
22 22
      * @param TClass|array<TClass, array<string, mixed>> $bootloader
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      *  1. SimpleBootloader::class,
26 26
      *  2. [SimpleBootloader::class => ['option' => 'value']]
27 27
      */
28
-    public function register(string|array $bootloader): void;
28
+    public function register(string | array $bootloader): void;
29 29
 
30 30
     /**
31 31
      * @return array<TClass>|array<TClass, array<string, mixed>>
Please login to merge, or discard this patch.
src/Filters/src/Model/Mapper/EnumCaster.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,9 +26,9 @@
 block discarded – undo
26 26
          */
27 27
         $enum = $type->getName();
28 28
 
29
-        try {
29
+        try{
30 30
             $property->setValue($filter, $value instanceof $enum ? $value : $enum::from($value));
31
-        } catch (\Throwable $e) {
31
+        }catch (\Throwable $e){
32 32
             throw new SetterException(
33 33
                 previous: $e,
34 34
                 message: \sprintf('Unable to set enum value. %s', $e->getMessage()),
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,9 +26,12 @@
 block discarded – undo
26 26
          */
27 27
         $enum = $type->getName();
28 28
 
29
-        try {
29
+        try
30
+        {
30 31
             $property->setValue($filter, $value instanceof $enum ? $value : $enum::from($value));
31
-        } catch (\Throwable $e) {
32
+        }
33
+        catch (\Throwable $e)
34
+        {
32 35
             throw new SetterException(
33 36
                 previous: $e,
34 37
                 message: \sprintf('Unable to set enum value. %s', $e->getMessage()),
Please login to merge, or discard this patch.
src/Filters/src/Model/Mapper/DefaultCaster.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,9 +16,9 @@
 block discarded – undo
16 16
 
17 17
     public function setValue(FilterInterface $filter, \ReflectionProperty $property, mixed $value): void
18 18
     {
19
-        try {
19
+        try{
20 20
             $property->setValue($filter, $value);
21
-        } catch (\Throwable $e) {
21
+        }catch (\Throwable $e){
22 22
             throw new SetterException(
23 23
                 previous: $e,
24 24
                 message: \sprintf('Unable to set value. %s', $e->getMessage()),
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,9 +16,12 @@
 block discarded – undo
16 16
 
17 17
     public function setValue(FilterInterface $filter, \ReflectionProperty $property, mixed $value): void
18 18
     {
19
-        try {
19
+        try
20
+        {
20 21
             $property->setValue($filter, $value);
21
-        } catch (\Throwable $e) {
22
+        }
23
+        catch (\Throwable $e)
24
+        {
22 25
             throw new SetterException(
23 26
                 previous: $e,
24 27
                 message: \sprintf('Unable to set value. %s', $e->getMessage()),
Please login to merge, or discard this patch.
src/Boot/tests/Fixtures/Attribute/TargetWorker.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Boot/src/BootloadManager/Checker/BootloaderCheckerInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,5 +12,5 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.