| @@ -32,7 +32,7 @@ discard block | ||
| 32 | 32 | |
| 33 | 33 | private function resolveExternalAttributes(ClassDefinition $definition, Codebase $codebase): void | 
| 34 | 34 |      { | 
| 35 | -        array_map(function (Attribute $attribute) use ($codebase) { | |
| 35 | +        array_map(function(Attribute $attribute) use ($codebase) { | |
| 36 | 36 |              if ($attribute->isAReference() && !$codebase->has($attribute->typeName())) { | 
| 37 | 37 | $codebase->add($this->externalClass($attribute->typeName())); | 
| 38 | 38 | } | 
| @@ -41,7 +41,7 @@ discard block | ||
| 41 | 41 | |
| 42 | 42 | private function resolveExternalConstructorParameters(ClassDefinition $definition, Codebase $codebase): void | 
| 43 | 43 |      { | 
| 44 | -        array_map(function (Variable $parameter) use ($codebase) { | |
| 44 | +        array_map(function(Variable $parameter) use ($codebase) { | |
| 45 | 45 |              if ($parameter->isAReference() && !$codebase->has($parameter->typeName())) { | 
| 46 | 46 | $codebase->add($this->externalClass($parameter->typeName())); | 
| 47 | 47 | } | 
| @@ -58,7 +58,7 @@ | ||
| 58 | 58 | /** @return ClassDefinitionName[] */ | 
| 59 | 59 | protected function buildInterfaces(array $implements): array | 
| 60 | 60 |      { | 
| 61 | -        return array_map(function (Name $name) { | |
| 61 | +        return array_map(function(Name $name) { | |
| 62 | 62 | return ClassDefinitionName::from($name->getLast()); | 
| 63 | 63 | }, $implements); | 
| 64 | 64 | } | 
| @@ -49,7 +49,7 @@ | ||
| 49 | 49 | /** @return InterfaceDefinitionName[] */ | 
| 50 | 50 | protected function buildParents(Interface_ $interface): array | 
| 51 | 51 |      { | 
| 52 | -        return array_map(function (Name $name) { | |
| 52 | +        return array_map(function(Name $name) { | |
| 53 | 53 | return InterfaceDefinitionName::from($name->getLast()); | 
| 54 | 54 | }, $interface->extends); | 
| 55 | 55 | } | 
| @@ -32,7 +32,7 @@ discard block | ||
| 32 | 32 | */ | 
| 33 | 33 | public function build(array $classMethods): array | 
| 34 | 34 |      { | 
| 35 | -        return array_map(function (ClassMethod $method) { | |
| 35 | +        return array_map(function(ClassMethod $method) { | |
| 36 | 36 | return $this->buildMethod($method); | 
| 37 | 37 | }, $this->runFilters($classMethods)); | 
| 38 | 38 | } | 
| @@ -55,7 +55,7 @@ discard block | ||
| 55 | 55 | |
| 56 | 56 | private function buildParameters(array $parameters, ?string $docBlock): array | 
| 57 | 57 |      { | 
| 58 | -        return array_map(function (Param $parameter) use ($docBlock) { | |
| 58 | +        return array_map(function(Param $parameter) use ($docBlock) { | |
| 59 | 59 |              $name = "\${$parameter->name}"; | 
| 60 | 60 | $type = $parameter->type; | 
| 61 | 61 |              if ($type !== null) { | 
| @@ -31,10 +31,10 @@ | ||
| 31 | 31 | */ | 
| 32 | 32 | public function build(array $classAttributes): array | 
| 33 | 33 |      { | 
| 34 | -        $constants = array_filter($classAttributes, function ($attribute) { | |
| 34 | +        $constants = array_filter($classAttributes, function($attribute) { | |
| 35 | 35 | return $attribute instanceof ClassConst; | 
| 36 | 36 | }); | 
| 37 | -        return array_map(function (ClassConst $constant) { | |
| 37 | +        return array_map(function(ClassConst $constant) { | |
| 38 | 38 | return new Constant( | 
| 39 | 39 | $constant->consts[0]->name, | 
| 40 | 40 | TypeDeclaration::from($this->determineType($constant->consts[0])) | 
| @@ -31,11 +31,11 @@ | ||
| 31 | 31 | */ | 
| 32 | 32 | public function build(array $definitionAttributes): array | 
| 33 | 33 |      { | 
| 34 | -        $attributes = array_filter($definitionAttributes, function ($attribute) { | |
| 34 | +        $attributes = array_filter($definitionAttributes, function($attribute) { | |
| 35 | 35 | return $attribute instanceof Property; | 
| 36 | 36 | }); | 
| 37 | 37 | |
| 38 | -        return array_map(function (Property $attribute) { | |
| 38 | +        return array_map(function(Property $attribute) { | |
| 39 | 39 |              $name = "\${$attribute->props[0]->name}"; | 
| 40 | 40 | $modifier = $this->resolveVisibility($attribute); | 
| 41 | 41 | $comment = $attribute->getDocComment(); | 
| @@ -59,7 +59,7 @@ discard block | ||
| 59 | 59 | return []; | 
| 60 | 60 | } | 
| 61 | 61 | |
| 62 | -        $constructors = array_filter($this->methods, function (Method $method) { | |
| 62 | +        $constructors = array_filter($this->methods, function(Method $method) { | |
| 63 | 63 | return $method->isConstructor(); | 
| 64 | 64 | }); | 
| 65 | 65 | |
| @@ -73,7 +73,7 @@ discard block | ||
| 73 | 73 | */ | 
| 74 | 74 | public function countAttributesByVisibility(Visibility $modifier): int | 
| 75 | 75 |      { | 
| 76 | -        return \count(array_filter($this->attributes, function (Attribute $attribute) use ($modifier) { | |
| 76 | +        return \count(array_filter($this->attributes, function(Attribute $attribute) use ($modifier) { | |
| 77 | 77 | return $attribute->hasVisibility($modifier); | 
| 78 | 78 | })); | 
| 79 | 79 | } | 
| @@ -85,7 +85,7 @@ discard block | ||
| 85 | 85 | */ | 
| 86 | 86 | public function countTypedAttributesByVisibility(Visibility $modifier): int | 
| 87 | 87 |      { | 
| 88 | -        return \count(array_filter($this->attributes, function (Attribute $attribute) use ($modifier) { | |
| 88 | +        return \count(array_filter($this->attributes, function(Attribute $attribute) use ($modifier) { | |
| 89 | 89 | return $attribute->hasTypeDeclaration() && $attribute->hasVisibility($modifier); | 
| 90 | 90 | })); | 
| 91 | 91 | } | 
| @@ -141,7 +141,7 @@ discard block | ||
| 141 | 141 | */ | 
| 142 | 142 | public function isAbstract(): bool | 
| 143 | 143 |      { | 
| 144 | -        return \count(array_filter($this->methods(), function (Method $method) { | |
| 144 | +        return \count(array_filter($this->methods(), function(Method $method) { | |
| 145 | 145 | return $method->isAbstract(); | 
| 146 | 146 | })) > 0; | 
| 147 | 147 | } | 
| @@ -154,7 +154,7 @@ discard block | ||
| 154 | 154 | |
| 155 | 155 | private function hasConstructor(): bool | 
| 156 | 156 |      { | 
| 157 | -        return \count(array_filter($this->methods, function (Method $function) { | |
| 157 | +        return \count(array_filter($this->methods, function(Method $function) { | |
| 158 | 158 | return $function->isConstructor(); | 
| 159 | 159 | })) === 1; | 
| 160 | 160 | } |