@@ -21,16 +21,25 @@ discard block |
||
| 21 | 21 | $this->argumentFormatLoader = new ArgumentFormatLoader($fs); |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | + /** |
|
| 25 | + * @param string $name |
|
| 26 | + */ |
|
| 24 | 27 | protected function getTemplate($name) |
| 25 | 28 | { |
| 26 | 29 | return $this->templates->load($name); |
| 27 | 30 | } |
| 28 | 31 | |
| 32 | + /** |
|
| 33 | + * @param string $name |
|
| 34 | + */ |
|
| 29 | 35 | protected function getArgumentParser($name){ |
| 30 | 36 | $format = $this->argumentFormatLoader->load($name); |
| 31 | 37 | return new ArgumentParser($format); |
| 32 | 38 | } |
| 33 | 39 | |
| 40 | + /** |
|
| 41 | + * @param string $content |
|
| 42 | + */ |
|
| 34 | 43 | protected function save($content, $path, $name, $force = false) |
| 35 | 44 | { |
| 36 | 45 | if (!$force && $this->fs->exists($path) && $this->input->hasOption('force') && !$this->option('force')) { |
@@ -49,6 +58,9 @@ discard block |
||
| 49 | 58 | } |
| 50 | 59 | } |
| 51 | 60 | |
| 61 | + /** |
|
| 62 | + * @param integer $n |
|
| 63 | + */ |
|
| 52 | 64 | protected function spaces($n) |
| 53 | 65 | { |
| 54 | 66 | return str_repeat(' ', $n); |
@@ -168,6 +168,9 @@ discard block |
||
| 168 | 168 | |
| 169 | 169 | } |
| 170 | 170 | |
| 171 | + /** |
|
| 172 | + * @param string $tag |
|
| 173 | + */ |
|
| 171 | 174 | protected function fieldsHavingTag($tag) |
| 172 | 175 | { |
| 173 | 176 | return array_map(function($field){ |
@@ -199,6 +202,9 @@ discard block |
||
| 199 | 202 | }, $this->fields); |
| 200 | 203 | } |
| 201 | 204 | |
| 205 | + /** |
|
| 206 | + * @return string |
|
| 207 | + */ |
|
| 202 | 208 | protected function getBaseModel($path) { |
| 203 | 209 | $index = strrpos($path, "\\"); |
| 204 | 210 | if($index) { |
@@ -291,6 +291,10 @@ discard block |
||
| 291 | 291 | return $string; |
| 292 | 292 | } |
| 293 | 293 | |
| 294 | + /** |
|
| 295 | + * @param string $old |
|
| 296 | + * @param string $new |
|
| 297 | + */ |
|
| 294 | 298 | protected function convertArray($list, $old, $new) |
| 295 | 299 | { |
| 296 | 300 | return implode($new, array_filter(explode($old, $list), function($item){ |
@@ -355,11 +359,17 @@ discard block |
||
| 355 | 359 | return array(array(), $seen);//, array($item) |
| 356 | 360 | } |
| 357 | 361 | |
| 362 | + /** |
|
| 363 | + * @param string $message |
|
| 364 | + */ |
|
| 358 | 365 | protected function checkError($message, $model = "", $file = "") { |
| 359 | 366 | $this->checkErrors[] = array("message" => $message, "model" => $model, "file" => $file); |
| 360 | 367 | $this->checkedErrors++; |
| 361 | 368 | } |
| 362 | 369 | |
| 370 | + /** |
|
| 371 | + * @param string $message |
|
| 372 | + */ |
|
| 363 | 373 | protected function checkInfo($message, $model = "", $file = "") { |
| 364 | 374 | $this->checkInfo[] = array("message" => $message, "model" => $model, "file" => $file); |
| 365 | 375 | } |
@@ -373,6 +383,9 @@ discard block |
||
| 373 | 383 | } |
| 374 | 384 | } |
| 375 | 385 | |
| 386 | + /** |
|
| 387 | + * @param string $type |
|
| 388 | + */ |
|
| 376 | 389 | protected function checkRelations($relations, $type, $file, $model, $keys) { |
| 377 | 390 | if ($relations) { |
| 378 | 391 | $position = array_search($model, $keys); |
@@ -395,6 +408,9 @@ discard block |
||
| 395 | 408 | } |
| 396 | 409 | } |
| 397 | 410 | |
| 411 | + /** |
|
| 412 | + * @param string $rType |
|
| 413 | + */ |
|
| 398 | 414 | protected function checkPivotRelations($relations, $rType) { |
| 399 | 415 | if ($relations) { |
| 400 | 416 | foreach($relations as $relation) { |