Completed
Push — master ( 93ffee...848a12 )
by Iman
01:24
created
src/Analyzers/FunctionCall.php 1 patch
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -16,6 +16,9 @@  discard block
 block discarded – undo
16 16
         return [$nextToken, $i];
17 17
     }
18 18
 
19
+    /**
20
+     * @param string[] $tokenType
21
+     */
19 22
     public static function forwardTo($tokens, $i, $tokenType)
20 23
     {
21 24
         $i++;
@@ -46,6 +49,9 @@  discard block
 block discarded – undo
46 49
         return ($tokens[0][0] == T_CONSTANT_ENCAPSED_STRING) && ($nextToken !== '.');
47 50
     }
48 51
 
52
+    /**
53
+     * @param string $funcName
54
+     */
49 55
     public static function isGlobalCall($funcName, &$tokens, $i)
50 56
     {
51 57
         $expectedTokens = [
@@ -80,6 +86,9 @@  discard block
 block discarded – undo
80 86
         return self::checkTokens($expectedTokens, $tokens, $i);
81 87
     }
82 88
 
89
+    /**
90
+     * @param string $methodName
91
+     */
83 92
     public static function isMethodCallOnThis($methodName, &$tokens, $i)
84 93
     {
85 94
         $expectedTokens = [
Please login to merge, or discard this patch.
src/Refactors/IfElse.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -20,6 +20,10 @@
 block discarded – undo
20 20
         }
21 21
     }
22 22
 
23
+    /**
24
+     * @param integer $elseCount
25
+     * @param integer $ifBody
26
+     */
23 27
     private static function shouldBeFlipped($elseCount, $ifBody)
24 28
     {
25 29
         $ifIsLonger = ($elseCount + 10) < $ifBody;
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
@@ -58,6 +58,9 @@
 block discarded – undo
58 58
         return $stringOutput;
59 59
     }
60 60
 
61
+    /**
62
+     * @param \Closure $refactor
63
+     */
61 64
     private static function recursiveRefactor($tokens, $refactor)
62 65
     {
63 66
         $i = $changes = 0;
Please login to merge, or discard this patch.
src/Refactors/EarlyReturns.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -71,6 +71,9 @@
 block discarded – undo
71 71
         return [$tokens, $changes];
72 72
     }
73 73
 
74
+    /**
75
+     * @return string
76
+     */
74 77
     private static function getKeyword($token)
75 78
     {
76 79
         return self::scopeKeywords[$token];
Please login to merge, or discard this patch.
src/Checks/ExtractBladePartial.php 1 patch
Doc Comments   +12 added lines patch added patch discarded remove patch
@@ -45,6 +45,9 @@  discard block
 block discarded – undo
45 45
         return $tokens;
46 46
     }
47 47
 
48
+    /**
49
+     * @param string $name
50
+     */
48 51
     public static function find($name)
49 52
     {
50 53
         if (self::hasHintInformation($name = trim($name))) {
@@ -61,6 +64,9 @@  discard block
 block discarded – undo
61 64
         }, ['blade.php']);
62 65
     }
63 66
 
67
+    /**
68
+     * @param string $name
69
+     */
64 70
     protected static function findNamespacedView($name)
65 71
     {
66 72
         [$namespace, $view] = self::parseNamespaceSegments($name);
@@ -95,11 +101,17 @@  discard block
 block discarded – undo
95 101
         }
96 102
     }
97 103
 
104
+    /**
105
+     * @param string $name
106
+     */
98 107
     public static function hasHintInformation($name)
99 108
     {
100 109
         return strpos($name, '::') > 0;
101 110
     }
102 111
 
