@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | */ |
| 87 | 87 | public function addConstant(Constant $constant): void |
| 88 | 88 | { |
| 89 | - $this->constants[(string) $constant->getFqsen()] = $constant; |
|
| 89 | + $this->constants[(string)$constant->getFqsen()] = $constant; |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | /** |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | */ |
| 105 | 105 | public function addMethod(Method $method): void |
| 106 | 106 | { |
| 107 | - $this->methods[(string) $method->getFqsen()] = $method; |
|
| 107 | + $this->methods[(string)$method->getFqsen()] = $method; |
|
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | /** |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | */ |
| 82 | 82 | public function addMethod(Method $method): void |
| 83 | 83 | { |
| 84 | - $this->methods[(string) $method->getFqsen()] = $method; |
|
| 84 | + $this->methods[(string)$method->getFqsen()] = $method; |
|
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | /** |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | */ |
| 100 | 100 | public function addProperty(Property $property): void |
| 101 | 101 | { |
| 102 | - $this->properties[(string) $property->getFqsen()] = $property; |
|
| 102 | + $this->properties[(string)$property->getFqsen()] = $property; |
|
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | /** |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | */ |
| 139 | 139 | public function addUsedTrait(Fqsen $fqsen): void |
| 140 | 140 | { |
| 141 | - $this->usedTraits[(string) $fqsen] = $fqsen; |
|
| 141 | + $this->usedTraits[(string)$fqsen] = $fqsen; |
|
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | public function getLocation(): Location |
@@ -94,7 +94,7 @@ |
||
| 94 | 94 | */ |
| 95 | 95 | public function addNamespace(Namespace_ $namespace): void |
| 96 | 96 | { |
| 97 | - $this->namespaces[(string) $namespace->getFqsen()] = $namespace; |
|
| 97 | + $this->namespaces[(string)$namespace->getFqsen()] = $namespace; |
|
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | /** |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | */ |
| 68 | 68 | public function addClass(Fqsen $class): void |
| 69 | 69 | { |
| 70 | - $this->classes[(string) $class] = $class; |
|
| 70 | + $this->classes[(string)$class] = $class; |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | /** |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | */ |
| 86 | 86 | public function addConstant(Fqsen $contant): void |
| 87 | 87 | { |
| 88 | - $this->constants[(string) $contant] = $contant; |
|
| 88 | + $this->constants[(string)$contant] = $contant; |
|
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | /** |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | */ |
| 104 | 104 | public function addFunction(Fqsen $function): void |
| 105 | 105 | { |
| 106 | - $this->functions[(string) $function] = $function; |
|
| 106 | + $this->functions[(string)$function] = $function; |
|
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | /** |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | */ |
| 122 | 122 | public function addInterface(Fqsen $interface): void |
| 123 | 123 | { |
| 124 | - $this->interfaces[(string) $interface] = $interface; |
|
| 124 | + $this->interfaces[(string)$interface] = $interface; |
|
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | /** |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | */ |
| 140 | 140 | public function addTrait(Fqsen $trait): void |
| 141 | 141 | { |
| 142 | - $this->traits[(string) $trait] = $trait; |
|
| 142 | + $this->traits[(string)$trait] = $trait; |
|
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | /** |
@@ -56,9 +56,9 @@ |
||
| 56 | 56 | if ($object->getReturnType() !== null) { |
| 57 | 57 | $typeResolver = new TypeResolver(); |
| 58 | 58 | if ($object->getReturnType() instanceof NullableType) { |
| 59 | - $typeString = '?' . $object->getReturnType()->type; |
|
| 59 | + $typeString = '?'.$object->getReturnType()->type; |
|
| 60 | 60 | } else { |
| 61 | - $typeString = (string) $object->getReturnType(); |
|
| 61 | + $typeString = (string)$object->getReturnType(); |
|
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | $returnType = $typeResolver->resolve($typeString, $context); |
@@ -154,6 +154,8 @@ |
||
| 154 | 154 | |
| 155 | 155 | /** |
| 156 | 156 | * @param Node[] $nodes |
| 157 | + * @param StrategyContainer $strategies |
|
| 158 | + * @param Context $context |
|
| 157 | 159 | */ |
| 158 | 160 | protected function createFileDocBlock( |
| 159 | 161 | ?Doc $docBlock = null, |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | { |
| 60 | 60 | $this->nodesFactory = $nodesFactory; |
| 61 | 61 | |
| 62 | - $lastCallable = function ($command) { |
|
| 62 | + $lastCallable = function($command) { |
|
| 63 | 63 | return $this->createFile($command); |
| 64 | 64 | }; |
| 65 | 65 | |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | private function createElements(Fqsen $namespace, array $nodes, FileElement $file, StrategyContainer $strategies): void |
| 122 | 122 | { |
| 123 | 123 | $contextFactory = new ContextFactory(); |
| 124 | - $context = $contextFactory->createForNamespace((string) $namespace, $file->getSource()); |
|
| 124 | + $context = $contextFactory->createForNamespace((string)$namespace, $file->getSource()); |
|
| 125 | 125 | foreach ($nodes as $node) { |
| 126 | 126 | switch (get_class($node)) { |
| 127 | 127 | case ClassNode::class: |