@@ -162,8 +162,8 @@ |
||
162 | 162 | if ($type instanceof Types\Compound) { |
163 | 163 | |
164 | 164 | return Psi::it($this->getCompoundChildren($type)) |
165 | - ->filter(new IsInstanceOf(Types\Null_::class)) |
|
166 | - ->count() > 0; |
|
165 | + ->filter(new IsInstanceOf(Types\Null_::class)) |
|
166 | + ->count() > 0; |
|
167 | 167 | } |
168 | 168 | |
169 | 169 | return false; |
@@ -61,7 +61,7 @@ |
||
61 | 61 | } |
62 | 62 | |
63 | 63 | /** |
64 | - * @return \string[] |
|
64 | + * @return string[] |
|
65 | 65 | */ |
66 | 66 | public function getValues() |
67 | 67 | { |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | |
53 | 53 | /** @noinspection ExceptionsAnnotatingAndHandlingInspection */ |
54 | 54 | AnnotationRegistry::registerLoader( |
55 | - function ($class) { |
|
55 | + function($class) { |
|
56 | 56 | return class_exists($class) || interface_exists($class) || trait_exists($class); |
57 | 57 | } |
58 | 58 | ); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $this->propertyFilter = $propertyFilter; |
79 | 79 | $this->propertyMapper = $propertyMapper; |
80 | 80 | |
81 | - $this->typeRegistry = new TypeRegistry(); |
|
81 | + $this->typeRegistry = new TypeRegistry(); |
|
82 | 82 | |
83 | 83 | $this->builtInTypes = [ |
84 | 84 | DomainModel\Type\AnyType::TYPE => new DomainModel\Type\AnyType(), |
@@ -275,21 +275,21 @@ discard block |
||
275 | 275 | $properties = Psi::it($class->getProperties()) |
276 | 276 | // is it a non-static property |
277 | 277 | ->filter( |
278 | - function (\ReflectionProperty $p) { return $p->isStatic() === false; } |
|
278 | + function(\ReflectionProperty $p) { return $p->isStatic() === false; } |
|
279 | 279 | ) |
280 | 280 | // is the property declared by the Class or one of the Traits it uses ? |
281 | 281 | ->filter( |
282 | - function (\ReflectionProperty $p) use ($class) { |
|
282 | + function(\ReflectionProperty $p) use ($class) { |
|
283 | 283 | return self::getDeclaringClassInInheritanceChain($class, $p) === $class; |
284 | 284 | } |
285 | 285 | ) |
286 | 286 | // filter properties |
287 | 287 | ->filter( |
288 | - function (\ReflectionProperty $p) { return $this->propertyFilter->filterProperty($p); } |
|
288 | + function(\ReflectionProperty $p) { return $this->propertyFilter->filterProperty($p); } |
|
289 | 289 | ) |
290 | 290 | // map properties |
291 | 291 | ->map( |
292 | - function (\ReflectionProperty $p) { return $this->buildProperty($p); } |
|
292 | + function(\ReflectionProperty $p) { return $this->buildProperty($p); } |
|
293 | 293 | ) |
294 | 294 | // collect |
295 | 295 | ->toArray(); |
@@ -349,7 +349,7 @@ discard block |
||
349 | 349 | private static function getRealDeclaringClassInternal(\ReflectionClass $class, \ReflectionProperty $prop) |
350 | 350 | { |
351 | 351 | $declaringTrait = Psi::it($class->getTraits()) |
352 | - ->filter(function (\ReflectionClass $r) use ($prop) { return $r->hasProperty($prop->getName()); }) |
|
352 | + ->filter(function(\ReflectionClass $r) use ($prop) { return $r->hasProperty($prop->getName()); }) |
|
353 | 353 | ->getFirst(); |
354 | 354 | |
355 | 355 | // We found it on the traits. No we need to recurse on traits to find exactly the one that was defining it |