Completed
Pull Request — master (#120)
by hadi
01:34
created
src/CheckNamespaces.php 1 patch
Doc Comments   +14 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@  discard block
 block discarded – undo
19 19
     /**
20 20
      * Get all of the listeners and their corresponding events.
21 21
      *
22
-     * @param  iterable  $paths
22
+     * @param  \Symfony\Component\Finder\Finder  $paths
23 23
      * @param  $composerPath
24 24
      * @param  $composerNamespace
25
-     * @param  $command
25
+     * @param  Commands\CheckPsr4 $command
26 26
      *
27 27
      * @return void
28 28
      */
@@ -79,6 +79,9 @@  discard block
 block discarded – undo
79 79
         }
80 80
     }
81 81
 
82
+    /**
83
+     * @param string $relativePath
84
+     */
82 85
     private static function warn($currentNamespace, $relativePath, $class)
83 86
     {
84 87
         /**
@@ -107,6 +110,9 @@  discard block
 block discarded – undo
107 110
         return Str::startsWith($buffer, '<?php');
108 111
     }
109 112
 
113
+    /**
114
+     * @param string $correctNamespace
115
+     */
110 116
     protected static function doNamespaceCorrection($absFilePath, $currentNamespace, $correctNamespace)
111 117
     {
112 118
         event('laravel_microscope.namespace_fixing', get_defined_vars());
@@ -114,6 +120,9 @@  discard block
 block discarded – undo
114 120
         event('laravel_microscope.namespace_fixed', get_defined_vars());
115 121
     }
116 122
 
123
+    /**
124
+     * @param string $correctNamespace
125
+     */
117 126
     private static function ask($command, $correctNamespace)
118 127
     {
119 128
         if ($command->option('force')) {
@@ -123,6 +132,9 @@  discard block
 block discarded – undo
123 132
         return $command->getOutput()->confirm('Do you want to change it to: '.$correctNamespace, true);
124 133
     }
125 134
 
135
+    /**
136
+     * @param string $correctNamespace
137
+     */
126 138
     private static function changedNamespaces($class, $currentNamespace, $correctNamespace)
127 139
     {
128 140
         $_currentClass = $currentNamespace.'\\'.$class;
Please login to merge, or discard this patch.
src/Commands/CheckPsr4.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -178,6 +178,10 @@
 block discarded – undo
178 178
         app(ErrorPrinter::class)->simplePendError($_path, $line, '', 'ns_replacement', 'Namespace replacement:');
179 179
     }
180 180
 
181
+    /**
182
+     * @param ErrorPrinter $errorPrinter
183
+     * @param double $time
184
+     */
181 185
     private function printErrorsCount($errorPrinter, $time)
182 186
     {
183 187
         if ($errorCount = $errorPrinter->errorsList['total']) {
Please login to merge, or discard this patch.
src/Commands/CheckEndIf.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -63,6 +63,9 @@
 block discarded – undo
63 63
         $this->warn(PHP_EOL.$tries.' fixes applied to: '.class_basename($filePath));
64 64
     }
65 65
 
66
+    /**
67
+     * @param integer $fixed
68
+     */
66 69
     private function printFinalMsg($fixed)
67 70
     {
68 71
         if ($fixed > 0) {
Please login to merge, or discard this patch.
src/Refactors/SyntaxNormalizer.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -108,6 +108,9 @@
 block discarded – undo
108 108
         return $refactoredTokens;
109 109
     }
110 110
 
111
+    /**
112
+     * @param integer $i
113
+     */
111 114
     private static function removeSemi(&$tokens, $i)
112 115
     {
113 116
         [$next, $u] = FunctionCall::getNextToken($tokens, $i);
Please login to merge, or discard this patch.
src/Commands/CheckEarlyReturns.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -84,6 +84,10 @@
 block discarded – undo
84 84
         return [$fixes, $tokens];
85 85
     }
86 86
 
87
+    /**
88
+     * @param integer $fixed
89
+     * @param integer $fixingFilesCount
90
+     */
87 91
     private function printFinalMsg($fixed, $fixingFilesCount)
88 92
     {
89 93
         if ($fixed > 0) {
Please login to merge, or discard this patch.
src/Analyzers/Refactor.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -59,6 +59,9 @@
 block discarded – undo
59 59
         return $string;
60 60
     }
61 61
 
62
+    /**
63
+     * @param \Closure $refactor
64
+     */
62 65
     private static function recursiveRefactor($tokens, $refactor)
63 66
     {
64 67
         $i = $changes = 0;
Please login to merge, or discard this patch.
src/Checks/PSR12/CurlyBraces.php 1 patch
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -37,6 +37,10 @@  discard block
 block discarded – undo
37 37
         }
38 38
     }
39 39
 
40
+    /**
41
+     * @param integer $level
42
+     * @param integer $i
43
+     */
40 44
     private static function openCurly($token, $level, $tokens, $i, $classFilePath)
41 45
     {
42 46
         if ($token == '{' && ! \in_array($tokens[$i - 1][0], [T_DOUBLE_COLON, T_OBJECT_OPERATOR])) {
@@ -55,6 +59,11 @@  discard block
 block discarded – undo
55 59
         }
56 60
     }
57 61
 
62
+    /**
63
+     * @param integer $level
64
+     * @param boolean $isInClass
65
+     * @param integer $i
66
+     */
58 67
     private static function writePublic($level, $token, $isInClass, $i, $tokens, $absolutePath)
59 68
     {
60 69
         if (($level != 1) || ($token[0] != T_FUNCTION) || ! $isInClass) {
Please login to merge, or discard this patch.
src/Analyzers/NamespaceCorrector.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -74,6 +74,9 @@
 block discarded – undo
74 74
         return trim(implode('\\', $arr), '\\');
75 75
     }
76 76
 
77
+    /**
78
+     * @param string $class1
79
+     */
77 80
     public static function haveSameNamespace($class1, $class2)
78 81
     {
79 82
         return self::getNamespaceFromFullClass($class1) == self::getNamespaceFromFullClass($class2);
Please login to merge, or discard this patch.
src/Analyzers/ClassMethods.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -70,6 +70,9 @@
 block discarded – undo
70 70
         return $class;
71 71
     }
72 72
 
73
+    /**
74
+     * @param integer $i
75
+     */
73 76
     private static function findVisibility($tokens, $i)
74 77
     {
75 78
         $isStatic = $tokens[$i][0] === T_STATIC && $i -= 2;
Please login to merge, or discard this patch.