diff --git a/src/File/ExcludeExtension.php b/src/File/ExcludeExtension.php index 0ac8d6e38..ea5b52746 100644 --- a/src/File/ExcludeExtension.php +++ b/src/File/ExcludeExtension.php @@ -59,7 +59,7 @@ public function isValid($value, $file = null) $extensions = $this->getExtension(); - if ($this->getCase() and (!in_array($info['extension'], $extensions))) { + if ($this->getCase() && (!in_array($info['extension'], $extensions))) { return true; } elseif (!$this->getCase()) { $found = false; diff --git a/src/File/ImageSize.php b/src/File/ImageSize.php index 337b49dad..f701a1f4d 100644 --- a/src/File/ImageSize.php +++ b/src/File/ImageSize.php @@ -342,7 +342,7 @@ public function isValid($value, $file = null) ErrorHandler::stop(); $this->setValue($file); - if (empty($size) or ($size[0] === 0) or ($size[1] === 0)) { + if (empty($size) || ($size[0] === 0) || ($size[1] === 0)) { return $this->throwError($file, self::NOT_DETECTED); } @@ -352,7 +352,7 @@ public function isValid($value, $file = null) $this->throwError($file, self::WIDTH_TOO_SMALL); } - if (($this->getMaxWidth() !== null) and ($this->getMaxWidth() < $this->width)) { + if (($this->getMaxWidth() !== null) && ($this->getMaxWidth() < $this->width)) { $this->throwError($file, self::WIDTH_TOO_BIG); } @@ -360,7 +360,7 @@ public function isValid($value, $file = null) $this->throwError($file, self::HEIGHT_TOO_SMALL); } - if (($this->getMaxHeight() !== null) and ($this->getMaxHeight() < $this->height)) { + if (($this->getMaxHeight() !== null) && ($this->getMaxHeight() < $this->height)) { $this->throwError($file, self::HEIGHT_TOO_BIG); } diff --git a/src/File/NotExists.php b/src/File/NotExists.php index ca40f46b8..73f6e1221 100644 --- a/src/File/NotExists.php +++ b/src/File/NotExists.php @@ -40,7 +40,7 @@ class NotExists extends Exists public function isValid($value, $file = null) { $directories = $this->getDirectory(true); - if (($file !== null) and (!empty($file['destination']))) { + if (($file !== null) && (!empty($file['destination']))) { $directories[] = $file['destination']; } elseif (!isset($file['name'])) { $file['name'] = $value;