@@ -17,10 +17,10 @@ discard block |
||
17 | 17 | /** |
18 | 18 | * Get all of the listeners and their corresponding events. |
19 | 19 | * |
20 | - * @param iterable $paths |
|
20 | + * @param \Symfony\Component\Finder\Finder $paths |
|
21 | 21 | * @param $composerPath |
22 | 22 | * @param $composerNamespace |
23 | - * @param $command |
|
23 | + * @param Commands\CheckPsr4 $command |
|
24 | 24 | * |
25 | 25 | * @return void |
26 | 26 | */ |
@@ -83,6 +83,9 @@ discard block |
||
83 | 83 | app(ErrorPrinter::class)->errorsList['total'] = 0; |
84 | 84 | } |
85 | 85 | |
86 | + /** |
|
87 | + * @param string $relativePath |
|
88 | + */ |
|
86 | 89 | private static function warn($currentNamespace, $relativePath) |
87 | 90 | { |
88 | 91 | /** |
@@ -110,6 +113,9 @@ discard block |
||
110 | 113 | return Str::startsWith($buffer, '<?php'); |
111 | 114 | } |
112 | 115 | |
116 | + /** |
|
117 | + * @param string $correctNamespace |
|
118 | + */ |
|
113 | 119 | protected static function doNamespaceCorrection($absFilePath, $currentNamespace, $correctNamespace) |
114 | 120 | { |
115 | 121 | event('laravel_microscope.namespace_fixing', get_defined_vars()); |
@@ -117,6 +123,9 @@ discard block |
||
117 | 123 | event('laravel_microscope.namespace_fixed', get_defined_vars()); |
118 | 124 | } |
119 | 125 | |
126 | + /** |
|
127 | + * @param string $correctNamespace |
|
128 | + */ |
|
120 | 129 | private static function ask($command, $correctNamespace) |
121 | 130 | { |
122 | 131 | return $command->getOutput()->confirm('Do you want to change it to: '.$correctNamespace, true); |
@@ -47,6 +47,10 @@ discard block |
||
47 | 47 | $this->pendError($absPath, $lineNumber, $relatedModel, 'badRelation', $header); |
48 | 48 | } |
49 | 49 | |
50 | + /** |
|
51 | + * @param string $key |
|
52 | + * @param string $header |
|
53 | + */ |
|
50 | 54 | public function pendError($path, $lineNumber, $absent, $key, $header) |
51 | 55 | { |
52 | 56 | ($this->errorsList[$key][] = (new PendingError($key)) |
@@ -64,6 +68,11 @@ discard block |
||
64 | 68 | ->link($absPath, $lineNumber)); |
65 | 69 | } |
66 | 70 | |
71 | + /** |
|
72 | + * @param string $absent |
|
73 | + * @param string $key |
|
74 | + * @param string $header |
|
75 | + */ |
|
67 | 76 | public function simplePendError($path, $lineNumber, $absent, $key, $header) |
68 | 77 | { |
69 | 78 | ($this->errorsList[$key][] = (new PendingError($key)) |
@@ -150,6 +159,9 @@ discard block |
||
150 | 159 | ->link($absPath, $lineNumber)); |
151 | 160 | } |
152 | 161 | |
162 | + /** |
|
163 | + * @param integer $len |
|
164 | + */ |
|
153 | 165 | public function print($msg, $path = '| ', $len = null) |
154 | 166 | { |
155 | 167 | ! $len && $len = PendingError::$maxLength + 1; |
@@ -165,6 +177,9 @@ discard block |
||
165 | 177 | $this->printer->writeln($path.$msg.str_repeat(' ', $len).'|'); |
166 | 178 | } |
167 | 179 | |
180 | + /** |
|
181 | + * @param string $msg |
|
182 | + */ |
|
168 | 183 | public function printHeader($msg) |
169 | 184 | { |
170 | 185 | $number = ++$this->errorsList['total']; |
@@ -223,6 +238,9 @@ discard block |
||
223 | 238 | } |
224 | 239 | } |
225 | 240 | |
241 | + /** |
|
242 | + * @param string $key |
|
243 | + */ |
|
226 | 244 | public function getCount($key) |
227 | 245 | { |
228 | 246 | return count($this->errorsList[$key] ?? []); |