Passed
Push — master ( 24c04a...5c4bac )
by butschster
15:41 queued 05:00
created
src/Framework/Bootloader/DebugBootloader.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         private readonly FactoryInterface $factory,
37 37
         private readonly InvokerInterface $invoker,
38 38
         private readonly ConfiguratorInterface $config,
39
-    ) {
39
+    ){
40 40
     }
41 41
 
42 42
     /**
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      * @param non-empty-string $key
53 53
      * @param TTag $value
54 54
      */
55
-    public function addTag(string $key, string|\Stringable|\Closure $value): void
55
+    public function addTag(string $key, string | \Stringable | \Closure $value): void
56 56
     {
57 57
         $this->config->modify(DebugConfig::CONFIG, new Append('tags', $key, $value));
58 58
     }
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     /**
61 61
      * @psalm-param TCollector $collector
62 62
      */
63
-    public function addStateCollector(string|StateCollectorInterface|Autowire $collector): void
63
+    public function addStateCollector(string | StateCollectorInterface | Autowire $collector): void
64 64
     {
65 65
         $this->config->modify(DebugConfig::CONFIG, new Append('collectors', null, $collector));
66 66
     }
@@ -72,29 +72,29 @@  discard block
 block discarded – undo
72 72
     {
73 73
         $state = new State();
74 74
 
75
-        foreach ($config->getTags() as $key => $value) {
76
-            if ($value instanceof \Closure) {
75
+        foreach ($config->getTags() as $key => $value){
76
+            if ($value instanceof \Closure){
77 77
                 $value = $this->invoker->invoke($value);
78 78
             }
79 79
 
80
-            if (!\is_string($value) && !$value instanceof \Stringable) {
80
+            if (!\is_string($value) && !$value instanceof \Stringable){
81 81
                 throw new StateException(\sprintf(
82 82
                     'Invalid tag value, `string` expected got `%s`',
83 83
                     \is_object($value) ? $value::class : \gettype($value)
84 84
                 ));
85 85
             }
86 86
 
87
-            $state->setTag((string) $key, (string) $value);
87
+            $state->setTag((string)$key, (string)$value);
88 88
         }
89 89
 
90
-        foreach ($config->getCollectors() as $collector) {
90
+        foreach ($config->getCollectors() as $collector){
91 91
             $collector = match (true) {
92 92
                 \is_string($collector) => $this->factory->make($collector),
93 93
                 $collector instanceof Autowire => $collector->resolve($this->factory),
94 94
                 default => $collector,
95 95
             };
96 96
 
97
-            if (!$collector instanceof StateCollectorInterface) {
97
+            if (!$collector instanceof StateCollectorInterface){
98 98
                 throw new StateException(
99 99
                     \sprintf(
100 100
                         'Unable to populate state, invalid state collector %s',
Please login to merge, or discard this patch.
Braces   +10 added lines, -5 removed lines patch added patch discarded remove patch
@@ -72,12 +72,15 @@  discard block
 block discarded – undo
72 72
     {
73 73
         $state = new State();
74 74
 
75
-        foreach ($config->getTags() as $key => $value) {
76
-            if ($value instanceof \Closure) {
75
+        foreach ($config->getTags() as $key => $value)
76
+        {
77
+            if ($value instanceof \Closure)
78
+            {
77 79
                 $value = $this->invoker->invoke($value);
78 80
             }
79 81
 
80
-            if (!\is_string($value) && !$value instanceof \Stringable) {
82
+            if (!\is_string($value) && !$value instanceof \Stringable)
83
+            {
81 84
                 throw new StateException(\sprintf(
82 85
                     'Invalid tag value, `string` expected got `%s`',
83 86
                     \is_object($value) ? $value::class : \gettype($value)
@@ -87,14 +90,16 @@  discard block
 block discarded – undo
87 90
             $state->setTag((string) $key, (string) $value);
88 91
         }
89 92
 
90
-        foreach ($config->getCollectors() as $collector) {
93
+        foreach ($config->getCollectors() as $collector)
94
+        {
91 95
             $collector = match (true) {
92 96
                 \is_string($collector) => $this->factory->make($collector),
93 97
                 $collector instanceof Autowire => $collector->resolve($this->factory),
94 98
                 default => $collector,
95 99
             };
96 100
 
97
-            if (!$collector instanceof StateCollectorInterface) {
101
+            if (!$collector instanceof StateCollectorInterface)
102
+            {
98 103
                 throw new StateException(
99 104
                     \sprintf(
100 105
                         'Unable to populate state, invalid state collector %s',
Please login to merge, or discard this patch.