@@ -154,11 +154,11 @@ discard block |
||
| 154 | 154 | $className = $reflectionClass->getName(); |
| 155 | 155 | $docs = $this->getDocs($reflectionClass, $factory); |
| 156 | 156 | CompleteItem::create() |
| 157 | - ->detail((string)$className) |
|
| 158 | - ->documentation((string)$docs) |
|
| 157 | + ->detail((string) $className) |
|
| 158 | + ->documentation((string) $docs) |
|
| 159 | 159 | ->kind(CompleteItemKind::ClassKind) |
| 160 | - ->label((string)$name) |
|
| 161 | - ->insertText((string)$name) |
|
| 160 | + ->label((string) $name) |
|
| 161 | + ->insertText((string) $name) |
|
| 162 | 162 | ->add($this, $path); |
| 163 | 163 | } |
| 164 | 164 | |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | // Exclude some properties |
| 209 | 209 | $propertyAllowed = true; |
| 210 | 210 | foreach (self::EXCLUDED_PROPERTY_REGEXES as $excludePattern) { |
| 211 | - $pattern = '`' . $excludePattern . '`i'; |
|
| 211 | + $pattern = '`'.$excludePattern.'`i'; |
|
| 212 | 212 | if (preg_match($pattern, $propertyName) === 1) { |
| 213 | 213 | $propertyAllowed = false; |
| 214 | 214 | } |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | $value = json_encode($value); |
| 263 | 263 | } |
| 264 | 264 | if (!empty($value)) { |
| 265 | - $detail = (string)$value; |
|
| 265 | + $detail = (string) $value; |
|
| 266 | 266 | } |
| 267 | 267 | } |
| 268 | 268 | } |
@@ -270,12 +270,12 @@ discard block |
||
| 270 | 270 | $thisPath = trim(implode('.', [$path, $propertyName]), '.'); |
| 271 | 271 | $label = $propertyName; |
| 272 | 272 | CompleteItem::create() |
| 273 | - ->detail((string)$detail) |
|
| 274 | - ->documentation((string)$docs) |
|
| 273 | + ->detail((string) $detail) |
|
| 274 | + ->documentation((string) $docs) |
|
| 275 | 275 | ->kind($customField ? CompleteItemKind::FieldKind : CompleteItemKind::PropertyKind) |
| 276 | - ->label((string)$label) |
|
| 277 | - ->insertText((string)$label) |
|
| 278 | - ->sortText((string)$sortPrefix . (string)$label) |
|
| 276 | + ->label((string) $label) |
|
| 277 | + ->insertText((string) $label) |
|
| 278 | + ->sortText((string) $sortPrefix.(string) $label) |
|
| 279 | 279 | ->add($this, $thisPath); |
| 280 | 280 | // Recurse through if this is an object |
| 281 | 281 | if (isset($object->$propertyName) && is_object($object->$propertyName)) { |
@@ -305,7 +305,7 @@ discard block |
||
| 305 | 305 | // Exclude some properties |
| 306 | 306 | $methodAllowed = true; |
| 307 | 307 | foreach (self::EXCLUDED_METHOD_REGEXES as $excludePattern) { |
| 308 | - $pattern = '`' . $excludePattern . '`i'; |
|
| 308 | + $pattern = '`'.$excludePattern.'`i'; |
|
| 309 | 309 | if (preg_match($pattern, $methodName) === 1) { |
| 310 | 310 | $methodAllowed = false; |
| 311 | 311 | } |
@@ -314,7 +314,7 @@ discard block |
||
| 314 | 314 | if ($methodAllowed && $reflectionMethod->isPublic()) { |
| 315 | 315 | $docblock = null; |
| 316 | 316 | $docs = $this->getDocs($reflectionMethod, $factory); |
| 317 | - $detail = $methodName . '('; |
|
| 317 | + $detail = $methodName.'('; |
|
| 318 | 318 | $params = $reflectionMethod->getParameters(); |
| 319 | 319 | $paramList = []; |
| 320 | 320 | foreach ($params as $param) { |
@@ -324,20 +324,20 @@ discard block |
||
| 324 | 324 | $unionTypes = $reflectionType->getTypes(); |
| 325 | 325 | $typeName = ''; |
| 326 | 326 | foreach ($unionTypes as $unionType) { |
| 327 | - $typeName .= '|' . $unionType->getName(); |
|
| 327 | + $typeName .= '|'.$unionType->getName(); |
|
| 328 | 328 | } |
| 329 | 329 | $typeName = trim($typeName, '|'); |
| 330 | - $paramList[] = $typeName . ': ' . '$' . $param->getName(); |
|
| 330 | + $paramList[] = $typeName.': '.'$'.$param->getName(); |
|
| 331 | 331 | } else { |
| 332 | - $paramList[] = $param->getType()->getName() . ': ' . '$' . $param->getName(); |
|
| 332 | + $paramList[] = $param->getType()->getName().': '.'$'.$param->getName(); |
|
| 333 | 333 | } |
| 334 | 334 | } else { |
| 335 | - $paramList[] = '$' . $param->getName(); |
|
| 335 | + $paramList[] = '$'.$param->getName(); |
|
| 336 | 336 | } |
| 337 | 337 | } |
| 338 | - $detail .= implode(', ', $paramList) . ')'; |
|
| 338 | + $detail .= implode(', ', $paramList).')'; |
|
| 339 | 339 | $thisPath = trim(implode('.', [$path, $methodName]), '.'); |
| 340 | - $label = $methodName . '()'; |
|
| 340 | + $label = $methodName.'()'; |
|
| 341 | 341 | $docsPreamble = ''; |
| 342 | 342 | // Figure out the type |
| 343 | 343 | if ($docblock) { |
@@ -345,18 +345,18 @@ discard block |
||
| 345 | 345 | if ($tags) { |
| 346 | 346 | $docsPreamble = "Parameters:\n\n"; |
| 347 | 347 | foreach ($tags as $tag) { |
| 348 | - $docsPreamble .= $tag . "\n"; |
|
| 348 | + $docsPreamble .= $tag."\n"; |
|
| 349 | 349 | } |
| 350 | 350 | $docsPreamble .= "\n"; |
| 351 | 351 | } |
| 352 | 352 | } |
| 353 | 353 | CompleteItem::create() |
| 354 | - ->detail((string)$detail) |
|
| 355 | - ->documentation((string)$docsPreamble . (string)$docs) |
|
| 354 | + ->detail((string) $detail) |
|
| 355 | + ->documentation((string) $docsPreamble.(string) $docs) |
|
| 356 | 356 | ->kind(CompleteItemKind::MethodKind) |
| 357 | - ->label((string)$label) |
|
| 358 | - ->insertText((string)$label) |
|
| 359 | - ->sortText($this->methodSortPrefix . (string)$label) |
|
| 357 | + ->label((string) $label) |
|
| 358 | + ->insertText((string) $label) |
|
| 359 | + ->sortText($this->methodSortPrefix.(string) $label) |
|
| 360 | 360 | ->add($this, $thisPath); |
| 361 | 361 | } |
| 362 | 362 | } |