@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | public function getById($value, $useConnection = 'read') |
| 36 | 36 | { |
| 37 | 37 | if (is_null($value)) { |
| 38 | - throw new HttpException('Value passed to ' . __FUNCTION__ . ' cannot be null.'); |
|
| 38 | + throw new HttpException('Value passed to '.__FUNCTION__.' cannot be null.'); |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | $query = 'SELECT * FROM `build` WHERE `id` = :id LIMIT 1'; |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | public function getByProjectId($value, $limit = 1000, $useConnection = 'read') |
| 59 | 59 | { |
| 60 | 60 | if (is_null($value)) { |
| 61 | - throw new HttpException('Value passed to ' . __FUNCTION__ . ' cannot be null.'); |
|
| 61 | + throw new HttpException('Value passed to '.__FUNCTION__.' cannot be null.'); |
|
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | if ($stmt->execute()) { |
| 71 | 71 | $res = $stmt->fetchAll(\PDO::FETCH_ASSOC); |
| 72 | 72 | |
| 73 | - $map = function ($item) { |
|
| 73 | + $map = function($item) { |
|
| 74 | 74 | return new Build($item); |
| 75 | 75 | }; |
| 76 | 76 | $rtn = array_map($map, $res); |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | public function getByStatus($value, $limit = 1000, $useConnection = 'read') |
| 91 | 91 | { |
| 92 | 92 | if (is_null($value)) { |
| 93 | - throw new HttpException('Value passed to ' . __FUNCTION__ . ' cannot be null.'); |
|
| 93 | + throw new HttpException('Value passed to '.__FUNCTION__.' cannot be null.'); |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | if ($stmt->execute()) { |
| 103 | 103 | $res = $stmt->fetchAll(\PDO::FETCH_ASSOC); |
| 104 | 104 | |
| 105 | - $map = function ($item) { |
|
| 105 | + $map = function($item) { |
|
| 106 | 106 | return new Build($item); |
| 107 | 107 | }; |
| 108 | 108 | $rtn = array_map($map, $res); |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | public function getById($value, $useConnection = 'read') |
| 36 | 36 | { |
| 37 | 37 | if (is_null($value)) { |
| 38 | - throw new HttpException('Value passed to ' . __FUNCTION__ . ' cannot be null.'); |
|
| 38 | + throw new HttpException('Value passed to '.__FUNCTION__.' cannot be null.'); |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | $query = 'SELECT * FROM `build_error` WHERE `id` = :id LIMIT 1'; |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | public function getByBuildId($value, $limit = 1000, $useConnection = 'read') |
| 59 | 59 | { |
| 60 | 60 | if (is_null($value)) { |
| 61 | - throw new HttpException('Value passed to ' . __FUNCTION__ . ' cannot be null.'); |
|
| 61 | + throw new HttpException('Value passed to '.__FUNCTION__.' cannot be null.'); |
|
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | if ($stmt->execute()) { |
| 71 | 71 | $res = $stmt->fetchAll(\PDO::FETCH_ASSOC); |
| 72 | 72 | |
| 73 | - $map = function ($item) { |
|
| 73 | + $map = function($item) { |
|
| 74 | 74 | return new BuildError($item); |
| 75 | 75 | }; |
| 76 | 76 | $rtn = array_map($map, $res); |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | public function getById($value, $useConnection = 'read') |
| 36 | 36 | { |
| 37 | 37 | if (is_null($value)) { |
| 38 | - throw new HttpException('Value passed to ' . __FUNCTION__ . ' cannot be null.'); |
|
| 38 | + throw new HttpException('Value passed to '.__FUNCTION__.' cannot be null.'); |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | $query = 'SELECT * FROM `build_meta` WHERE `id` = :id LIMIT 1'; |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | public function getByProjectId($value, $limit = 1000, $useConnection = 'read') |
| 59 | 59 | { |
| 60 | 60 | if (is_null($value)) { |
| 61 | - throw new HttpException('Value passed to ' . __FUNCTION__ . ' cannot be null.'); |
|
| 61 | + throw new HttpException('Value passed to '.__FUNCTION__.' cannot be null.'); |
|
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | if ($stmt->execute()) { |
| 71 | 71 | $res = $stmt->fetchAll(\PDO::FETCH_ASSOC); |
| 72 | 72 | |
| 73 | - $map = function ($item) { |
|
| 73 | + $map = function($item) { |
|
| 74 | 74 | return new BuildMeta($item); |
| 75 | 75 | }; |
| 76 | 76 | $rtn = array_map($map, $res); |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | public function getByBuildId($value, $limit = 1000, $useConnection = 'read') |
| 91 | 91 | { |
| 92 | 92 | if (is_null($value)) { |
| 93 | - throw new HttpException('Value passed to ' . __FUNCTION__ . ' cannot be null.'); |
|
| 93 | + throw new HttpException('Value passed to '.__FUNCTION__.' cannot be null.'); |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | if ($stmt->execute()) { |
| 103 | 103 | $res = $stmt->fetchAll(\PDO::FETCH_ASSOC); |
| 104 | 104 | |
| 105 | - $map = function ($item) { |
|
| 105 | + $map = function($item) { |
|
| 106 | 106 | return new BuildMeta($item); |
| 107 | 107 | }; |
| 108 | 108 | $rtn = array_map($map, $res); |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | public function getById($value, $useConnection = 'read') |
| 36 | 36 | { |
| 37 | 37 | if (is_null($value)) { |
| 38 | - throw new HttpException('Value passed to ' . __FUNCTION__ . ' cannot be null.'); |
|
| 38 | + throw new HttpException('Value passed to '.__FUNCTION__.' cannot be null.'); |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | $query = 'SELECT * FROM `project` WHERE `id` = :id LIMIT 1'; |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | public function getByTitle($value, $limit = 1000, $useConnection = 'read') |
| 59 | 59 | { |
| 60 | 60 | if (is_null($value)) { |
| 61 | - throw new HttpException('Value passed to ' . __FUNCTION__ . ' cannot be null.'); |
|
| 61 | + throw new HttpException('Value passed to '.__FUNCTION__.' cannot be null.'); |
|
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | if ($stmt->execute()) { |
| 71 | 71 | $res = $stmt->fetchAll(\PDO::FETCH_ASSOC); |
| 72 | 72 | |
| 73 | - $map = function ($item) { |
|
| 73 | + $map = function($item) { |
|
| 74 | 74 | return new Project($item); |
| 75 | 75 | }; |
| 76 | 76 | $rtn = array_map($map, $res); |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | public function getByGroupId($value, $limit = 1000, $useConnection = 'read') |
| 91 | 91 | { |
| 92 | 92 | if (is_null($value)) { |
| 93 | - throw new HttpException('Value passed to ' . __FUNCTION__ . ' cannot be null.'); |
|
| 93 | + throw new HttpException('Value passed to '.__FUNCTION__.' cannot be null.'); |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | if ($stmt->execute()) { |
| 103 | 103 | $res = $stmt->fetchAll(\PDO::FETCH_ASSOC); |
| 104 | 104 | |
| 105 | - $map = function ($item) { |
|
| 105 | + $map = function($item) { |
|
| 106 | 106 | return new Project($item); |
| 107 | 107 | }; |
| 108 | 108 | $rtn = array_map($map, $res); |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | public function getById($value, $useConnection = 'read') |
| 36 | 36 | { |
| 37 | 37 | if (is_null($value)) { |
| 38 | - throw new HttpException('Value passed to ' . __FUNCTION__ . ' cannot be null.'); |
|
| 38 | + throw new HttpException('Value passed to '.__FUNCTION__.' cannot be null.'); |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | $query = 'SELECT * FROM `project_group` WHERE `id` = :id LIMIT 1'; |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | public function getById($value, $useConnection = 'read') |
| 36 | 36 | { |
| 37 | 37 | if (is_null($value)) { |
| 38 | - throw new HttpException('Value passed to ' . __FUNCTION__ . ' cannot be null.'); |
|
| 38 | + throw new HttpException('Value passed to '.__FUNCTION__.' cannot be null.'); |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | $query = 'SELECT * FROM `user` WHERE `id` = :id LIMIT 1'; |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | public function getByEmail($value, $useConnection = 'read') |
| 59 | 59 | { |
| 60 | 60 | if (is_null($value)) { |
| 61 | - throw new HttpException('Value passed to ' . __FUNCTION__ . ' cannot be null.'); |
|
| 61 | + throw new HttpException('Value passed to '.__FUNCTION__.' cannot be null.'); |
|
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | $query = 'SELECT * FROM `user` WHERE `email` = :email LIMIT 1'; |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | public function getByName($value, $limit = 1000, $useConnection = 'read') |
| 82 | 82 | { |
| 83 | 83 | if (is_null($value)) { |
| 84 | - throw new HttpException('Value passed to ' . __FUNCTION__ . ' cannot be null.'); |
|
| 84 | + throw new HttpException('Value passed to '.__FUNCTION__.' cannot be null.'); |
|
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | if ($stmt->execute()) { |
| 94 | 94 | $res = $stmt->fetchAll(\PDO::FETCH_ASSOC); |
| 95 | 95 | |
| 96 | - $map = function ($item) { |
|
| 96 | + $map = function($item) { |
|
| 97 | 97 | return new User($item); |
| 98 | 98 | }; |
| 99 | 99 | $rtn = array_map($map, $res); |
@@ -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\Store; |
| 11 | 11 | |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | if ($stmt->execute()) { |
| 39 | 39 | $res = $stmt->fetchAll(\PDO::FETCH_ASSOC); |
| 40 | 40 | |
| 41 | - $map = function ($item) { |
|
| 41 | + $map = function($item) { |
|
| 42 | 42 | return new BuildMeta($item); |
| 43 | 43 | }; |
| 44 | 44 | $rtn = array_map($map, $res); |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | try { |
| 124 | 124 | $build = BuildFactory::getBuildById($jobData['build_id']); |
| 125 | 125 | } catch (\Exception $ex) { |
| 126 | - $this->logger->addWarning('Build #' . $jobData['build_id'] . ' does not exist in the database.'); |
|
| 126 | + $this->logger->addWarning('Build #'.$jobData['build_id'].' does not exist in the database.'); |
|
| 127 | 127 | $this->pheanstalk->delete($job); |
| 128 | 128 | } |
| 129 | 129 | |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | } catch (\Exception $ex) { |
| 148 | 148 | $build->setStatus(Build::STATUS_FAILED); |
| 149 | 149 | $build->setFinished(new \DateTime()); |
| 150 | - $build->setLog($build->getLog() . PHP_EOL . PHP_EOL . $ex->getMessage()); |
|
| 150 | + $build->setLog($build->getLog().PHP_EOL.PHP_EOL.$ex->getMessage()); |
|
| 151 | 151 | $buildStore->save($build); |
| 152 | 152 | $build->sendStatusPostback(); |
| 153 | 153 | } |
@@ -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; |
| 11 | 11 | |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | */ |
| 53 | 53 | public function handleError($level, $message, $file, $line) |
| 54 | 54 | { |
| 55 | - if (error_reporting() & $level === 0) { |
|
| 55 | + if (error_reporting()&$level === 0) { |
|
| 56 | 56 | return; |
| 57 | 57 | } |
| 58 | 58 | |