@@ -78,7 +78,9 @@ |
||
78 | 78 | } |
79 | 79 | |
80 | 80 | public function setCode($code) { |
81 | - if (!\is_numeric($code)) throw new \InvalidArgumentException('expected numeric'); |
|
81 | + if (!\is_numeric($code)) { |
|
82 | + throw new \InvalidArgumentException('expected numeric'); |
|
83 | + } |
|
82 | 84 | $this->code = $code; |
83 | 85 | return $this; |
84 | 86 | } |
@@ -520,7 +520,9 @@ discard block |
||
520 | 520 | } |
521 | 521 | |
522 | 522 | foreach (array_reverse($releases) as $idx => $release) { |
523 | - if ($idx <= ($quantity - 1)) continue; |
|
523 | + if ($idx <= ($quantity - 1)) { |
|
524 | + continue; |
|
525 | + } |
|
524 | 526 | $proccess = new Process('rm -r ' . $release); |
525 | 527 | $proccess->run(); |
526 | 528 | } |
@@ -532,16 +534,24 @@ discard block |
||
532 | 534 | } |
533 | 535 | |
534 | 536 | public function absolutePath($path, $cwd) { |
535 | - if ($path[0] == '/') return $path; |
|
537 | + if ($path[0] == '/') { |
|
538 | + return $path; |
|
539 | + } |
|
536 | 540 | return $cwd . DIRECTORY_SEPARATOR . $path; |
537 | 541 | } |
538 | 542 | |
539 | 543 | public function makeStructure($path, array $structure) { |
540 | 544 | foreach ($structure as $sections) { |
541 | 545 | foreach ($sections as $section => $item) { |
542 | - if ($section == 'dirs') mkdir($path . DIRECTORY_SEPARATOR . $item, 0777, true); |
|
543 | - if ($section == 'files') touch($path . DIRECTORY_SEPARATOR . $item); |
|
544 | - if ($section == 'links') link($path . DIRECTORY_SEPARATOR . explode(':', $item)[0], $path . DIRECTORY_SEPARATOR . explode(':', $item)[1]); |
|
546 | + if ($section == 'dirs') { |
|
547 | + mkdir($path . DIRECTORY_SEPARATOR . $item, 0777, true); |
|
548 | + } |
|
549 | + if ($section == 'files') { |
|
550 | + touch($path . DIRECTORY_SEPARATOR . $item); |
|
551 | + } |
|
552 | + if ($section == 'links') { |
|
553 | + link($path . DIRECTORY_SEPARATOR . explode(':', $item)[0], $path . DIRECTORY_SEPARATOR . explode(':', $item)[1]); |
|
554 | + } |
|
545 | 555 | } |
546 | 556 | } |
547 | 557 | } |