Completed
Pull Request — master (#122)
by
unknown
22:36
created
src/Instrument/PathResolver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      *
32 32
      * @return array|bool|string
33 33
      */
34
-    public static function realpath(array|string $somePath, bool $shouldCheckExistence = false): bool|array|string
34
+    public static function realpath(array | string $somePath, bool $shouldCheckExistence = false): bool | array | string
35 35
     {
36 36
         // Do not resolve empty string/false/arrays into the current path
37 37
         if (!$somePath) {
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 
53 53
         $isRelative = !$pathScheme && ($path[0] !== '/') && ($path[1] !== ':');
54 54
         if ($isRelative) {
55
-            $path = getcwd() . DIRECTORY_SEPARATOR . $path;
55
+            $path = getcwd().DIRECTORY_SEPARATOR.$path;
56 56
         }
57 57
 
58 58
         // resolve path parts (single dot, double dot and double delimiters)
Please login to merge, or discard this patch.
src/ReflectionFileNamespace.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      *
104 104
      * @return bool|ReflectionClass
105 105
      */
106
-    public function getClass(string $className): bool|ReflectionClass
106
+    public function getClass(string $className): bool | ReflectionClass
107 107
     {
108 108
         if ($this->hasClass($className)) {
109 109
             return $this->fileClasses[$className];
@@ -169,13 +169,13 @@  discard block
 block discarded – undo
169 169
      *
170 170
      * @return string|false The doc comment if it exists, otherwise "false"
171 171
      */
172
-    public function getDocComment(): bool|string
172
+    public function getDocComment(): bool | string
173 173
     {
174 174
         $docComment = false;
175 175
         $comments   = $this->namespaceNode->getAttribute('comments');
176 176
 
177 177
         if ($comments) {
178
-            $docComment = (string)$comments[0];
178
+            $docComment = (string) $comments[0];
179 179
         }
180 180
 
181 181
         return $docComment;
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
      *
205 205
      * @return bool|ReflectionFunction
206 206
      */
207
-    public function getFunction(string $functionName): bool|ReflectionFunction
207
+    public function getFunction(string $functionName): bool | ReflectionFunction
208 208
     {
209 209
         if ($this->hasFunction($functionName)) {
210 210
             return $this->fileFunctions[$functionName];
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
         foreach ($this->namespaceNode->stmts as $namespaceLevelNode) {
325 325
             if ($namespaceLevelNode instanceof ClassLike) {
326 326
                 $classShortName = $namespaceLevelNode->name->toString();
327
-                $className = $namespaceName ? $namespaceName .'\\' . $classShortName : $classShortName;
327
+                $className = $namespaceName ? $namespaceName.'\\'.$classShortName : $classShortName;
328 328
 
329 329
                 $namespaceLevelNode->setAttribute('fileName', $this->fileName);
330 330
                 $classes[$className] = new ReflectionClass($className, $namespaceLevelNode);
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
         foreach ($this->namespaceNode->stmts as $namespaceLevelNode) {
349 349
             if ($namespaceLevelNode instanceof Function_) {
350 350
                 $funcShortName = $namespaceLevelNode->name->toString();
351
-                $functionName  = $namespaceName ? $namespaceName .'\\' . $funcShortName : $funcShortName;
351
+                $functionName  = $namespaceName ? $namespaceName.'\\'.$funcShortName : $funcShortName;
352 352
 
353 353
                 $namespaceLevelNode->setAttribute('fileName', $this->fileName);
354 354
                 $functions[$funcShortName] = new ReflectionFunction($functionName, $namespaceLevelNode);
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
                 if ($namespaceLevelNode instanceof Expression
389 389
                     && $namespaceLevelNode->expr instanceof FuncCall
390 390
                     && $namespaceLevelNode->expr->name instanceof Name
391
-                    && (string)$namespaceLevelNode->expr->name === 'define'
391
+                    && (string) $namespaceLevelNode->expr->name === 'define'
392 392
                 ) {
393 393
                     $functionCallNode = $namespaceLevelNode->expr;
394 394
                     $expressionSolver->process($functionCallNode->args[0]->value);
Please login to merge, or discard this patch.
src/ReflectionMethod.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -115,13 +115,13 @@  discard block
 block discarded – undo
115 115
         $paramString = '';
116 116
         $indentation = str_repeat(' ', 4);
117 117
         foreach ($methodParameters as $methodParameter) {
118
-            $paramString .= "\n$indentation" . $methodParameter;
118
+            $paramString .= "\n$indentation".$methodParameter;
119 119
         }
120 120
 
121 121
         /** @noinspection PhpFormatFunctionParametersMismatchInspection */
122 122
         return sprintf(
123 123
             "%sMethod [ <user%s%s%s>%s%s%s %s method %s ] {\n  @@ %s %d - %d$paramFormat$returnFormat\n}\n",
124
-            $this->getDocComment() ? $this->getDocComment() . "\n" : '',
124
+            $this->getDocComment() ? $this->getDocComment()."\n" : '',
125 125
             $prototype ? ", overwrites $prototypeClass, prototype $prototypeClass" : '',
126 126
             $this->isConstructor() ? ', ctor' : '',
127 127
             $this->isFinal() ? ' final' : '',
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
     /**
157 157
      * {@inheritDoc}
158 158
      */
159
-    public function getDeclaringClass(): \ReflectionClass|ReflectionClass
159
+    public function getDeclaringClass(): \ReflectionClass | ReflectionClass
160 160
     {
161 161
         return $this->declaringClass ?? new ReflectionClass($this->className);
162 162
     }
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
     /**
193 193
      * {@inheritDoc}
194 194
      */
195
-    public function getPrototype(): BaseReflectionMethod|ReflectionMethod
195
+    public function getPrototype(): BaseReflectionMethod | ReflectionMethod
196 196
     {
197 197
         $parent = $this->getDeclaringClass()->getParentClass();
198 198
         if (!$parent) {
Please login to merge, or discard this patch.
src/ReflectionProperty.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
                         $namespaceName .= '\\';
109 109
                     }
110 110
 
111
-                    $default   = $namespaceName . $defaultNode->name->toString();
111
+                    $default   = $namespaceName.$defaultNode->name->toString();
112 112
                     $checkType = false;
113 113
                 }
114 114
 
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
                         if (PHP_VERSION_ID < 80100) {
145 145
                             // If longer than 15 characters, truncate it
146 146
                             if (strlen($default) > 15) {
147
-                                $default = substr($default, 0, 15) . '...';
147
+                                $default = substr($default, 0, 15).'...';
148 148
                             }
149 149
                         }
150 150
 
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
                             $afterPoint = strlen(substr((string) strrchr((string) $default, "."), 1));
165 165
                             $default = (string) round($default, 15);
166 166
                             if (!str_contains((string) $default, '.')) {
167
-                                $default .= '.' . $afterPoint;
167
+                                $default .= '.'.$afterPoint;
168 168
                             }
169 169
                         }
170 170
                         break;
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
     /**
249 249
      * {@inheritDoc}
250 250
      */
251
-    public function getDeclaringClass(): \ReflectionClass|ReflectionClass
251
+    public function getDeclaringClass(): \ReflectionClass | ReflectionClass
252 252
     {
253 253
         return new ReflectionClass($this->className);
254 254
     }
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
     /**
257 257
      * {@inheritDoc}
258 258
      */
259
-    public function getDocComment(): string|false
259
+    public function getDocComment(): string | false
260 260
     {
261 261
         $docBlock = $this->propertyTypeNode->getDocComment();
262 262
 
Please login to merge, or discard this patch.
src/ReflectionClassConstant.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@
 block discarded – undo
124 124
     /**
125 125
      * {@inheritDoc}
126 126
      */
127
-    public function getDocComment(): string|false
127
+    public function getDocComment(): string | false
128 128
     {
129 129
         $docBlock = $this->classConstantNode->getDocComment();
130 130
 
Please login to merge, or discard this patch.