Passed
Branch release/v3.0.0 (0e0f96)
by Anatoly
04:10
created
Category
src/ParameterResolver/RequestBodyParameterResolver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      */
60 60
     public function resolveParameter(ReflectionParameter $parameter, mixed $context): Generator
61 61
     {
62
-        if (! $context instanceof ServerRequestInterface) {
62
+        if (!$context instanceof ServerRequestInterface) {
63 63
             return;
64 64
         }
65 65
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         }
71 71
 
72 72
         $type = $parameter->getType();
73
-        if (! $type instanceof ReflectionNamedType || $type->isBuiltin()) {
73
+        if (!$type instanceof ReflectionNamedType || $type->isBuiltin()) {
74 74
             throw new InvalidArgumentException(sprintf(
75 75
                 'To use the #[RequestBody] annotation, the parameter "%s" must be typed with an object.',
76 76
                 ParameterResolverChain::stringifyParameter($parameter),
Please login to merge, or discard this patch.
src/ParameterResolver/DirectInjectionParameterResolver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
     public function resolveParameter(ReflectionParameter $parameter, mixed $context): Generator
37 37
     {
38 38
         $type = $parameter->getType();
39
-        if (! $type instanceof ReflectionNamedType || $type->isBuiltin()) {
39
+        if (!$type instanceof ReflectionNamedType || $type->isBuiltin()) {
40 40
             return;
41 41
         }
42 42
 
Please login to merge, or discard this patch.
src/ServerRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
     {
56 56
         $route = $this->request->getAttribute(RouteInterface::class);
57 57
 
58
-        if (! $route instanceof RouteInterface) {
58
+        if (!$route instanceof RouteInterface) {
59 59
             // phpcs:ignore Generic.Files.LineLength.TooLong
60 60
             throw new LogicException('At this level of the application, the request does not contain information about the requested route.');
61 61
         }
Please login to merge, or discard this patch.
src/Loader/DescriptorLoader.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
      *
211 211
      * @throws InvalidArgumentException
212 212
      */
213
-    private static function getClassOrMethodDescriptor(ReflectionClass|ReflectionMethod $classOrMethod): ?Descriptor
213
+    private static function getClassOrMethodDescriptor(ReflectionClass | ReflectionMethod $classOrMethod): ?Descriptor
214 214
     {
215 215
         /** @var list<ReflectionAttribute<Descriptor>> $annotations */
216 216
         $annotations = $classOrMethod->getAttributes(Descriptor::class, ReflectionAttribute::IS_INSTANCEOF);
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
      */
237 237
     private static function enrichDescriptorFromClassOrMethod(
238 238
         Descriptor $descriptor,
239
-        ReflectionClass|ReflectionMethod $classOrMethod,
239
+        ReflectionClass | ReflectionMethod $classOrMethod,
240 240
     ): void {
241 241
         /** @var list<ReflectionAttribute<NamePrefix>> $annotations */
242 242
         $annotations = $classOrMethod->getAttributes(NamePrefix::class);
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
      *
352 352
      * @throws InvalidArgumentException
353 353
      */
354
-    private static function completeDescriptor(Descriptor $descriptor, ReflectionClass|ReflectionMethod $holder): void
354
+    private static function completeDescriptor(Descriptor $descriptor, ReflectionClass | ReflectionMethod $holder): void
355 355
     {
356 356
         $descriptor->holder = $holder instanceof ReflectionClass ? $holder->name : [$holder->class, $holder->name];
357 357
         $descriptor->name = implode($descriptor->namePrefixes) . $descriptor->name;
Please login to merge, or discard this patch.
src/Helper/ClassFinder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
         $filenames = [];
61 61
         foreach ($files as $file) {
62 62
             $filename = $file->getRealPath();
63
-            (static function (string $filename): void {
63
+            (static function(string $filename): void {
64 64
                 require_once $filename;
65 65
             })($filename);
66 66
 
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
         /** @var string $filename */
94 94
         $filename = realpath($filename);
95
-        (static function (string $filename): void {
95
+        (static function(string $filename): void {
96 96
             require_once $filename;
97 97
         })($filename);
98 98
 
Please login to merge, or discard this patch.
src/Helper/ReflectorHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
      *
57 57
      * @return array<array-key, ReflectionClass<object>|ReflectionMethod>
58 58
      */
59
-    public static function getAncestry(ReflectionClass|ReflectionMethod $proband): array
59
+    public static function getAncestry(ReflectionClass | ReflectionMethod $proband): array
60 60
     {
61 61
         return $proband instanceof ReflectionClass
62 62
             ? self::getClassAncestry($proband)
Please login to merge, or discard this patch.
src/Middleware/StringTrimmingMiddleware.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
      */
73 73
     private static function trimArray(array $array, Closure $trimmer): array
74 74
     {
75
-        $walker = static function (mixed &$value) use ($trimmer): void {
75
+        $walker = static function(mixed &$value) use ($trimmer): void {
76 76
             if (is_string($value)) {
77 77
                 $value = $trimmer($value);
78 78
             }
Please login to merge, or discard this patch.
src/RequestHandlerReflectorInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,5 +27,5 @@
 block discarded – undo
27 27
      *
28 28
      * @throws InvalidArgumentException
29 29
      */
30
-    public function reflectRequestHandler(mixed $reference): ReflectionClass|ReflectionMethod;
30
+    public function reflectRequestHandler(mixed $reference): ReflectionClass | ReflectionMethod;
31 31
 }
Please login to merge, or discard this patch.
src/RequestHandlerReflector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
      * @throws InvalidArgumentException
37 37
      * @throws ReflectionException
38 38
      */
39
-    public function reflectRequestHandler(mixed $reference): ReflectionClass|ReflectionMethod
39
+    public function reflectRequestHandler(mixed $reference): ReflectionClass | ReflectionMethod
40 40
     {
41 41
         if ($reference instanceof RequestHandlerInterface) {
42 42
             return new ReflectionClass($reference);
Please login to merge, or discard this patch.