Passed
Push — master ( 3039ec...0511c6 )
by Caen
03:43 queued 13s
created
monorepo/scripts/docs/DocGen.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -158,18 +158,18 @@  discard block
 block discarded – undo
158 158
     $fileName = (new ReflectionClass($class))->getFileName();
159 159
 
160 160
     // Remove methods defined in traits or parent classes
161
-    $methods = array_filter($methods, function (ReflectionMethod $method) use ($fileName) {
161
+    $methods = array_filter($methods, function(ReflectionMethod $method) use ($fileName) {
162 162
         return $method->getFileName() === $fileName;
163 163
     });
164 164
 
165 165
     // Split methods into static and non-static
166 166
 
167
-    $staticMethods = array_filter($methods, function (ReflectionMethod $method) {
167
+    $staticMethods = array_filter($methods, function(ReflectionMethod $method) {
168 168
         return $method->isStatic();
169 169
     });
170 170
 
171
-    $instanceMethods = array_filter($methods, function (ReflectionMethod $method) {
172
-        return ! $method->isStatic();
171
+    $instanceMethods = array_filter($methods, function(ReflectionMethod $method) {
172
+        return !$method->isStatic();
173 173
     });
174 174
 
175 175
     $output = [];
@@ -277,11 +277,11 @@  discard block
 block discarded – undo
277 277
 
278 278
     $className = class_basename($class);
279 279
 
280
-    $parameters = array_map(function (ReflectionParameter $parameter) {
280
+    $parameters = array_map(function(ReflectionParameter $parameter) {
281 281
         $name = '$'.$parameter->getName();
282 282
         if ($parameter->getType()) {
283 283
             if ($parameter->getType() instanceof ReflectionUnionType) {
284
-                $type = implode('|', array_map(function (ReflectionNamedType $type) {
284
+                $type = implode('|', array_map(function(ReflectionNamedType $type) {
285 285
                     return $type->getName();
286 286
                 }, $parameter->getType()->getTypes()));
287 287
             } else {
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
 
297 297
     // If return is union type
298 298
     if ($method->getReturnType() instanceof ReflectionUnionType) {
299
-        $returnType = implode('|', array_map(function (ReflectionNamedType $type) {
299
+        $returnType = implode('|', array_map(function(ReflectionNamedType $type) {
300 300
             return $type->getName();
301 301
         }, $method->getReturnType()->getTypes()));
302 302
     } else {
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
         if (str_contains($returnValue, ' ')) {
311 311
             $exploded = explode(' ', $returnValue, 2);
312 312
             // If is not generic
313
-            if (! str_contains($exploded[0], '<')) {
313
+            if (!str_contains($exploded[0], '<')) {
314 314
                 $type = $exploded[0];
315 315
                 $comment = ' // '.$exploded[1];
316 316
                 $returnValue = $type;
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
     $parameterDocs = [];
327 327
     // Map docblock params
328 328
     if (isset($PHPDocs['properties']['params'])) {
329
-        $newParams = array_map(function (string $param) use (&$parameterDocs) {
329
+        $newParams = array_map(function(string $param) use (&$parameterDocs) {
330 330
             $param = str_replace('  ', ' ', trim($param));
331 331
             $comment = $param;
332 332
             $param = explode(' ', $param, 3);
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
 function parsePHPDocs(string $comment): array
403 403
 {
404 404
     // Normalize
405
-    $comment = array_map(function (string $line) {
405
+    $comment = array_map(function(string $line) {
406 406
         return trim($line, " \t*/");
407 407
     }, explode("\n", $comment));
408 408
 
@@ -440,7 +440,7 @@  discard block
 block discarded – undo
440 440
     $text = str_replace(array_keys($replace), array_values($replace), $text);
441 441
 
442 442
     // Trim trailing whitespace
443
-    $text = implode("\n", array_map(function (string $line) {
443
+    $text = implode("\n", array_map(function(string $line) {
444 444
         return rtrim($line);
445 445
     }, explode("\n", $text)));
446 446
 
Please login to merge, or discard this patch.
packages/framework/src/Pages/Concerns/HydePage.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
      */
134 134
     public static function files(): array
135 135
     {
136
-        return Files::getFiles(static::class)->map(function (SourceFile $file): string {
136
+        return Files::getFiles(static::class)->map(function(SourceFile $file): string {
137 137
             return static::pathToIdentifier($file->getPath());
138 138
         })->values()->toArray();
139 139
     }
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
      */
372 372
     public function showInNavigation(): bool
373 373
     {
374
-        return ! $this->navigation->hidden;
374
+        return !$this->navigation->hidden;
375 375
     }
376 376
 
377 377
     /**
@@ -400,11 +400,11 @@  discard block
 block discarded – undo
400 400
 
401 401
     public function getCanonicalUrl(): ?string
402 402
     {
403
-        if (! empty($this->matter('canonicalUrl'))) {
403
+        if (!empty($this->matter('canonicalUrl'))) {
404 404
             return $this->matter('canonicalUrl');
405 405
         }
406 406
 
407
-        if (Hyde::hasSiteUrl() && ! empty($this->identifier)) {
407
+        if (Hyde::hasSiteUrl() && !empty($this->identifier)) {
408 408
             return Hyde::url($this->getOutputPath());
409 409
         }
410 410
 
Please login to merge, or discard this patch.