Passed
Push — master ( 2bfe4c...b8342c )
by butschster
06:24 queued 12s
created
src/Translator/src/Indexer.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      */
54 54
     public function registerMessage(string $domain, string $string, bool $resolveDomain = true): void
55 55
     {
56
-        if ($resolveDomain) {
56
+        if ($resolveDomain){
57 57
             $domain = $this->config->resolveDomain($domain);
58 58
         }
59 59
 
@@ -72,9 +72,9 @@  discard block
 block discarded – undo
72 72
      */
73 73
     public function indexClasses(ScopedClassesInterface $locator): void
74 74
     {
75
-        foreach ($locator->getScopedClasses('translations', TranslatorTrait::class) as $class) {
75
+        foreach ($locator->getScopedClasses('translations', TranslatorTrait::class) as $class){
76 76
             $strings = $this->fetchMessages($class, true);
77
-            foreach ($strings as $string) {
77
+            foreach ($strings as $string){
78 78
                 $this->registerMessage($class->getName(), $string);
79 79
             }
80 80
         }
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
      */
107 107
     private function registerInvocations(array $invocations): void
108 108
     {
109
-        foreach ($invocations as $invocation) {
110
-            if ($invocation->getArgument(0)->getType() != ReflectionArgument::STRING) {
109
+        foreach ($invocations as $invocation){
110
+            if ($invocation->getArgument(0)->getType() != ReflectionArgument::STRING){
111 111
                 //We can only index invocations with constant string arguments
112 112
                 continue;
113 113
             }
@@ -128,20 +128,20 @@  discard block
 block discarded – undo
128 128
     {
129 129
         $target = $reflection->getDefaultProperties() + $reflection->getConstants();
130 130
 
131
-        foreach ($reflection->getProperties() as $property) {
132
-            if (is_string($property->getDocComment()) && strpos($property->getDocComment(), '@do-not-index')) {
131
+        foreach ($reflection->getProperties() as $property){
132
+            if (is_string($property->getDocComment()) && strpos($property->getDocComment(), '@do-not-index')){
133 133
                 unset($target[$property->getName()]);
134 134
             }
135 135
         }
136 136
 
137 137
         $strings = [];
138 138
         array_walk_recursive($target, function ($value) use (&$strings): void {
139
-            if (is_string($value) && Translator::isMessage($value)) {
139
+            if (is_string($value) && Translator::isMessage($value)){
140 140
                 $strings[] = $this->prepareMessage($value);
141 141
             }
142 142
         });
143 143
 
144
-        if ($inherit && $reflection->getParentClass()) {
144
+        if ($inherit && $reflection->getParentClass()){
145 145
             //Joining strings data with parent class values (inheritance ON) - resolved into same
146 146
             //domain on export
147 147
             $strings = array_merge(
@@ -161,27 +161,27 @@  discard block
 block discarded – undo
161 161
         //Translation using default bundle
162 162
         $domain = $this->config->getDefaultDomain();
163 163
 
164
-        if ($invocation->getName() === 'say') {
164
+        if ($invocation->getName() === 'say'){
165 165
             //Let's try to confirm domain
166 166
             $domain = $this->config->resolveDomain($invocation->getClass());
167 167
         }
168 168
 
169 169
         //`l` and `p`, `say` functions
170 170
         $argument = null;
171
-        switch (strtolower($invocation->getName())) {
171
+        switch (strtolower($invocation->getName())){
172 172
             case 'say':
173 173
             case 'l':
174
-                if ($invocation->countArguments() >= 3) {
174
+                if ($invocation->countArguments() >= 3){
175 175
                     $argument = $invocation->getArgument(2);
176 176
                 }
177 177
                 break;
178 178
             case 'p':
179
-                if ($invocation->countArguments() >= 4) {
179
+                if ($invocation->countArguments() >= 4){
180 180
                     $argument = $invocation->getArgument(3);
181 181
                 }
182 182
         }
183 183
 
184
-        if (!empty($argument) && $argument->getType() === ReflectionArgument::STRING) {
184
+        if (!empty($argument) && $argument->getType() === ReflectionArgument::STRING){
185 185
             //Domain specified in arguments
186 186
             $domain = $this->config->resolveDomain($argument->stringValue());
187 187
         }
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
      */
195 195
     private function prepareMessage(string $string): string
196 196
     {
197
-        if (Translator::isMessage($string)) {
197
+        if (Translator::isMessage($string)){
198 198
             $string = substr($string, 2, -2);
199 199
         }
200 200
 
Please login to merge, or discard this patch.
src/AnnotatedRoutes/src/RouteLocator.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -47,11 +47,11 @@  discard block
 block discarded – undo
47 47
     public function findDeclarations(): array
48 48
     {
49 49
         $result = [];
50
-        foreach ($this->locator->getScopedClasses('routes') as $class) {
51
-            foreach ($class->getMethods() as $method) {
50
+        foreach ($this->locator->getScopedClasses('routes') as $class){
51
+            foreach ($class->getMethods() as $method){
52 52
                 $route = $this->reader->firstFunctionMetadata($method, Route::class);
53 53
 
54
-                if ($route === null) {
54
+                if ($route === null){
55 55
                     continue;
56 56
                 }
57 57
 
@@ -61,15 +61,15 @@  discard block
 block discarded – undo
61 61
                     'controller' => $class->getName(),
62 62
                     'action'     => $method->getName(),
63 63
                     'group'      => $route->group,
64
-                    'verbs'      => (array) $route->methods,
64
+                    'verbs'      => (array)$route->methods,
65 65
                     'defaults'   => $route->defaults,
66
-                    'middleware' => (array) $route->middleware,
66
+                    'middleware' => (array)$route->middleware,
67 67
                     'priority'   => $route->priority,
68 68
                 ];
69 69
             }
70 70
         }
71 71
 
72
-        \uasort($result, static function (array $route1, array $route2) {
72
+        \uasort($result, static function (array $route1, array $route2){
73 73
             return $route1['priority'] <=> $route2['priority'];
74 74
         });
75 75
 
Please login to merge, or discard this patch.
src/Framework/Console/CommandLocator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,8 +38,8 @@
 block discarded – undo
38 38
     public function locateCommands(): array
39 39
     {
40 40
         $commands = [];
41
-        foreach ($this->classes->getScopedClasses('consoleCommands', SymfonyCommand::class) as $class) {
42
-            if ($class->isAbstract()) {
41
+        foreach ($this->classes->getScopedClasses('consoleCommands', SymfonyCommand::class) as $class){
42
+            if ($class->isAbstract()){
43 43
                 continue;
44 44
             }
45 45
 
Please login to merge, or discard this patch.
src/Prototype/tests/LocatorTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
             'directories' => [],
48 48
             'scopes' => [
49 49
                 'prototypes' => [
50
-                    'directories' => [__DIR__ . '/Fixtures']
50
+                    'directories' => [__DIR__.'/Fixtures']
51 51
                 ]
52 52
             ]
53 53
         ])));
Please login to merge, or discard this patch.
src/Console/tests/LazyTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
     public function testLazyCommandCreationInCommandLocator(): void
23 23
     {
24 24
         $locator = new CommandLocator(
25
-            new class() implements ScopedClassesInterface {
25
+            new class() implements ScopedClassesInterface{
26 26
                 public function getScopedClasses(string $scope, $target = null): array
27 27
                 {
28 28
                     return [
Please login to merge, or discard this patch.