@@ -22,6 +22,10 @@ |
||
| 22 | 22 | { |
| 23 | 23 | return $this->getParent()->getFQCN(); |
| 24 | 24 | } |
| 25 | + |
|
| 26 | + /** |
|
| 27 | + * @return \Padawan\Domain\Project\Node\ClassData |
|
| 28 | + */ |
|
| 25 | 29 | public function getClass() |
| 26 | 30 | { |
| 27 | 31 | return $this->getParent()->getClass(); |
@@ -16,6 +16,11 @@ |
||
| 16 | 16 | { |
| 17 | 17 | $this->typeResolver = $typeResolver; |
| 18 | 18 | } |
| 19 | + |
|
| 20 | + /** |
|
| 21 | + * @param \Padawan\Domain\Scope\MethodScope $scope |
|
| 22 | + * @param \Padawan\Domain\Project\Index $index |
|
| 23 | + */ |
|
| 19 | 24 | public function transform(Assign $node, ClassData $class, $scope, $index) |
| 20 | 25 | { |
| 21 | 26 | $fetch = $node->var; |
@@ -8,15 +8,12 @@ |
||
| 8 | 8 | if ($namespace) { |
| 9 | 9 | if ($namespace instanceof FQN) { |
| 10 | 10 | $this->parts = $namespace->getParts(); |
| 11 | - } |
|
| 12 | - elseif (!is_array($namespace)) { |
|
| 11 | + } elseif (!is_array($namespace)) { |
|
| 13 | 12 | $this->parts = explode("\\", $namespace); |
| 14 | - } |
|
| 15 | - else { |
|
| 13 | + } else { |
|
| 16 | 14 | $this->parts = $namespace; |
| 17 | 15 | } |
| 18 | - } |
|
| 19 | - else { |
|
| 16 | + } else { |
|
| 20 | 17 | $this->parts = []; |
| 21 | 18 | } |
| 22 | 19 | } |
@@ -7,8 +7,7 @@ |
||
| 7 | 7 | public function __get($key) { |
| 8 | 8 | if ($key === "className") { |
| 9 | 9 | return $this->getClassName(); |
| 10 | - } |
|
| 11 | - elseif ($key === "namespace") { |
|
| 10 | + } elseif ($key === "namespace") { |
|
| 12 | 11 | return $this->getNamespace(); |
| 13 | 12 | } |
| 14 | 13 | } |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | /** |
| 46 | 46 | * @param integer $modifier |
| 47 | 47 | */ |
| 48 | - public function setModifier($modifier){ |
|
| 48 | + public function setModifier($modifier) { |
|
| 49 | 49 | $this->modifier = $modifier; |
| 50 | 50 | } |
| 51 | 51 | } |