@@ -28,6 +28,10 @@ |
||
28 | 28 | $this->logger = $logger; |
29 | 29 | $this->useParser = $useParser; |
30 | 30 | } |
31 | + |
|
32 | + /** |
|
33 | + * @param string $badLine |
|
34 | + */ |
|
31 | 35 | public function getContext($badLine, Index $index, Scope $scope = null) |
32 | 36 | { |
33 | 37 | if (empty($scope)) { |
@@ -145,6 +145,7 @@ |
||
145 | 145 | } |
146 | 146 | |
147 | 147 | /** |
148 | + * @param \PhpParser\Node $node |
|
148 | 149 | * @return Chain |
149 | 150 | */ |
150 | 151 | protected function createChain($node) |
@@ -93,6 +93,10 @@ |
||
93 | 93 | ); |
94 | 94 | $index->addParsedFile($file); |
95 | 95 | } |
96 | + |
|
97 | + /** |
|
98 | + * @return null|FileScope |
|
99 | + */ |
|
96 | 100 | public function createScopeForFile($file, Index $index, $createCache = true) |
97 | 101 | { |
98 | 102 | $startParser = microtime(1); |
@@ -88,6 +88,10 @@ |
||
88 | 88 | } |
89 | 89 | return $line >= $startLine; |
90 | 90 | } |
91 | + |
|
92 | + /** |
|
93 | + * @param Node $node |
|
94 | + */ |
|
91 | 95 | public function getNodeLines($node) |
92 | 96 | { |
93 | 97 | $startLine = $endLine = -1; |
@@ -162,6 +162,10 @@ |
||
162 | 162 | { |
163 | 163 | $this->type = $type; |
164 | 164 | } |
165 | + |
|
166 | + /** |
|
167 | + * @param integer $type |
|
168 | + */ |
|
165 | 169 | protected function addType($type) |
166 | 170 | { |
167 | 171 | $this->type |= $type; |
@@ -32,7 +32,7 @@ |
||
32 | 32 | } |
33 | 33 | |
34 | 34 | /** |
35 | - * @return FQCN |
|
35 | + * @return \Padawan\Domain\Project\FQCN |
|
36 | 36 | */ |
37 | 37 | public function getFQCN() |
38 | 38 | { |
@@ -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(); |
@@ -35,6 +35,10 @@ discard block |
||
35 | 35 | $content = $this->path->read($file); |
36 | 36 | return $this->parseContent($file, $content, $uses, $createCache); |
37 | 37 | } |
38 | + |
|
39 | + /** |
|
40 | + * @return \Padawan\Domain\Scope\FileScope |
|
41 | + */ |
|
38 | 42 | public function parseContent($file, $content, Uses $uses = null, $createCache = true) |
39 | 43 | { |
40 | 44 | if ($createCache) { |
@@ -110,6 +114,10 @@ discard block |
||
110 | 114 | } |
111 | 115 | return $nodes; |
112 | 116 | } |
117 | + |
|
118 | + /** |
|
119 | + * @param \Padawan\Domain\Project\Index $index |
|
120 | + */ |
|
113 | 121 | public function setIndex($index) |
114 | 122 | { |
115 | 123 | foreach ($this->walkers as $walker) { |
@@ -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; |