@@ -21,17 +21,17 @@ discard block |
||
| 21 | 21 | */ |
| 22 | 22 | public function generate() |
| 23 | 23 | { |
| 24 | - $tempPath = sys_get_temp_dir() . '/'; |
|
| 24 | + $tempPath = sys_get_temp_dir().'/'; |
|
| 25 | 25 | |
| 26 | 26 | // FastCGI fix for Windows machines, where temp path is not available to |
| 27 | 27 | // PHP, and defaults to the unwritable system directory. If the temp |
| 28 | 28 | // path is pointing to the system directory, shift to the 'TEMP' |
| 29 | 29 | // sub-folder, which should also exist, but actually be writable. |
| 30 | - if (IS_WIN && $tempPath == getenv("SystemRoot") . '/') { |
|
| 31 | - $tempPath = getenv("SystemRoot") . '/TEMP/'; |
|
| 30 | + if (IS_WIN && $tempPath == getenv("SystemRoot").'/') { |
|
| 31 | + $tempPath = getenv("SystemRoot").'/TEMP/'; |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | - $keyFile = $tempPath . md5(microtime(true)); |
|
| 34 | + $keyFile = $tempPath.md5(microtime(true)); |
|
| 35 | 35 | |
| 36 | 36 | if (!is_dir($tempPath)) { |
| 37 | 37 | mkdir($tempPath); |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | $output = @shell_exec('ssh-keygen -t rsa -b 2048 -f '.$keyFile.' -N "" -C "deploy@phpci"'); |
| 43 | 43 | |
| 44 | 44 | if (!empty($output)) { |
| 45 | - $pub = file_get_contents($keyFile . '.pub'); |
|
| 45 | + $pub = file_get_contents($keyFile.'.pub'); |
|
| 46 | 46 | $prv = file_get_contents($keyFile); |
| 47 | 47 | |
| 48 | 48 | if (!empty($pub)) { |
@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * PHPCI - Continuous Integration for PHP |
|
| 4 | - * |
|
| 5 | - * @copyright Copyright 2014, Block 8 Limited. |
|
| 6 | - * @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md |
|
| 7 | - * @link https://www.phptesting.org/ |
|
| 8 | - */ |
|
| 3 | + * PHPCI - Continuous Integration for PHP |
|
| 4 | + * |
|
| 5 | + * @copyright Copyright 2014, Block 8 Limited. |
|
| 6 | + * @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md |
|
| 7 | + * @link https://www.phptesting.org/ |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | namespace PHPCI\Service; |
| 11 | 11 | |
@@ -45,9 +45,9 @@ discard block |
||
| 45 | 45 | $this->interpolation_vars['%PROJECT%'] = $build->getProjectId(); |
| 46 | 46 | $this->interpolation_vars['%BUILD%'] = $build->getId(); |
| 47 | 47 | $this->interpolation_vars['%PROJECT_TITLE%'] = $build->getProjectTitle(); |
| 48 | - $this->interpolation_vars['%PROJECT_URI%'] = $phpCiUrl . "project/view/" . $build->getProjectId(); |
|
| 48 | + $this->interpolation_vars['%PROJECT_URI%'] = $phpCiUrl."project/view/".$build->getProjectId(); |
|
| 49 | 49 | $this->interpolation_vars['%BUILD_PATH%'] = $buildPath; |
| 50 | - $this->interpolation_vars['%BUILD_URI%'] = $phpCiUrl . "build/view/" . $build->getId(); |
|
| 50 | + $this->interpolation_vars['%BUILD_URI%'] = $phpCiUrl."build/view/".$build->getId(); |
|
| 51 | 51 | $this->interpolation_vars['%PHPCI_COMMIT%'] = $this->interpolation_vars['%COMMIT%']; |
| 52 | 52 | $this->interpolation_vars['%PHPCI_SHORT_COMMIT%'] = $this->interpolation_vars['%SHORT_COMMIT%']; |
| 53 | 53 | $this->interpolation_vars['%PHPCI_COMMIT_MESSAGE%'] = $this->interpolation_vars['%COMMIT_MESSAGE%']; |
@@ -61,16 +61,16 @@ discard block |
||
| 61 | 61 | $this->interpolation_vars['%PHPCI_BUILD_URI%'] = $this->interpolation_vars['%BUILD_URI%']; |
| 62 | 62 | |
| 63 | 63 | putenv('PHPCI=1'); |
| 64 | - putenv('PHPCI_COMMIT=' . $this->interpolation_vars['%COMMIT%']); |
|
| 65 | - putenv('PHPCI_SHORT_COMMIT=' . $this->interpolation_vars['%SHORT_COMMIT%']); |
|
| 66 | - putenv('PHPCI_COMMIT_MESSAGE=' . $this->interpolation_vars['%COMMIT_MESSAGE%']); |
|
| 67 | - putenv('PHPCI_COMMIT_EMAIL=' . $this->interpolation_vars['%COMMIT_EMAIL%']); |
|
| 68 | - putenv('PHPCI_COMMIT_URI=' . $this->interpolation_vars['%COMMIT_URI%']); |
|
| 69 | - putenv('PHPCI_PROJECT=' . $this->interpolation_vars['%PROJECT%']); |
|
| 70 | - putenv('PHPCI_BUILD=' . $this->interpolation_vars['%BUILD%']); |
|
| 71 | - putenv('PHPCI_PROJECT_TITLE=' . $this->interpolation_vars['%PROJECT_TITLE%']); |
|
| 72 | - putenv('PHPCI_BUILD_PATH=' . $this->interpolation_vars['%BUILD_PATH%']); |
|
| 73 | - putenv('PHPCI_BUILD_URI=' . $this->interpolation_vars['%BUILD_URI%']); |
|
| 64 | + putenv('PHPCI_COMMIT='.$this->interpolation_vars['%COMMIT%']); |
|
| 65 | + putenv('PHPCI_SHORT_COMMIT='.$this->interpolation_vars['%SHORT_COMMIT%']); |
|
| 66 | + putenv('PHPCI_COMMIT_MESSAGE='.$this->interpolation_vars['%COMMIT_MESSAGE%']); |
|
| 67 | + putenv('PHPCI_COMMIT_EMAIL='.$this->interpolation_vars['%COMMIT_EMAIL%']); |
|
| 68 | + putenv('PHPCI_COMMIT_URI='.$this->interpolation_vars['%COMMIT_URI%']); |
|
| 69 | + putenv('PHPCI_PROJECT='.$this->interpolation_vars['%PROJECT%']); |
|
| 70 | + putenv('PHPCI_BUILD='.$this->interpolation_vars['%BUILD%']); |
|
| 71 | + putenv('PHPCI_PROJECT_TITLE='.$this->interpolation_vars['%PROJECT_TITLE%']); |
|
| 72 | + putenv('PHPCI_BUILD_PATH='.$this->interpolation_vars['%BUILD_PATH%']); |
|
| 73 | + putenv('PHPCI_BUILD_URI='.$this->interpolation_vars['%BUILD_URI%']); |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | /** |
@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * PHPCI - Continuous Integration for PHP |
|
| 4 | - * |
|
| 5 | - * @copyright Copyright 2014, Block 8 Limited. |
|
| 6 | - * @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md |
|
| 7 | - * @link https://www.phptesting.org/ |
|
| 8 | - */ |
|
| 3 | + * PHPCI - Continuous Integration for PHP |
|
| 4 | + * |
|
| 5 | + * @copyright Copyright 2014, Block 8 Limited. |
|
| 6 | + * @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md |
|
| 7 | + * @link https://www.phptesting.org/ |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | namespace PHPCI\Service; |
| 11 | 11 | |
@@ -1,11 +1,11 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * PHPCI - Continuous Integration for PHP |
|
| 4 | - * |
|
| 5 | - * @copyright Copyright 2014, Block 8 Limited. |
|
| 6 | - * @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md |
|
| 7 | - * @link https://www.phptesting.org/ |
|
| 8 | - */ |
|
| 3 | + * PHPCI - Continuous Integration for PHP |
|
| 4 | + * |
|
| 5 | + * @copyright Copyright 2014, Block 8 Limited. |
|
| 6 | + * @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md |
|
| 7 | + * @link https://www.phptesting.org/ |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | namespace PHPCI; |
| 11 | 11 | |
@@ -22,8 +22,8 @@ discard block |
||
| 22 | 22 | class Controller extends \b8\Controller |
| 23 | 23 | { |
| 24 | 24 | /** |
| 25 | - * @var \b8\View |
|
| 26 | - */ |
|
| 25 | + * @var \b8\View |
|
| 26 | + */ |
|
| 27 | 27 | protected $controllerView; |
| 28 | 28 | |
| 29 | 29 | /** |
@@ -76,8 +76,8 @@ |
||
| 76 | 76 | */ |
| 77 | 77 | protected function setView($action) |
| 78 | 78 | { |
| 79 | - if (View::exists($this->className . '/' . $action)) { |
|
| 80 | - $this->view = new View($this->className . '/' . $action); |
|
| 79 | + if (View::exists($this->className.'/'.$action)) { |
|
| 80 | + $this->view = new View($this->className.'/'.$action); |
|
| 81 | 81 | } |
| 82 | 82 | } |
| 83 | 83 | |
@@ -125,12 +125,12 @@ |
||
| 125 | 125 | |
| 126 | 126 | switch ($error['type']) { |
| 127 | 127 | case 'method': |
| 128 | - $buildError->setMessage($error['class'] . '::' . $error['method'] . ' is missing a docblock.'); |
|
| 128 | + $buildError->setMessage($error['class'].'::'.$error['method'].' is missing a docblock.'); |
|
| 129 | 129 | $buildError->setSeverity(BuildError::SEVERITY_NORMAL); |
| 130 | 130 | break; |
| 131 | 131 | |
| 132 | 132 | case 'class': |
| 133 | - $buildError->setMessage('Class ' . $error['class'] . ' is missing a docblock.'); |
|
| 133 | + $buildError->setMessage('Class '.$error['class'].' is missing a docblock.'); |
|
| 134 | 134 | $buildError->setSeverity(BuildError::SEVERITY_LOW); |
| 135 | 135 | break; |
| 136 | 136 | } |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | public function change() |
| 16 | 16 | { |
| 17 | 17 | } |
| 18 | - */ |
|
| 18 | + */ |
|
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | 21 | * Migrate Up. |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | */ |
| 70 | 70 | public function handleError($level, $message, $file, $line) |
| 71 | 71 | { |
| 72 | - if (error_reporting() & $level) { |
|
| 72 | + if (error_reporting()&$level) { |
|
| 73 | 73 | $exception_level = isset($this->levels[$level]) ? $this->levels[$level] : $level; |
| 74 | 74 | |
| 75 | 75 | throw new \ErrorException( |
@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * PHPCI - Continuous Integration for PHP |
|
| 4 | - * |
|
| 5 | - * @copyright Copyright 2014, Block 8 Limited. |
|
| 6 | - * @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md |
|
| 7 | - * @link https://www.phptesting.org/ |
|
| 8 | - */ |
|
| 3 | + * PHPCI - Continuous Integration for PHP |
|
| 4 | + * |
|
| 5 | + * @copyright Copyright 2014, Block 8 Limited. |
|
| 6 | + * @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md |
|
| 7 | + * @link https://www.phptesting.org/ |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | namespace PHPCI\Service; |
| 11 | 11 | |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | */ |
| 74 | 74 | public function logSuccess($message) |
| 75 | 75 | { |
| 76 | - $this->log("\033[0;32m" . $message . "\033[0m"); |
|
| 76 | + $this->log("\033[0;32m".$message."\033[0m"); |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | /** |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | $this->log( |
| 95 | - "\033[0;31m" . $message . "\033[0m", |
|
| 95 | + "\033[0;31m".$message."\033[0m", |
|
| 96 | 96 | LogLevel::ERROR, |
| 97 | 97 | $context |
| 98 | 98 | ); |
@@ -1,11 +1,11 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * PHPCI - Continuous Integration for PHP |
|
| 4 | - * |
|
| 5 | - * @copyright Copyright 2014, Block 8 Limited. |
|
| 6 | - * @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md |
|
| 7 | - * @link https://www.phptesting.org/ |
|
| 8 | - */ |
|
| 3 | + * PHPCI - Continuous Integration for PHP |
|
| 4 | + * |
|
| 5 | + * @copyright Copyright 2014, Block 8 Limited. |
|
| 6 | + * @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md |
|
| 7 | + * @link https://www.phptesting.org/ |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | namespace PHPCI; |
| 11 | 11 | |
@@ -354,7 +354,7 @@ discard block |
||
| 354 | 354 | $this->buildLogger->log($message, $level, $context); |
| 355 | 355 | } |
| 356 | 356 | |
| 357 | - /** |
|
| 357 | + /** |
|
| 358 | 358 | * Add a success-coloured message to the log. |
| 359 | 359 | * @param string |
| 360 | 360 | */ |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | $message = (string)$record['message']; |
| 53 | 53 | $message = str_replace($this->build->currentBuildPath, '/', $message); |
| 54 | 54 | |
| 55 | - $this->logValue .= $message . PHP_EOL; |
|
| 55 | + $this->logValue .= $message.PHP_EOL; |
|
| 56 | 56 | $this->build->setLog($this->logValue); |
| 57 | 57 | |
| 58 | 58 | Factory::getStore('Build')->save($this->build); |
@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * PHPCI - Continuous Integration for PHP |
|
| 4 | - * |
|
| 5 | - * @copyright Copyright 2014, Block 8 Limited. |
|
| 6 | - * @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md |
|
| 7 | - * @link https://www.phptesting.org/ |
|
| 8 | - */ |
|
| 3 | + * PHPCI - Continuous Integration for PHP |
|
| 4 | + * |
|
| 5 | + * @copyright Copyright 2014, Block 8 Limited. |
|
| 6 | + * @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md |
|
| 7 | + * @link https://www.phptesting.org/ |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | namespace PHPCI\Service; |
| 11 | 11 | |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | if ($stmt->execute()) { |
| 47 | 47 | $res = $stmt->fetchAll(\PDO::FETCH_ASSOC); |
| 48 | 48 | |
| 49 | - $map = function ($item) { |
|
| 49 | + $map = function($item) { |
|
| 50 | 50 | return new \PHPCI\Model\Build($item); |
| 51 | 51 | }; |
| 52 | 52 | $rtn = array_map($map, $res); |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | if ($stmt->execute()) { |
| 96 | 96 | $res = $stmt->fetchAll(\PDO::FETCH_ASSOC); |
| 97 | 97 | |
| 98 | - $map = function ($item) { |
|
| 98 | + $map = function($item) { |
|
| 99 | 99 | return new Build($item); |
| 100 | 100 | }; |
| 101 | 101 | |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | $rtn = $stmt->fetchAll(\PDO::FETCH_ASSOC); |
| 174 | 174 | |
| 175 | 175 | $rtn = array_reverse($rtn); |
| 176 | - $rtn = array_map(function ($item) { |
|
| 176 | + $rtn = array_map(function($item) { |
|
| 177 | 177 | $item['meta_value'] = json_decode($item['meta_value'], true); |
| 178 | 178 | return $item; |
| 179 | 179 | }, $rtn); |
@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * PHPCI - Continuous Integration for PHP |
|
| 4 | - * |
|
| 5 | - * @copyright Copyright 2014, Block 8 Limited. |
|
| 6 | - * @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md |
|
| 7 | - * @link https://www.phptesting.org/ |
|
| 8 | - */ |
|
| 3 | + * PHPCI - Continuous Integration for PHP |
|
| 4 | + * |
|
| 5 | + * @copyright Copyright 2014, Block 8 Limited. |
|
| 6 | + * @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md |
|
| 7 | + * @link https://www.phptesting.org/ |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | namespace PHPCI\Service; |
| 11 | 11 | |