Passed
Pull Request — 1.x (#334)
by Akihito
02:30
created
src/SemanticLog/Profile/Compact/ErrorContext.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,6 +46,6 @@
 block discarded – undo
46 46
         $crc = crc32($this->exceptionAsString);
47 47
         $crcHex = dechex($crc & 0xFFFFFFFF); // Ensure positive hex value
48 48
 
49
-        return 'e-bear-resource-' . $crcHex;
49
+        return 'e-bear-resource-'.$crcHex;
50 50
     }
51 51
 }
Please login to merge, or discard this patch.
src/SemanticLog/Profile/Verbose/ErrorContext.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
         $crc = crc32($this->exceptionAsString);
67 67
         $crcHex = dechex($crc & 0xFFFFFFFF); // Ensure positive hex value
68 68
 
69
-        return 'e-bear-resource-' . $crcHex;
69
+        return 'e-bear-resource-'.$crcHex;
70 70
     }
71 71
 
72 72
     /** @return array<string, mixed> */
Please login to merge, or discard this patch.
src/SemanticLog/Profile/XdebugTrace.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
     public static function start(): self
38 38
     {
39
-        if (! extension_loaded('xdebug') || ! function_exists('xdebug_start_trace')) {
39
+        if (!extension_loaded('xdebug') || !function_exists('xdebug_start_trace')) {
40 40
             return new self(); // @codeCoverageIgnore
41 41
         }
42 42
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         $envMode = getenv('XDEBUG_MODE');
45 45
         $iniMode = ini_get('xdebug.mode');
46 46
         $xdebugMode = $envMode !== false ? $envMode : ($iniMode !== false ? $iniMode : '');
47
-        if (! str_contains($xdebugMode, 'trace')) {
47
+        if (!str_contains($xdebugMode, 'trace')) {
48 48
             return new self(); // @codeCoverageIgnore
49 49
         }
50 50
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
             $outputDir = sys_get_temp_dir(); // @codeCoverageIgnore
64 64
         }
65 65
 
66
-        $traceFilePrefix = rtrim($outputDir, '/') . '/' . $instance->traceId;
66
+        $traceFilePrefix = rtrim($outputDir, '/').'/'.$instance->traceId;
67 67
         xdebug_start_trace($traceFilePrefix); // @codeCoverageIgnore
68 68
 
69 69
         // Note: Return value is void, trace may fail silently if already started elsewhere
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
     public function stop(): self
74 74
     {
75
-        if (! $this->canStopTrace()) {
75
+        if (!$this->canStopTrace()) {
76 76
             return new self(); // @codeCoverageIgnore
77 77
         }
78 78
 
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
     private function canStopTrace(): bool
83 83
     {
84
-        if (! function_exists('xdebug_stop_trace')) {
84
+        if (!function_exists('xdebug_stop_trace')) {
85 85
             return false; // @codeCoverageIgnore
86 86
         }
87 87
 
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         $iniMode = ini_get('xdebug.mode');
91 91
         $xdebugMode = $envMode !== false ? $envMode : ($iniMode !== false ? $iniMode : '');
92 92
 
93
-        if (! str_contains($xdebugMode, 'trace')) {
93
+        if (!str_contains($xdebugMode, 'trace')) {
94 94
             return false; // @codeCoverageIgnore
95 95
         }
96 96
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
         // Try to stop trace and get the trace file path
109 109
         // Suppress "Function trace was not started" error for graceful handling
110
-        set_error_handler(static function (int $errno, string $errstr): bool {
110
+        set_error_handler(static function(int $errno, string $errstr): bool {
111 111
             // Ignore specific xdebug trace errors (only handle E_NOTICE)
112 112
             return $errno === E_NOTICE && str_contains($errstr, 'Function trace was not started');
113 113
         });
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
             restore_error_handler();
121 121
         }
122 122
 
123
-        if ($traceFile === false || ! is_string($traceFile) || ! file_exists($traceFile)) {
123
+        if ($traceFile === false || !is_string($traceFile) || !file_exists($traceFile)) {
124 124
             return new self(); // @codeCoverageIgnore
125 125
         }
126 126
 
Please login to merge, or discard this patch.
src/OptionsMethodRequest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      *
39 39
      * @psalm-suppress RedundantCondition for BC
40 40
      */
41
-    private function getParameterType(ReflectionParameter $parameter, array $paramDoc, string $name): string|null
41
+    private function getParameterType(ReflectionParameter $parameter, array $paramDoc, string $name): string | null
42 42
     {
43 43
         $hasType = method_exists($parameter, 'getType') && $parameter->getType();
44 44
         if ($hasType) {
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
                 $paramDoc[$name]['in'] = $ins[$parameter->name];
64 64
             }
65 65
 
66
-            if (! isset($paramDoc[$parameter->name])) {
66
+            if (!isset($paramDoc[$parameter->name])) {
67 67
                 $paramDoc[$name] = [];
68 68
             }
69 69
 
Please login to merge, or discard this patch.
src/Anchor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     #[Override]
30 30
     public function href(string $rel, AbstractRequest $request, array $query): array
31 31
     {
32
-        $classMethod = 'on' . ucfirst($request->method);
32
+        $classMethod = 'on'.ucfirst($request->method);
33 33
         $annotations = (new ReflectionMethod($request->resourceObject::class, $classMethod))->getAnnotations();
34 34
         foreach ($annotations as $annotation) {
35 35
             if ($this->isValidLinkAnnotation($annotation, $rel)) {
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
             }
40 40
         }
41 41
 
42
-        throw new LinkException("rel:{$rel} class:" . $request->resourceObject::class, 500);
42
+        throw new LinkException("rel:{$rel} class:".$request->resourceObject::class, 500);
43 43
     }
44 44
 
45 45
     private function isValidLinkAnnotation(object $annotation, string $rel): bool
Please login to merge, or discard this patch.
src/OptionsRenderer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         $ro->headers['Content-Type'] = 'application/json';
47 47
         $allows = $this->getAllows((new ReflectionClass($ro))->getMethods());
48 48
         $ro->headers['Allow'] = implode(', ', $allows);
49
-        $ro->view = $this->optionsBody ? (string) json_encode($this->getEntityBody($ro, $allows), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . PHP_EOL : '';
49
+        $ro->view = $this->optionsBody ? (string) json_encode($this->getEntityBody($ro, $allows), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES).PHP_EOL : '';
50 50
 
51 51
         return $ro->view;
52 52
     }
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     {
64 64
         $allows = [];
65 65
         foreach ($methods as $method) {
66
-            if (! in_array($method->name, ['onGet', 'onPost', 'onPut', 'onPatch', 'onDelete', 'onHead'], true)) {
66
+            if (!in_array($method->name, ['onGet', 'onPost', 'onPut', 'onPatch', 'onDelete', 'onHead'], true)) {
67 67
                 continue;
68 68
             }
69 69
 
Please login to merge, or discard this patch.
src/NamedParamMetas.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         $method = new ReflectionMethod($callable[0], $callable[1]);
38 38
         $paramMetas = $this->getAttributeParamMetas($method);
39 39
 
40
-        if (! $paramMetas) {
40
+        if (!$paramMetas) {
41 41
             $paramMetas = $this->getAnnotationParamMetas($method);
42 42
         }
43 43
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
                 $names[$annotation->param] = new AssistedResourceParam($annotation);
120 120
             }
121 121
 
122
-            if (! ($annotation instanceof Assisted)) {
122
+            if (!($annotation instanceof Assisted)) {
123 123
                 continue;
124 124
             }
125 125
 
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
     {
141 141
         $webcontext = [];
142 142
         foreach ($annotations as $annotation) {
143
-            if (! ($annotation instanceof AbstractWebContextParam)) {
143
+            if (!($annotation instanceof AbstractWebContextParam)) {
144 144
                 continue;
145 145
             }
146 146
 
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
     }
217 217
 
218 218
     /** @psalm-return DefaultParam<mixed>|NoDefaultParam */
219
-    private function getDefault(ReflectionParameter $parameter): DefaultParam|NoDefaultParam
219
+    private function getDefault(ReflectionParameter $parameter): DefaultParam | NoDefaultParam
220 220
     {
221 221
         return $parameter->isDefaultValueAvailable() === true ? new DefaultParam($parameter->getDefaultValue()) : new NoDefaultParam();
222 222
     }
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
     private function getParam(ReflectionParameter $parameter): ParamInterface
247 247
     {
248 248
         $type = $parameter->getType();
249
-        if ($type instanceof ReflectionNamedType && ! $type->isBuiltin()) {
249
+        if ($type instanceof ReflectionNamedType && !$type->isBuiltin()) {
250 250
             return new ClassParam($type, $parameter);
251 251
         }
252 252
 
Please login to merge, or discard this patch.
src/JsonSchema/Module/JsonSchemaModule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
     public function __construct(
25 25
         private readonly string $jsonSchemaDir = '',
26 26
         private readonly string $jsonValidateDir = '',
27
-        AbstractModule|null $module = null,
27
+        AbstractModule | null $module = null,
28 28
     ) {
29 29
         parent::__construct($module);
30 30
     }
Please login to merge, or discard this patch.
src/JsonSchema/Module/JsonSchemaLinkHeaderModule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,9 +17,9 @@
 block discarded – undo
17 17
     /** @param string $jsonSchemaHost Json-schema host name ex) https://example.com/schema/ */
18 18
     public function __construct(
19 19
         private readonly string $jsonSchemaHost,
20
-        AbstractModule|null $module = null,
20
+        AbstractModule | null $module = null,
21 21
     ) {
22
-        if (! filter_var($jsonSchemaHost, FILTER_VALIDATE_URL)) {
22
+        if (!filter_var($jsonSchemaHost, FILTER_VALIDATE_URL)) {
23 23
             throw new InvalidSchemaUriException($jsonSchemaHost);
24 24
         }
25 25
 
Please login to merge, or discard this patch.