Passed
Pull Request — master (#254)
by Valentin
02:25
created
src/Bootloader/Auth/AuthBootloader.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
      */
53 53
     public function getActor(TokenInterface $token): ?object
54 54
     {
55
-        foreach ($this->getProviders() as $provider) {
56
-            if (!$provider instanceof ActorProviderInterface) {
55
+        foreach ($this->getProviders() as $provider){
56
+            if (!$provider instanceof ActorProviderInterface){
57 57
                 throw new AuthException(
58 58
                     sprintf(
59 59
                         'Expected `ActorProviderInterface`, got `%s`',
@@ -63,12 +63,12 @@  discard block
 block discarded – undo
63 63
             }
64 64
 
65 65
             $actor = $provider->getActor($token);
66
-            if ($actor !== null) {
66
+            if ($actor !== null){
67 67
                 return $actor;
68 68
             }
69 69
         }
70 70
 
71
-        if ($this->actorProvider === []) {
71
+        if ($this->actorProvider === []){
72 72
             throw new AuthException('No actor provider');
73 73
         }
74 74
 
@@ -90,13 +90,13 @@  discard block
 block discarded – undo
90 90
      */
91 91
     private function getProviders(): \Generator
92 92
     {
93
-        foreach ($this->actorProvider as $provider) {
94
-            if ($provider instanceof Autowire) {
93
+        foreach ($this->actorProvider as $provider){
94
+            if ($provider instanceof Autowire){
95 95
                 yield $provider->resolve($this->factory);
96 96
                 continue;
97 97
             }
98 98
 
99
-            if (is_object($provider)) {
99
+            if (is_object($provider)){
100 100
                 yield $provider;
101 101
                 continue;
102 102
             }
Please login to merge, or discard this patch.
src/Validation/Checker/EntityChecker.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
         $values = $this->withValues($withFields);
52 52
         $values[$field] = $value;
53 53
 
54
-        if ($this->isProvidedByContext($values)) {
54
+        if ($this->isProvidedByContext($values)){
55 55
             return true;
56 56
         }
57 57
 
@@ -65,9 +65,9 @@  discard block
 block discarded – undo
65 65
     private function withValues(array $fields): array
66 66
     {
67 67
         $values = [];
68
-        foreach ($fields as $field) {
68
+        foreach ($fields as $field){
69 69
             $value = $this->getValidator()->getValue($field);
70
-            if ($value !== null) {
70
+            if ($value !== null){
71 71
                 $values[$field] = $value;
72 72
             }
73 73
         }
@@ -82,12 +82,12 @@  discard block
 block discarded – undo
82 82
     private function isProvidedByContext(array $values): bool
83 83
     {
84 84
         $context = $this->getValidator()->getContext()[static::class] ?? [];
85
-        if (!is_array($context)) {
85
+        if (!is_array($context)){
86 86
             return false;
87 87
         }
88 88
 
89
-        foreach ($values as $field => $value) {
90
-            if (!isset($context[$field]) || $context[$field] !== $value) {
89
+        foreach ($values as $field => $value){
90
+            if (!isset($context[$field]) || $context[$field] !== $value){
91 91
                 return false;
92 92
             }
93 93
         }
Please login to merge, or discard this patch.