Completed
Push — master ( 43ed69...84af45 )
by Andrii
06:07
created
src/base/History.php 1 patch
Doc Comments   +13 added lines patch added patch discarded remove patch
@@ -65,18 +65,28 @@  discard block
 block discarded – undo
65 65
         $this->_commit = $commit;
66 66
     }
67 67
 
68
+    /**
69
+     * @param string $label
70
+     */
68 71
     public function addTag($tag, $label)
69 72
     {
70 73
         $this->tag                         = $tag;
71 74
         $this->_history[$this->tag]['tag'] = $label ?: $tag;
72 75
     }
73 76
 
77
+    /**
78
+     * @param string $note
79
+     */
74 80
     public function addNote($note, $label = null)
75 81
     {
76 82
         $this->note                                = $note;
77 83
         $this->_history[$this->tag][$note]['note'] = $label ?: $note;
78 84
     }
79 85
 
86
+    /**
87
+     * @param string $commit
88
+     * @param string $label
89
+     */
80 90
     public function addCommit($commit, $label)
81 91
     {
82 92
         $this->commit            = $commit;
@@ -171,6 +181,9 @@  discard block
 block discarded – undo
171 181
         return $res;
172 182
     }
173 183
 
184
+    /**
185
+     * @param string $key
186
+     */
174 187
     public function arrayPop(&$array, $key)
175 188
     {
176 189
         $res = $array[$key];
Please login to merge, or discard this patch.
src/handlers/CommitsHandler.php 1 patch
Doc Comments   +16 added lines patch added patch discarded remove patch
@@ -59,6 +59,9 @@  discard block
 block discarded – undo
59 59
         $this->_hash = $hash;
60 60
     }
61 61
 
62
+    /**
63
+     * @param string $label
64
+     */
62 65
     public function addTag($tag, $label = null)
63 66
     {
64 67
         $this->tag = $tag;
@@ -66,6 +69,9 @@  discard block
 block discarded – undo
66 69
         $ref       = $label ?: $ref ?: $tag;
67 70
     }
68 71
 
72
+    /**
73
+     * @param string $note
74
+     */
69 75
     public function addNote($note, $label = null)
70 76
     {
71 77
         $this->note = $note;
@@ -73,6 +79,10 @@  discard block
 block discarded – undo
73 79
         $ref        = $label ?: $ref ?: $note;
74 80
     }
75 81
 
82
+    /**
83
+     * @param string $hash
84
+     * @param string $label
85
+     */
76 86
     public function addHash($hash, $label)
77 87
     {
78 88
         $this->_hash                    = $hash;
@@ -183,6 +193,9 @@  discard block
 block discarded – undo
183 193
         return $res;
184 194
     }
185 195
 
196
+    /**
197
+     * @param string $key
198
+     */
186 199
     public static function arrayPop(&$array, $key)
187 200
     {
188 201
         $res = $array[$key];
@@ -239,6 +252,9 @@  discard block
 block discarded – undo
239 252
         return $date ? date(' Y-m-d', strtotime($date)) : '';
240 253
     }
241 254
 
255
+    /**
256
+     * @param string $string
257
+     */
242 258
     public static function renderHeader($string)
243 259
     {
244 260
         $header = Yii::$app->config->package->fullName . ' ' . $string;
Please login to merge, or discard this patch.
src/helpers/Helper.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -19,6 +19,9 @@  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);
@@ -70,6 +73,9 @@  discard block
 block discarded – undo
70 73
         return array_combine($res, $res);
71 74
     }
72 75
 
76
+    /**
77
+     * @param string $subj
78
+     */
73 79
     public static function getPublicVars($subj)
74 80
     {
75 81
         return is_object($subj) ? get_object_vars($subj) : get_class_vars($subj);
Please login to merge, or discard this patch.
src/base/File.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
      */
90 90
     protected static $_extension2type = [
91 91
         'json'      => 'json',
92
-        'yml'       => 'yaml',  /// first one is preferred
92
+        'yml'       => 'yaml', /// first one is preferred
93 93
         'yaml'      => 'yaml',
94 94
         'xml'       => 'xml',
95 95
         'xml.dist'  => 'xml',
Please login to merge, or discard this 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/handlers/BaseHandler.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
      *
91 91
      * @param mixed $data
92 92
      *
93
-     * @return string file content
93
+     * @return boolean file content
94 94
      */
95 95
     public function renderPath($path, $data)
96 96
     {
Please login to merge, or discard this patch.
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/controllers/AbstractController.php 1 patch
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
      * Runs list of actions.
140 140
      * TODO: think to redo with runRequests
141 141
      * @param null|string|array $actions
142
-     * @return int|Response exit code
142
+     * @return null|integer exit code
143 143
      */
144 144
     public function runActions($actions)
145 145
     {
@@ -199,6 +199,9 @@  discard block
 block discarded – undo
199 199
         return Yii::$app->get('binaries')->passthru($name, $args);
200 200
     }
201 201
 
202
+    /**
203
+     * @param string $id
204
+     */
202 205
     public function takeGoal($id)
203 206
     {
204 207
         return Yii::$app->get('config')->getGoal($id);
Please login to merge, or discard this patch.
src/controllers/StartController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
     protected function findDir()
79 79
     {
80 80
         $configDir = '.hidev';
81
-        for ($i = 0;$i < 9;++$i) {
81
+        for ($i = 0; $i < 9; ++$i) {
82 82
             if (is_dir($configDir)) {
83 83
                 return getcwd();
84 84
             }
Please login to merge, or discard this patch.
src/base/Application.php 1 patch
Doc Comments   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,6 @@  discard block
 block discarded – undo
69 69
 
70 70
     /**
71 71
      * Load extra config files.
72
-     * @param array $config
73 72
      * @return void
74 73
      */
75 74
     public function loadExtraVendor($dir)
@@ -134,6 +133,9 @@  discard block
 block discarded – undo
134 133
         return $controller;
135 134
     }
136 135
 
136
+    /**
137
+     * @param string $string
138
+     */
137 139
     public function runRequest($string)
138 140
     {
139 141
         $request = Yii::createObject([
Please login to merge, or discard this patch.