Completed
Push — master ( 3b99ef...4f2ace )
by Andrii
05:22
created
src/components/Config.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -72,6 +72,9 @@
 block discarded – undo
72 72
         return false;
73 73
     }
74 74
 
75
+    /**
76
+     * @param string $id
77
+     */
75 78
     public function getGoal($id)
76 79
     {
77 80
         return Yii::$app->createControllerById($id);
Please login to merge, or discard this patch.
src/base/File.php 1 patch
Doc Comments   +12 added lines patch added patch discarded remove patch
@@ -122,6 +122,9 @@  discard block
 block discarded – undo
122 122
         return $type2extension[$type];
123 123
     }
124 124
 
125
+    /**
126
+     * @param string $extension
127
+     */
125 128
     public function getTypeByExtension($extension)
126 129
     {
127 130
         return static::$_extension2type[$extension];
@@ -132,6 +135,9 @@  discard block
 block discarded – undo
132 135
         return ($this->goal ? $this->goal->fileType : null) ?: static::getTypeByExtension($this->_extension) ?: 'template';
133 136
     }
134 137
 
138
+    /**
139
+     * @param string $path
140
+     */
135 141
     public function setPath($path)
136 142
     {
137 143
         $path             = Yii::getAlias($path);
@@ -208,6 +214,9 @@  discard block
 block discarded – undo
208 214
         return $this->handler->renderPath($this->path, $this->data);
209 215
     }
210 216
 
217
+    /**
218
+     * @param string $content
219
+     */
211 220
     public function write($content)
212 221
     {
213 222
         return $this->handler->write($this->path, $content);
@@ -218,6 +227,9 @@  discard block
 block discarded – undo
218 227
         return $this->data = $this->handler->parsePath($this->path, $this->minimalPath);
219 228
     }
220 229
 
230
+    /**
231
+     * @return string
232
+     */
221 233
     public function read()
222 234
     {
223 235
         return $this->handler->read($this->path);
Please login to merge, or discard this patch.
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/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/controllers/AbstractController.php 1 patch
Doc Comments   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     }
49 49
 
50 50
     /**
51
-     * @return int|Response exit code
51
+     * @return null|integer exit code
52 52
      */
53 53
     public function actionMake()
54 54
     {
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
     /**
143 143
      * Is response NOT Ok.
144 144
      * @param Response|int $res
145
-     * @return bool
145
+     * @return integer
146 146
      */
147 147
     public static function isNotOk($res)
148 148
     {
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 
152 152
     /**
153 153
      * Is response Ok.
154
-     * @param Response|int $res
154
+     * @param integer $res
155 155
      * @return bool
156 156
      */
157 157
     public static function isOk($res)
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
      * Runs list of actions.
164 164
      * TODO: think to redo with runRequests.
165 165
      * @param null|string|array $actions
166
-     * @return int|Response exit code
166
+     * @return null|integer exit code
167 167
      */
168 168
     public function runActions($actions)
169 169
     {
@@ -240,6 +240,9 @@  discard block
 block discarded – undo
240 240
         return readline($prompt);
241 241
     }
242 242
 
243
+    /**
244
+     * @param string $prompt
245
+     */
243 246
     public function readpassword($prompt)
244 247
     {
245 248
         echo $prompt;
@@ -250,6 +253,9 @@  discard block
 block discarded – undo
250 253
         return $password;
251 254
     }
252 255
 
256
+    /**
257
+     * @param string $id
258
+     */
253 259
     public static function takeGoal($id)
254 260
     {
255 261
         return Yii::$app->get('config')->getGoal($id);
Please login to merge, or discard this patch.
src/helpers/Helper.php 1 patch
Doc Comments   +12 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);
@@ -35,6 +41,9 @@  discard block
 block discarded – undo
35 41
         return str_replace('--', '-', Inflector::camel2id(str_replace(' ', '', ucwords($name)), $separator, $strict));
36 42
     }
37 43
 
44
+    /**
45
+     * @param string $file
46
+     */
38 47
     public static function file2template($file, $separator = '-')
39 48
     {
40 49
         return trim($file, '.');
@@ -70,6 +79,9 @@  discard block
 block discarded – undo
70 79
         return array_combine($res, $res);
71 80
     }
72 81
 
82
+    /**
83
+     * @param string $subj
84
+     */
73 85
     public static function getPublicVars($subj)
74 86
     {
75 87
         return is_object($subj) ? get_object_vars($subj) : get_class_vars($subj);
Please login to merge, or discard this patch.
src/base/Application.php 1 patch
Doc Comments   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -86,7 +86,6 @@  discard block
 block discarded – undo
86 86
 
87 87
     /**
88 88
      * Load extra config files.
89
-     * @param array $config
90 89
      */
91 90
     public function loadExtraVendor($dir)
92 91
     {
@@ -185,8 +184,8 @@  discard block
 block discarded – undo
185 184
 
186 185
     /**
187 186
      * Run request.
188
-     * @param string|array $query
189
-     * @return Response
187
+     * @param string $query
188
+     * @return \yii\console\Response
190 189
      */
191 190
     public function runRequest($query)
192 191
     {
Please login to merge, or discard this patch.