@@ -137,10 +137,10 @@ |
||
| 137 | 137 | if(is_file($destination)){ |
| 138 | 138 | if($options['onDuplicate'] == self::ERROR){ |
| 139 | 139 | $this->error("File '$destination' already exists."); |
| 140 | - }elseif($options['onDuplicate'] == self::SKIP){ |
|
| 140 | + } elseif($options['onDuplicate'] == self::SKIP){ |
|
| 141 | 141 | $this->log("File '$destination' already exists, skipping ..."); |
| 142 | 142 | continue; |
| 143 | - }elseif($options['onDuplicate'] == self::REWRITE){ |
|
| 143 | + } elseif($options['onDuplicate'] == self::REWRITE){ |
|
| 144 | 144 | @unlink($destination); |
| 145 | 145 | } |
| 146 | 146 | } |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | $container = require_once $bootstrapFile; |
| 55 | 55 | if ($container === 1 || $container === TRUE) { // 1 = success, TRUE = already required |
| 56 | 56 | $container = NULL; |
| 57 | - }elseif (!($container instanceof Container)) { |
|
| 57 | + } elseif (!($container instanceof Container)) { |
|
| 58 | 58 | $this->log("Returned value from bootstrap.php must be instance of 'Genesis\\Container\\Container' or nothing (NULL).", 'red'); |
| 59 | 59 | exit(255); |
| 60 | 60 | } |
@@ -99,12 +99,18 @@ discard block |
||
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | |
| 102 | + /** |
|
| 103 | + * @param integer $code |
|
| 104 | + */ |
|
| 102 | 105 | protected function terminate($code) |
| 103 | 106 | { |
| 104 | 107 | throw new TerminateException(NULL, $code); |
| 105 | 108 | } |
| 106 | 109 | |
| 107 | 110 | |
| 111 | + /** |
|
| 112 | + * @param string $workingDir |
|
| 113 | + */ |
|
| 108 | 114 | protected function detectBootstrapFilename($workingDir) |
| 109 | 115 | { |
| 110 | 116 | return $workingDir . DIRECTORY_SEPARATOR . 'bootstrap.php'; |
@@ -112,6 +118,8 @@ discard block |
||
| 112 | 118 | |
| 113 | 119 | |
| 114 | 120 | /** |
| 121 | + * @param string $workingDir |
|
| 122 | + * @param string $configFile |
|
| 115 | 123 | * @return Container |
| 116 | 124 | */ |
| 117 | 125 | protected function createContainer($workingDir, $configFile, Container $bootstrapContainer = NULL) |
@@ -165,6 +173,9 @@ discard block |
||
| 165 | 173 | } |
| 166 | 174 | |
| 167 | 175 | |
| 176 | + /** |
|
| 177 | + * @param IBuild $class |
|
| 178 | + */ |
|
| 168 | 179 | protected function getAutowiredProperties($class) |
| 169 | 180 | { |
| 170 | 181 | $return = []; |
@@ -180,6 +191,10 @@ discard block |
||
| 180 | 191 | } |
| 181 | 192 | |
| 182 | 193 | |
| 194 | + /** |
|
| 195 | + * @param string $color |
|
| 196 | + * @param string $backgroundColor |
|
| 197 | + */ |
|
| 183 | 198 | protected function log($message, $color = NULL, $backgroundColor = NULL) |
| 184 | 199 | { |
| 185 | 200 | echo Cli::getColoredString($message . PHP_EOL, $color, $backgroundColor); |