@@ -32,7 +32,7 @@ |
||
32 | 32 | } |
33 | 33 | |
34 | 34 | /** |
35 | - * @return FQCN |
|
35 | + * @return \Padawan\Domain\Core\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\Core\Node\ClassData |
|
28 | + */ |
|
25 | 29 | public function getClass() |
26 | 30 | { |
27 | 31 | return $this->getParent()->getClass(); |
@@ -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; |
@@ -172,7 +172,7 @@ |
||
172 | 172 | */ |
173 | 173 | protected function removeType($type) |
174 | 174 | { |
175 | - if((bool) ($this->type & $type)){ |
|
175 | + if ((bool) ($this->type & $type)) { |
|
176 | 176 | $this->type ^= $type; |
177 | 177 | } |
178 | 178 | } |
@@ -4,8 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use Padawan\Domain\Core\Project; |
6 | 6 | use Padawan\Domain\Core\Index; |
7 | -use Padawan\Command\ErrorCommand; |
|
8 | -use DI\Container; |
|
9 | 7 | use Padawan\Domain\Event\ProjectLoadedEvent; |
10 | 8 | use Padawan\Framework\Application\BaseApplication; |
11 | 9 | use Psr\Log\LoggerInterface; |
@@ -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); |
@@ -2,8 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace Padawan\Framework\Generator; |
4 | 4 | |
5 | -use Padawan\Domain\Core\Node\ClassData; |
|
6 | -use Padawan\Domain\Core\Node\InterfaceData; |
|
7 | 5 | use Padawan\Domain\Event\IndexGenerationEvent; |
8 | 6 | use Padawan\Domain\Core\Index; |
9 | 7 | use Padawan\Domain\Core\Project; |
@@ -19,6 +19,11 @@ |
||
19 | 19 | $str = serialize($project); |
20 | 20 | return $str; |
21 | 21 | } |
22 | + |
|
23 | + /** |
|
24 | + * @param string $fileName |
|
25 | + * @param string $data |
|
26 | + */ |
|
22 | 27 | protected function writeToFile($fileName, $data) |
23 | 28 | { |
24 | 29 | $this->getPath()->write($fileName, $data); |
@@ -14,6 +14,10 @@ discard block |
||
14 | 14 | { |
15 | 15 | return $this->path->canonical($path); |
16 | 16 | } |
17 | + |
|
18 | + /** |
|
19 | + * @param string $from |
|
20 | + */ |
|
17 | 21 | public function relative($from, $to, $addDot = false) |
18 | 22 | { |
19 | 23 | $fromParts = array_values(array_filter($this->path->split($from))); |
@@ -111,6 +115,10 @@ discard block |
||
111 | 115 | return $file !== '.' && $file !== '..' && $file !== '.git'; |
112 | 116 | }); |
113 | 117 | } |
118 | + |
|
119 | + /** |
|
120 | + * @param string $dir |
|
121 | + */ |
|
114 | 122 | public function getDirFilesRecursive($dir) |
115 | 123 | { |
116 | 124 | $files = []; |