Completed
Push — master ( c13e1e...aaa1c3 )
by Andrii
12:24
created
src/controllers/GithubController.php 1 patch
Doc Comments   +5 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
     /**
114 114
      * Action to check if repo exists.
115 115
      * @param string $repo full name vendor/package defaults to this repo name
116
-     * @return int exit code
116
+     * @return boolean exit code
117 117
      */
118 118
     public function actionExists($repo = null)
119 119
     {
@@ -160,6 +160,10 @@  discard block
 block discarded – undo
160 160
         return 0;
161 161
     }
162 162
 
163
+    /**
164
+     * @param string $method
165
+     * @param string $path
166
+     */
163 167
     public function request($method, $path, $data)
164 168
     {
165 169
         $url = 'https://api.github.com' . $path;
Please login to merge, or discard this patch.
src/helpers/Helper.php 1 patch
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -19,11 +19,17 @@  discard block
 block discarded – undo
19 19
  */
20 20
 class Helper
21 21
 {
22
+    /**
23
+     * @return string
24
+     */
22 25
     public static function bad2sep($str, $separator = '-')
23 26
     {
24 27
         return preg_replace('/[^a-zA-Z0-9-]/', $separator, $str);
25 28
     }
26 29
 
30
+    /**
31
+     * @param string $id
32
+     */
27 33
     public static function id2camel($id, $separator = '-')
28 34
     {
29 35
         return Inflector::id2camel(self::bad2sep($id, $separator), $separator);
@@ -70,6 +76,9 @@  discard block
 block discarded – undo
70 76
         return array_combine($res, $res);
71 77
     }
72 78
 
79
+    /**
80
+     * @param string $subj
81
+     */
73 82
     public static function getPublicVars($subj)
74 83
     {
75 84
         return is_object($subj) ? get_object_vars($subj) : get_class_vars($subj);
Please login to merge, or discard this patch.
src/handlers/BaseHandler.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      *
92 92
      * @param mixed $data
93 93
      *
94
-     * @return string file content
94
+     * @return boolean file content
95 95
      */
96 96
     public function renderPath($path, $data)
97 97
     {
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
      * Read file into a string or array.
157 157
      * @param string $path
158 158
      * @param bool $asArray
159
-     * @return string|array
159
+     * @return string
160 160
      */
161 161
     public function read($path, $asArray = false)
162 162
     {
Please login to merge, or discard this patch.
src/base/Controller.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -56,6 +56,9 @@
 block discarded – undo
56 56
         return readline($prompt);
57 57
     }
58 58
 
59
+    /**
60
+     * @param string $prompt
61
+     */
59 62
     public function readpassword($prompt)
60 63
     {
61 64
         echo $prompt;
Please login to merge, or discard this patch.
src/base/File.php 1 patch
Doc Comments   +13 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
     /**
90 90
      * Create file object.
91
-     * @param string|array $path or config
91
+     * @param string $path or config
92 92
      * @return File
93 93
      */
94 94
     public static function create($path)
@@ -144,6 +144,9 @@  discard block
 block discarded – undo
144 144
         return $type2extension[$type];
145 145
     }
146 146
 
147
+    /**
148
+     * @param string $extension
149
+     */
147 150
     public function getTypeByExtension($extension)
148 151
     {
149 152
         return isset(static::$_extension2type[$extension]) ? static::$_extension2type[$extension] : null;
@@ -158,6 +161,9 @@  discard block
 block discarded – undo
158 161
         return ($this->goal ? $this->goal->fileType : null) ?: static::getTypeByExtension($this->_extension) ?: 'template';
159 162
     }
160 163
 
164
+    /**
165
+     * @param string $path
166
+     */
161 167
     public function setPath($path)
162 168
     {
163 169
         $path             = Yii::getAlias($path);
@@ -234,6 +240,9 @@  discard block
 block discarded – undo
234 240
         return $this->getHandler()->renderPath($this->getPath(), $this->data);
235 241
     }
236 242
 
243
+    /**
244
+     * @param string $content
245
+     */
237 246
     public function write($content)
238 247
     {
239 248
         return $this->getHandler()->write($this->getPath(), $content);
@@ -244,6 +253,9 @@  discard block
 block discarded – undo
244 253
         return $this->data = $this->getHandler()->parsePath($this->getPath(), $this->getMinimalPath());
245 254
     }
246 255
 
256
+    /**
257
+     * @return string
258
+     */
247 259
     public function read()
248 260
     {
249 261
         return $this->getHandler()->read($this->getPath());
Please login to merge, or discard this patch.
src/base/GettersTrait.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -28,6 +28,9 @@
 block discarded – undo
28 28
         return $this->_view;
29 29
     }
30 30
 
31
+    /**
32
+     * @param string $id
33
+     */
31 34
     public function take($id)
32 35
     {
33 36
         return $this->getApp()->get($id);
Please login to merge, or discard this patch.
src/base/Starter.php 1 patch
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
     /**
228 228
      * Passthru command.
229 229
      * @param string $command
230
-     * @param array $args
230
+     * @param string[] $args
231 231
      * @return int exit code
232 232
      */
233 233
     private function passthru($command, $args)
@@ -324,6 +324,9 @@  discard block
 block discarded – undo
324 324
         throw new InvalidParamException("Not a hidev project (or any of the parent directories).\nUse `hidev init` to initialize hidev project.");
325 325
     }
326 326
 
327
+    /**
328
+     * @param string $subpath
329
+     */
327 330
     public function buildRootPath($subpath)
328 331
     {
329 332
         return $this->getRootDir() . DIRECTORY_SEPARATOR . $subpath;
Please login to merge, or discard this patch.
src/controllers/AbstractController.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     }
48 48
 
49 49
     /**
50
-     * @return int|Response exit code
50
+     * @return null|integer exit code
51 51
      */
52 52
     public function actionMake()
53 53
     {
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     /**
142 142
      * Is response NOT Ok.
143 143
      * @param Response|int $res
144
-     * @return bool
144
+     * @return integer
145 145
      */
146 146
     public static function isNotOk($res)
147 147
     {
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
      * Runs list of actions.
163 163
      * TODO: think to redo with runRequests.
164 164
      * @param null|string|array $actions
165
-     * @return int|Response exit code
165
+     * @return null|integer exit code
166 166
      */
167 167
     public function runActions($actions)
168 168
     {
Please login to merge, or discard this patch.
src/controllers/Collection.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -58,6 +58,9 @@
 block discarded – undo
58 58
         return $item;
59 59
     }
60 60
 
61
+    /**
62
+     * @param string $id
63
+     */
61 64
     public function getGoal($id)
62 65
     {
63 66
         return Yii::$app->createControllerById($id);
Please login to merge, or discard this patch.