Completed
Push — master ( 50290f...697c20 )
by Andrii
06:06
created
src/base/File.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -109,6 +109,9 @@  discard block
 block discarded – undo
109 109
         return $type2extension[$type];
110 110
     }
111 111
 
112
+    /**
113
+     * @param string $extension
114
+     */
112 115
     public function getTypeByExtension($extension)
113 116
     {
114 117
         return static::$_extension2type[$extension];
@@ -119,6 +122,9 @@  discard block
 block discarded – undo
119 122
         return ($this->goal ? $this->goal->fileType : null) ?: static::getTypeByExtension($this->_extension) ?: 'template';
120 123
     }
121 124
 
125
+    /**
126
+     * @param string $path
127
+     */
122 128
     public function setPath($path)
123 129
     {
124 130
         $path             = Yii::getAlias($path);
Please login to merge, or discard this patch.
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.
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/goals/ConfigGoal.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -41,6 +41,9 @@  discard block
 block discarded – undo
41 41
         return $this->hasItem($name) || class_exists($this->getGoalClass($name));
42 42
     }
43 43
 
44
+    /**
45
+     * @return string
46
+     */
44 47
     public function getGoalClass($name)
45 48
     {
46 49
         return $this->getItemConfig($name)['class'];
@@ -57,6 +60,9 @@  discard block
 block discarded – undo
57 60
         return is_scalar($config) ? ['class' => $config] : (array) $config;
58 61
     }
59 62
 
63
+    /**
64
+     * @return string
65
+     */
60 66
     public static function goal2class($id, $name = null)
61 67
     {
62 68
         $id = $id ?: $name;
Please login to merge, or discard this patch.
src/goals/DefaultGoal.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -117,6 +117,9 @@
 block discarded – undo
117 117
         return $result;
118 118
     }
119 119
 
120
+    /**
121
+     * @param string $actions
122
+     */
120 123
     public function runActions($actions)
121 124
     {
122 125
         foreach (Helper::ksplit($actions) as $action) {
Please login to merge, or discard this patch.
src/goals/ReadmeGoal.php 1 patch
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -24,6 +24,9 @@  discard block
 block discarded – undo
24 24
         return 'README';
25 25
     }
26 26
 
27
+    /**
28
+     * @param string $char
29
+     */
27 30
     public function renderH($title, $char)
28 31
     {
29 32
         $res = $title . "\n";
@@ -42,6 +45,9 @@  discard block
 block discarded – undo
42 45
         return $this->renderH($title, '-');
43 46
     }
44 47
 
48
+    /**
49
+     * @param string $text
50
+     */
45 51
     public function renderText($text)
46 52
     {
47 53
         $text = trim($text);
@@ -66,6 +72,9 @@  discard block
 block discarded – undo
66 72
         return $text ? "\n## $section\n\n$text\n" : '';
67 73
     }
68 74
 
75
+    /**
76
+     * @param string $file
77
+     */
69 78
     public function getSection($file, $default = null)
70 79
     {
71 80
         $view = Yii::$app->getView();
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.