@@ -120,10 +120,10 @@ |
||
120 | 120 | $value = json_encode(array_keys($value)); |
121 | 121 | } |
122 | 122 | CompleteItem::create() |
123 | - ->detail((string)$value) |
|
123 | + ->detail((string) $value) |
|
124 | 124 | ->kind($kind) |
125 | - ->label((string)$key) |
|
126 | - ->insertText((string)$key) |
|
125 | + ->label((string) $key) |
|
126 | + ->insertText((string) $key) |
|
127 | 127 | ->add($this, $path); |
128 | 128 | break; |
129 | 129 | } |
@@ -105,11 +105,11 @@ discard block |
||
105 | 105 | $className = $reflectionClass->getName(); |
106 | 106 | $docs = $this->getDocs($reflectionClass, $factory); |
107 | 107 | CompleteItem::create() |
108 | - ->detail((string)$className) |
|
109 | - ->documentation((string)$docs) |
|
108 | + ->detail((string) $className) |
|
109 | + ->documentation((string) $docs) |
|
110 | 110 | ->kind(CompleteItemKind::ClassKind) |
111 | - ->label((string)$name) |
|
112 | - ->insertText((string)$name) |
|
111 | + ->label((string) $name) |
|
112 | + ->insertText((string) $name) |
|
113 | 113 | ->add($this, $path); |
114 | 114 | } |
115 | 115 | |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | // Exclude some properties |
160 | 160 | $propertyAllowed = true; |
161 | 161 | foreach (self::EXCLUDED_PROPERTY_REGEXES as $excludePattern) { |
162 | - $pattern = '`' . $excludePattern . '`i'; |
|
162 | + $pattern = '`'.$excludePattern.'`i'; |
|
163 | 163 | if (preg_match($pattern, $propertyName) === 1) { |
164 | 164 | $propertyAllowed = false; |
165 | 165 | } |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | $value = json_encode($value); |
214 | 214 | } |
215 | 215 | if (!empty($value)) { |
216 | - $detail = (string)$value; |
|
216 | + $detail = (string) $value; |
|
217 | 217 | } |
218 | 218 | } |
219 | 219 | } |
@@ -221,12 +221,12 @@ discard block |
||
221 | 221 | $thisPath = trim(implode('.', [$path, $propertyName]), '.'); |
222 | 222 | $label = $propertyName; |
223 | 223 | CompleteItem::create() |
224 | - ->detail((string)$detail) |
|
225 | - ->documentation((string)$docs) |
|
224 | + ->detail((string) $detail) |
|
225 | + ->documentation((string) $docs) |
|
226 | 226 | ->kind($customField ? CompleteItemKind::FieldKind : CompleteItemKind::PropertyKind) |
227 | - ->label((string)$label) |
|
228 | - ->insertText((string)$label) |
|
229 | - ->sortText((string)$sortPrefix . (string)$label) |
|
227 | + ->label((string) $label) |
|
228 | + ->insertText((string) $label) |
|
229 | + ->sortText((string) $sortPrefix.(string) $label) |
|
230 | 230 | ->add($this, $thisPath); |
231 | 231 | // Recurse through if this is an object |
232 | 232 | if (isset($object->$propertyName) && is_object($object->$propertyName)) { |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | // Exclude some properties |
257 | 257 | $methodAllowed = true; |
258 | 258 | foreach (self::EXCLUDED_METHOD_REGEXES as $excludePattern) { |
259 | - $pattern = '`' . $excludePattern . '`i'; |
|
259 | + $pattern = '`'.$excludePattern.'`i'; |
|
260 | 260 | if (preg_match($pattern, $methodName) === 1) { |
261 | 261 | $methodAllowed = false; |
262 | 262 | } |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | if ($methodAllowed && $reflectionMethod->isPublic()) { |
266 | 266 | $docblock = null; |
267 | 267 | $docs = $this->getDocs($reflectionMethod, $factory); |
268 | - $detail = $methodName . '('; |
|
268 | + $detail = $methodName.'('; |
|
269 | 269 | $params = $reflectionMethod->getParameters(); |
270 | 270 | $paramList = []; |
271 | 271 | foreach ($params as $param) { |
@@ -275,20 +275,20 @@ discard block |
||
275 | 275 | $unionTypes = $reflectionType->getTypes(); |
276 | 276 | $typeName = ''; |
277 | 277 | foreach ($unionTypes as $unionType) { |
278 | - $typeName .= '|' . $unionType->getName(); |
|
278 | + $typeName .= '|'.$unionType->getName(); |
|
279 | 279 | } |
280 | 280 | $typeName = trim($typeName, '|'); |
281 | - $paramList[] = $typeName . ': ' . '$' . $param->getName(); |
|
281 | + $paramList[] = $typeName.': '.'$'.$param->getName(); |
|
282 | 282 | } else { |
283 | - $paramList[] = $param->getType()->getName() . ': ' . '$' . $param->getName(); |
|
283 | + $paramList[] = $param->getType()->getName().': '.'$'.$param->getName(); |
|
284 | 284 | } |
285 | 285 | } else { |
286 | - $paramList[] = '$' . $param->getName(); |
|
286 | + $paramList[] = '$'.$param->getName(); |
|
287 | 287 | } |
288 | 288 | } |
289 | - $detail .= implode(', ', $paramList) . ')'; |
|
289 | + $detail .= implode(', ', $paramList).')'; |
|
290 | 290 | $thisPath = trim(implode('.', [$path, $methodName]), '.'); |
291 | - $label = $methodName . '()'; |
|
291 | + $label = $methodName.'()'; |
|
292 | 292 | $docsPreamble = ''; |
293 | 293 | // Figure out the type |
294 | 294 | if ($docblock) { |
@@ -296,18 +296,18 @@ discard block |
||
296 | 296 | if ($tags) { |
297 | 297 | $docsPreamble = "Parameters:\n\n"; |
298 | 298 | foreach ($tags as $tag) { |
299 | - $docsPreamble .= $tag . "\n"; |
|
299 | + $docsPreamble .= $tag."\n"; |
|
300 | 300 | } |
301 | 301 | $docsPreamble .= "\n"; |
302 | 302 | } |
303 | 303 | } |
304 | 304 | CompleteItem::create() |
305 | - ->detail((string)$detail) |
|
306 | - ->documentation((string)$docsPreamble . (string)$docs) |
|
305 | + ->detail((string) $detail) |
|
306 | + ->documentation((string) $docsPreamble.(string) $docs) |
|
307 | 307 | ->kind(CompleteItemKind::MethodKind) |
308 | - ->label((string)$label) |
|
309 | - ->insertText((string)$label) |
|
310 | - ->sortText(self::METHOD_SORT_PREFIX . (string)$label) |
|
308 | + ->label((string) $label) |
|
309 | + ->insertText((string) $label) |
|
310 | + ->sortText(self::METHOD_SORT_PREFIX.(string) $label) |
|
311 | 311 | ->add($this, $thisPath); |
312 | 312 | } |
313 | 313 | } |