@@ -111,7 +111,7 @@ |
||
| 111 | 111 | $name |
| 112 | 112 | )); |
| 113 | 113 | |
| 114 | - $copy = (bool) ($this->flags & self::FLAG_DEPLOY_COPY); |
|
| 114 | + $copy = (bool)($this->flags & self::FLAG_DEPLOY_COPY); |
|
| 115 | 115 | |
| 116 | 116 | // docker client inside docker |
| 117 | 117 | // FIXME give controlling options, this is serious /!\ |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | |
| 95 | 95 | foreach ($arrays as $key => $value) { |
| 96 | 96 | if (!is_array($value)) { |
| 97 | - $arrays[$key] = (array) $value; |
|
| 97 | + $arrays[$key] = (array)$value; |
|
| 98 | 98 | } |
| 99 | 99 | } |
| 100 | 100 | |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | // inline escaped brace characters |
| 129 | - $stack = array_map(function ($str) { |
|
| 129 | + $stack = array_map(function($str) { |
|
| 130 | 130 | return strtr($str, array( |
| 131 | 131 | '\\\\' => '\\\\', |
| 132 | 132 | '\\{' => '{', '\\}' => '}', '\\,' => ',' |
@@ -2,7 +2,7 @@ |
||
| 2 | 2 | |
| 3 | 3 | /* this file is part of pipelines */ |
| 4 | 4 | |
| 5 | -$inc = function ($file) { |
|
| 5 | +$inc = function($file) { |
|
| 6 | 6 | return is_file($path = __DIR__ . '/../' . $file) ? include $path : false; |
| 7 | 7 | }; |
| 8 | 8 | |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | if (array_key_exists('image', $array) && !is_string($array['image'])) { |
| 59 | 59 | ParseException::__("'image' requires a Docker image name"); |
| 60 | 60 | } |
| 61 | - if (isset($array['image']) && ! Lib::validDockerImage($array['image'])) { |
|
| 61 | + if (isset($array['image']) && !Lib::validDockerImage($array['image'])) { |
|
| 62 | 62 | ParseException::__( |
| 63 | 63 | sprintf("'image' invalid Docker image name: '%s'", $array['image']) |
| 64 | 64 | ); |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | */ |
| 161 | 161 | public function snapShot() |
| 162 | 162 | { |
| 163 | - return function ($file) { |
|
| 163 | + return function($file) { |
|
| 164 | 164 | $source = fopen($file, 'r'); |
| 165 | 165 | if (false === $source) { |
| 166 | 166 | $this->err(sprintf('failed to open for reading: %s', $file)); |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | */ |
| 196 | 196 | public function dropFirstLine() |
| 197 | 197 | { |
| 198 | - return function ($file) { |
|
| 198 | + return function($file) { |
|
| 199 | 199 | $lines = file($file); |
| 200 | 200 | if (false === $lines) { |
| 201 | 201 | $this->err(sprintf('error reading file: %s', $file)); |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | */ |
| 218 | 218 | public function replace($that, $with) |
| 219 | 219 | { |
| 220 | - return function ($file) use ($that, $with) { |
|
| 220 | + return function($file) use ($that, $with) { |
|
| 221 | 221 | $buffer = file_get_contents($file); |
| 222 | 222 | $buffer = strtr($buffer, array($that => $with)); |
| 223 | 223 | |
@@ -659,13 +659,13 @@ discard block |
||
| 659 | 659 | private function _bfiles(Phar $phar, array $files) |
| 660 | 660 | { |
| 661 | 661 | $builders = array( |
| 662 | - 'fil' => function (array $nodes) use ($phar) { |
|
| 662 | + 'fil' => function(array $nodes) use ($phar) { |
|
| 663 | 663 | $result = $phar->buildFromIterator( |
| 664 | 664 | new \ArrayIterator($nodes) |
| 665 | 665 | ); |
| 666 | 666 | return count($result); |
| 667 | 667 | }, |
| 668 | - 'str' => function (array $nodes) use ($phar) { |
|
| 668 | + 'str' => function(array $nodes) use ($phar) { |
|
| 669 | 669 | $count = 0; |
| 670 | 670 | foreach ($nodes as $localName => $contents) { |
| 671 | 671 | $phar->addFromString($localName, $contents); |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | return null; |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | - $path = substr($out, 0,-1); |
|
| 31 | + $path = substr($out, 0, -1); |
|
| 32 | 32 | |
| 33 | 33 | if (!is_dir($path)) { |
| 34 | 34 | return null; |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | ); |
| 128 | 128 | |
| 129 | 129 | if (!isset($algos[$signatureAlgo])) { |
| 130 | - throw new \UnexpectedValueException('Invalid hash algorithm given: '.$signatureAlgo.' expected one of Phar::MD5, Phar::SHA1, Phar::SHA256 or Phar::SHA512'); // @codeCoverageIgnore |
|
| 130 | + throw new \UnexpectedValueException('Invalid hash algorithm given: ' . $signatureAlgo . ' expected one of Phar::MD5, Phar::SHA1, Phar::SHA256 or Phar::SHA512'); // @codeCoverageIgnore |
|
| 131 | 131 | } |
| 132 | 132 | $algo = $algos[$signatureAlgo]; |
| 133 | 133 | |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | |
| 142 | 142 | $this->contents = substr($this->contents, 0, $pos) . $signature; |
| 143 | 143 | |
| 144 | - return (bool) file_put_contents($path, $this->contents); |
|
| 144 | + return (bool)file_put_contents($path, $this->contents); |
|
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | private function readUint($pos, $bytes) |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | * @param File $file |
| 49 | 49 | * @return array|Step[] |
| 50 | 50 | */ |
| 51 | - $iter = function (File $file) { |
|
| 51 | + $iter = function(File $file) { |
|
| 52 | 52 | $ids = $file->getPipelineIds(); |
| 53 | 53 | $return = array(); |
| 54 | 54 | foreach ($ids as $id) { |