112
+    /**
113
+     * @param string $message
114
+     */
103 115
     public static function forceFilePutContents($filepath, $message){
104 116
         try {
105 117
             $isInFolder = preg_match("/^(.*)\/([^\/]+)$/", $filepath, $filepathMatches);
Please login to merge, or discard this patch.
src/Commands/CheckRoutes.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -60,6 +60,9 @@
 block discarded – undo
60 60
         return 'Error on route '.$msg;
61 61
     }
62 62
 
63
+    /**
64
+     * @param ErrorPrinter $errorPrinter
65
+     */
63 66
     private function checkRouteDefinitions($errorPrinter, $routes)
64 67
     {
65 68
         foreach ($routes as $route) {
Please login to merge, or discard this patch.
src/Commands/CheckEarlyReturns.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -56,6 +56,9 @@  discard block
 block discarded – undo
56 56
         return app(ErrorPrinter::class)->hasErrors() ? 1 : 0;
57 57
     }
58 58
 
59
+    /**
60
+     * @param integer $tries
61
+     */
59 62
     private function fix($filePath, $tokens, $tries)
60 63
     {
61 64
         Refactor::saveTokens($filePath, $tokens, $this->option('test'));
@@ -73,6 +76,9 @@  discard block
 block discarded – undo
73 76
         return [$fixes, $tokens];
74 77
     }
75 78
 
79
+    /**
80
+     * @param integer $fixed
81
+     */
76 82
     private function printFinalMsg($fixed)
77 83
     {
78 84
         if ($fixed > 0) {
Please login to merge, or discard this patch.
src/SpyClasses/SpyDispatcher.php 1 patch
Doc Comments   +12 added lines patch added patch discarded remove patch
@@ -59,6 +59,9 @@  discard block
 block discarded – undo
59 59
         return class_exists($eventName, false) ? $this->addOriginInterfaceListeners($eventName, $listeners) : $listeners;
60 60
     }
61 61
 
62
+    /**
63
+     * @param string $string
64
+     */
62 65
     private function error($string)
63 66
     {
64 67
         $len = strlen($string);
@@ -95,6 +98,9 @@  discard block
 block discarded – undo
95 98
         }
96 99
     }
97 100
 
101
+    /**
102
+     * @return string
103
+     */
98 104
     private function stringify($event)
99 105
     {
100 106
         return is_object($event) ? get_class($event) : $event;
@@ -116,6 +122,9 @@  discard block
 block discarded – undo
116 122
         return 'The method of '.$at.' is not callable as an event listener for "'.$e.'" event';
117 123
     }
118 124
 
125
+    /**
126
+     * @return string
127
+     */
119 128
     protected function getTypeHintedClass($listenerObj, $methodName)
120 129
     {
121 130
         try {
@@ -141,6 +150,9 @@  discard block
 block discarded – undo
141 150
         return $listeners;
142 151
     }
143 152
 
153
+    /**
154
+     * @param \Closure $listener
155
+     */
144 156
     private function stringifyClosure($listener)
145 157
     {
146 158
         try {
Please login to merge, or discard this patch.
src/Commands/PrettyPrintRoutes.php 1 patch
Doc Comments   +19 added lines patch added patch discarded remove patch
@@ -35,6 +35,9 @@  discard block
 block discarded – undo
35 35
         }
36 36
     }
37 37
 
38
+    /**
39
+     * @param \Illuminate\Routing\Route $route
40
+     */
38 41
     private function writeIt($route, $filename)
39 42
     {
40 43
         try {
@@ -57,6 +60,9 @@  discard block
 block discarded – undo
57 60
         }
58 61
     }
59 62
 
63
+    /**
64
+     * @param string $value
65
+     */
60 66
     private function deduceRoute($value)
61 67
     {
62 68
         if (Str::containsAll($value, ['@', '\\'])) {
@@ -68,6 +74,9 @@  discard block
 block discarded – undo
68 74
         return $route;
69 75
     }
70 76
 
77
+    /**
78
+     * @param \Illuminate\Routing\Route $route
79
+     */
71 80
     private function printIt($route)
72 81
     {
73 82
         try {
@@ -80,6 +89,10 @@  discard block
 block discarded – undo
80 89
         }
81 90
     }
82 91
 
92
+    /**
93
+     * @param string $action
94
+     * @param string $middlewareSection
95
+     */
83 96
     private function getMovableRoute($route, $methods, $action, $middlewareSection)
84 97
     {
85 98
         if ($action == '\Illuminate\Routing\ViewController::class') {
@@ -117,6 +130,9 @@  discard block
 block discarded – undo
117 130
         return ($middlewares ? '->middleware(['.$middlewares."])" : '');
118 131
     }
119 132
 
133
+    /**
134
+     * @param Exception $e
135
+     */
120 136
     private function handleRouteProblem($e)
121 137
     {
122 138
         $this->info('The route has some problem.');
@@ -124,6 +140,9 @@  discard block
 block discarded – undo
124 140
         $this->info($e->getFile());
125 141
     }
126 142
 
143
+    /**
144
+     * @param string $middlewares
145
+     */
127 146
     private function prettyPrintInConsole($route, $middlewares)
128 147
     {
129 148
         $this->getOutput()->writeln('---------------------------------------------------');
Please login to merge, or discard this patch.