Fix yoda style

This commit is contained in:
2024-06-12 14:47:21 +02:00
parent 06fb90881e
commit 2aca0fc5a6
9 changed files with 17 additions and 12 deletions
@@ -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;
}
+3 -3
View File
@@ -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