@@ -157,11 +157,11 @@ discard block |
||
| 157 | 157 | $className = $reflectionClass->getName(); |
| 158 | 158 | $docs = $this->getDocs($reflectionClass, $factory); |
| 159 | 159 | CompleteItem::create() |
| 160 | - ->detail((string)$className) |
|
| 161 | - ->documentation((string)$docs) |
|
| 160 | + ->detail((string) $className) |
|
| 161 | + ->documentation((string) $docs) |
|
| 162 | 162 | ->kind(CompleteItemKind::ClassKind) |
| 163 | - ->label((string)$name) |
|
| 164 | - ->insertText((string)$name) |
|
| 163 | + ->label((string) $name) |
|
| 164 | + ->insertText((string) $name) |
|
| 165 | 165 | ->add($this, $path); |
| 166 | 166 | } |
| 167 | 167 | |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | // Exclude some properties |
| 212 | 212 | $propertyAllowed = true; |
| 213 | 213 | foreach (self::EXCLUDED_PROPERTY_REGEXES as $excludePattern) { |
| 214 | - $pattern = '`' . $excludePattern . '`i'; |
|
| 214 | + $pattern = '`'.$excludePattern.'`i'; |
|
| 215 | 215 | if (preg_match($pattern, $propertyName) === 1) { |
| 216 | 216 | $propertyAllowed = false; |
| 217 | 217 | } |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | $value = ''; |
| 269 | 269 | } |
| 270 | 270 | if (!empty($value)) { |
| 271 | - $detail = (string)$value; |
|
| 271 | + $detail = (string) $value; |
|
| 272 | 272 | } |
| 273 | 273 | } |
| 274 | 274 | } |
@@ -276,12 +276,12 @@ discard block |
||
| 276 | 276 | $thisPath = trim(implode('.', [$path, $propertyName]), '.'); |
| 277 | 277 | $label = $propertyName; |
| 278 | 278 | CompleteItem::create() |
| 279 | - ->detail((string)$detail) |
|
| 280 | - ->documentation((string)$docs) |
|
| 279 | + ->detail((string) $detail) |
|
| 280 | + ->documentation((string) $docs) |
|
| 281 | 281 | ->kind($customField ? CompleteItemKind::FieldKind : CompleteItemKind::PropertyKind) |
| 282 | - ->label((string)$label) |
|
| 283 | - ->insertText((string)$label) |
|
| 284 | - ->sortText((string)$sortPrefix . (string)$label) |
|
| 282 | + ->label((string) $label) |
|
| 283 | + ->insertText((string) $label) |
|
| 284 | + ->sortText((string) $sortPrefix.(string) $label) |
|
| 285 | 285 | ->add($this, $thisPath); |
| 286 | 286 | // Recurse through if this is an object |
| 287 | 287 | if (isset($object->$propertyName) && is_object($object->$propertyName)) { |
@@ -315,7 +315,7 @@ discard block |
||
| 315 | 315 | // Exclude some properties |
| 316 | 316 | $methodAllowed = true; |
| 317 | 317 | foreach (self::EXCLUDED_METHOD_REGEXES as $excludePattern) { |
| 318 | - $pattern = '`' . $excludePattern . '`i'; |
|
| 318 | + $pattern = '`'.$excludePattern.'`i'; |
|
| 319 | 319 | if (preg_match($pattern, $methodName) === 1) { |
| 320 | 320 | $methodAllowed = false; |
| 321 | 321 | } |
@@ -327,7 +327,7 @@ discard block |
||
| 327 | 327 | if (!empty($docs)) { |
| 328 | 328 | $docblock = $factory->create($docs); |
| 329 | 329 | } |
| 330 | - $detail = $methodName . '('; |
|
| 330 | + $detail = $methodName.'('; |
|
| 331 | 331 | $params = $reflectionMethod->getParameters(); |
| 332 | 332 | $paramList = []; |
| 333 | 333 | foreach ($params as $param) { |
@@ -337,20 +337,20 @@ discard block |
||
| 337 | 337 | $unionTypes = $reflectionType->getTypes(); |
| 338 | 338 | $typeName = ''; |
| 339 | 339 | foreach ($unionTypes as $unionType) { |
| 340 | - $typeName .= '|' . $unionType->getName(); |
|
| 340 | + $typeName .= '|'.$unionType->getName(); |
|
| 341 | 341 | } |
| 342 | 342 | $typeName = trim($typeName, '|'); |
| 343 | - $paramList[] = $typeName . ': ' . '$' . $param->getName(); |
|
| 343 | + $paramList[] = $typeName.': '.'$'.$param->getName(); |
|
| 344 | 344 | } elseif ($param->getType() instanceof ReflectionNamedType) { |
| 345 | - $paramList[] = $param->getType()->getName() . ': ' . '$' . $param->getName(); |
|
| 345 | + $paramList[] = $param->getType()->getName().': '.'$'.$param->getName(); |
|
| 346 | 346 | } |
| 347 | 347 | } else { |
| 348 | - $paramList[] = '$' . $param->getName(); |
|
| 348 | + $paramList[] = '$'.$param->getName(); |
|
| 349 | 349 | } |
| 350 | 350 | } |
| 351 | - $detail .= implode(', ', $paramList) . ')'; |
|
| 351 | + $detail .= implode(', ', $paramList).')'; |
|
| 352 | 352 | $thisPath = trim(implode('.', [$path, $methodName]), '.'); |
| 353 | - $label = $methodName . '()'; |
|
| 353 | + $label = $methodName.'()'; |
|
| 354 | 354 | $docsPreamble = ''; |
| 355 | 355 | // Figure out the type |
| 356 | 356 | if ($docblock) { |
@@ -358,18 +358,18 @@ discard block |
||
| 358 | 358 | if ($tags) { |
| 359 | 359 | $docsPreamble = "Parameters:\n\n"; |
| 360 | 360 | foreach ($tags as $tag) { |
| 361 | - $docsPreamble .= $tag . "\n"; |
|
| 361 | + $docsPreamble .= $tag."\n"; |
|
| 362 | 362 | } |
| 363 | 363 | $docsPreamble .= "\n"; |
| 364 | 364 | } |
| 365 | 365 | } |
| 366 | 366 | CompleteItem::create() |
| 367 | - ->detail((string)$detail) |
|
| 368 | - ->documentation((string)$docsPreamble . (string)$docs) |
|
| 367 | + ->detail((string) $detail) |
|
| 368 | + ->documentation((string) $docsPreamble.(string) $docs) |
|
| 369 | 369 | ->kind(CompleteItemKind::MethodKind) |
| 370 | - ->label((string)$label) |
|
| 371 | - ->insertText((string)$label) |
|
| 372 | - ->sortText($this->methodSortPrefix . (string)$label) |
|
| 370 | + ->label((string) $label) |
|
| 371 | + ->insertText((string) $label) |
|
| 372 | + ->sortText($this->methodSortPrefix.(string) $label) |
|
| 373 | 373 | ->add($this, $thisPath); |
| 374 | 374 | } |
| 375 | 375 | } |