@@ -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 /!\ |
@@ -320,12 +320,14 @@ |
||
320 | 320 | return array(); |
321 | 321 | // @codeCoverageIgnoreEnd |
322 | 322 | } |
323 | - if ($result === array()) $this->err(sprintf( |
|
323 | + if ($result === array()) { |
|
324 | + $this->err(sprintf( |
|
324 | 325 | "ineffective pattern: %s", |
325 | 326 | $pattern === $glob |
326 | 327 | ? $pattern |
327 | 328 | : sprintf("'%s' -> '%s'", $pattern, $glob) |
328 | 329 | )); |
330 | + } |
|
329 | 331 | if (!is_array($result)) { |
330 | 332 | // @codeCoverageIgnoreStart |
331 | 333 | throw new \UnexpectedValueException( |
@@ -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 | ); |
@@ -272,7 +272,9 @@ |
||
272 | 272 | } |
273 | 273 | |
274 | 274 | foreach ($array as $section => $refs) { |
275 | - if (!in_array($section, $sections, true)) continue; |
|
275 | + if (!in_array($section, $sections, true)) { |
|
276 | + continue; |
|
277 | + } |
|
276 | 278 | if (!is_array($refs)) { |
277 | 279 | ParseException::__("'$section' requires a list"); |
278 | 280 | } |
@@ -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) |