@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | */ |
| 34 | 34 | public function fromAttributes(ClassDefinition $class, Structure $structure): array |
| 35 | 35 | { |
| 36 | - return array_map(function (Variable $attribute) use ($class, $structure) { |
|
| 36 | + return array_map(function(Variable $attribute) use ($class, $structure) { |
|
| 37 | 37 | return $this->addAssociation($class, $attribute, $structure); |
| 38 | 38 | }, array_filter($class->attributes(), [$this, 'needAssociation'])); |
| 39 | 39 | } |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | if (!$class->hasConstructor()) { |
| 52 | 52 | return []; |
| 53 | 53 | } |
| 54 | - return array_map(function (Variable $attribute) use ($class, $structure) { |
|
| 54 | + return array_map(function(Variable $attribute) use ($class, $structure) { |
|
| 55 | 55 | return $this->addAssociation($class, $attribute, $structure); |
| 56 | 56 | }, array_filter($class->constructorParameters(), [$this, 'needAssociation'])); |
| 57 | 57 | } |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | /** @param \PhpParser\Node\Stmt\Class_|\PhpParser\Node\Stmt\Interface_ $definition */ |
| 37 | 37 | public function build(array $classMethods): array |
| 38 | 38 | { |
| 39 | - return array_map(function (ClassMethod $method) { |
|
| 39 | + return array_map(function(ClassMethod $method) { |
|
| 40 | 40 | return $this->buildMethod($method); |
| 41 | 41 | }, $this->runFilters($classMethods)); |
| 42 | 42 | } |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | |
| 54 | 54 | private function buildParameters(array $parameters): array |
| 55 | 55 | { |
| 56 | - return array_map(function (Param $parameter) { |
|
| 56 | + return array_map(function(Param $parameter) { |
|
| 57 | 57 | return [ |
| 58 | 58 | "\${$parameter->name}", |
| 59 | 59 | $parameter->type, |
@@ -33,11 +33,11 @@ |
||
| 33 | 33 | { |
| 34 | 34 | public function build(array $classAttributes): array |
| 35 | 35 | { |
| 36 | - $attributes = array_filter($classAttributes, function ($attribute) { |
|
| 36 | + $attributes = array_filter($classAttributes, function($attribute) { |
|
| 37 | 37 | return $attribute instanceof Property; |
| 38 | 38 | }); |
| 39 | 39 | |
| 40 | - return array_map(function (Property $attribute) { |
|
| 40 | + return array_map(function(Property $attribute) { |
|
| 41 | 41 | return [ |
| 42 | 42 | "\${$attribute->props[0]->name}", |
| 43 | 43 | $this->resolveVisibility($attribute), |