Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit 4434323

Browse files
committed
Merge pull request zendframework/zendframework#2941 branch 'hotfix/change-logical-operator'

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/File/ExcludeExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function isValid($value, $file = null)
5959

6060
$extensions = $this->getExtension();
6161

62-
if ($this->getCase() and (!in_array($info['extension'], $extensions))) {
62+
if ($this->getCase() && (!in_array($info['extension'], $extensions))) {
6363
return true;
6464
} elseif (!$this->getCase()) {
6565
$found = false;

src/File/ImageSize.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ public function isValid($value, $file = null)
342342
ErrorHandler::stop();
343343
$this->setValue($file);
344344

345-
if (empty($size) or ($size[0] === 0) or ($size[1] === 0)) {
345+
if (empty($size) || ($size[0] === 0) || ($size[1] === 0)) {
346346
return $this->throwError($file, self::NOT_DETECTED);
347347
}
348348

@@ -352,15 +352,15 @@ public function isValid($value, $file = null)
352352
$this->throwError($file, self::WIDTH_TOO_SMALL);
353353
}
354354

355-
if (($this->getMaxWidth() !== null) and ($this->getMaxWidth() < $this->width)) {
355+
if (($this->getMaxWidth() !== null) && ($this->getMaxWidth() < $this->width)) {
356356
$this->throwError($file, self::WIDTH_TOO_BIG);
357357
}
358358

359359
if ($this->height < $this->getMinHeight()) {
360360
$this->throwError($file, self::HEIGHT_TOO_SMALL);
361361
}
362362

363-
if (($this->getMaxHeight() !== null) and ($this->getMaxHeight() < $this->height)) {
363+
if (($this->getMaxHeight() !== null) && ($this->getMaxHeight() < $this->height)) {
364364
$this->throwError($file, self::HEIGHT_TOO_BIG);
365365
}
366366

src/File/NotExists.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class NotExists extends Exists
4040
public function isValid($value, $file = null)
4141
{
4242
$directories = $this->getDirectory(true);
43-
if (($file !== null) and (!empty($file['destination']))) {
43+
if (($file !== null) && (!empty($file['destination']))) {
4444
$directories[] = $file['destination'];
4545
} elseif (!isset($file['name'])) {
4646
$file['name'] = $value;

0 commit comments

Comments
 (0)