Fix yoda style
This commit is contained in:
@@ -12,7 +12,7 @@ trait ArrayPumpTrait
|
||||
*/
|
||||
public function hasAllKeys(array $data, array $keys): bool
|
||||
{
|
||||
if (0 === count(\array_diff($keys, \array_keys($data)))) {
|
||||
if (count(\array_diff($keys, \array_keys($data))) === 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ trait ProgressivePumpTrait
|
||||
{
|
||||
if (
|
||||
\array_key_exists('progress', $this->config)
|
||||
&& false === $this->config['progress']
|
||||
&& $this->config['progress'] === false
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ class Stream implements StreamInterface
|
||||
throw new \RuntimeException('Length parameter cannot be negative');
|
||||
}
|
||||
|
||||
if (0 === $size) {
|
||||
if ($size === 0) {
|
||||
return '';
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ class Stream implements StreamInterface
|
||||
throw new \RuntimeException(self::MESSAGE_ERROR_UNABLE_TO_READ, 0, $e);
|
||||
}
|
||||
|
||||
if (false === $string) {
|
||||
if ($string === false) {
|
||||
throw new \RuntimeException(self::MESSAGE_ERROR_UNABLE_TO_READ);
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ class Stream implements StreamInterface
|
||||
throw new \RuntimeException(self::MESSAGE_ERROR_DETACHED);
|
||||
}
|
||||
|
||||
return ftell($this->stream);
|
||||
return \ftell($this->stream);
|
||||
}
|
||||
|
||||
public function size(): int
|
||||
|
||||
Reference in New Issue
Block a user