From ac49f179878f79c233da732af1665b73716b00be Mon Sep 17 00:00:00 2001 From: "kkrieger (Kevin Krieger)" Date: Thu, 4 Jun 2020 18:51:18 +0200 Subject: [PATCH 1/2] =?UTF-8?q?Use=20||=20operators=20instead=20of=20?= =?UTF-8?q?=E2=80=9Eor=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ref #958 --- .../Cm/RedisSession/Model/Session.php | 2 +- .../Adminhtml/Block/Catalog/Category/Tabs.php | 2 +- .../Adminhtml/Block/System/Config/Tabs.php | 2 +- app/code/core/Mage/Api/Helper/Data.php | 2 +- .../core/Mage/Authorizenet/Helper/Admin.php | 4 ++-- .../Model/Product/Option/Value/Api.php | 2 +- .../core/Mage/Sendfriend/Model/Sendfriend.php | 8 +++---- app/code/core/Mage/Tag/Model/Api.php | 6 ++--- app/code/core/Mage/XmlConnect/Helper/Data.php | 2 +- app/code/core/Zend/Date.php | 24 +++++++++---------- app/code/core/Zend/Locale/Math/PhpMath.php | 12 +++++----- 11 files changed, 33 insertions(+), 33 deletions(-) diff --git a/app/code/community/Cm/RedisSession/Model/Session.php b/app/code/community/Cm/RedisSession/Model/Session.php index b6defc20529..77df4edd34e 100644 --- a/app/code/community/Cm/RedisSession/Model/Session.php +++ b/app/code/community/Cm/RedisSession/Model/Session.php @@ -138,7 +138,7 @@ public function __construct() // Connect and authenticate $this->_redis = new Credis_Client($host, $port, $timeout, $persistent); if (!empty($pass)) { - $this->_redis->auth($pass) or Zend_Cache::throwException('Unable to authenticate with the redis server.'); + $this->_redis->auth($pass) || Zend_Cache::throwException('Unable to authenticate with the redis server.'); } $this->_redis->setCloseOnDestruct(FALSE); // Destructor order cannot be predicted $this->_useRedis = TRUE; diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tabs.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tabs.php index 63a74d9daff..506e74dab51 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tabs.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tabs.php @@ -112,7 +112,7 @@ protected function _prepareLayout() $defaultGroupId = 0; foreach ($groupCollection as $group) { /* @var $group Mage_Eav_Model_Entity_Attribute_Group */ - if ($defaultGroupId == 0 or $group->getIsDefault()) { + if ($defaultGroupId == 0 || $group->getIsDefault()) { $defaultGroupId = $group->getId(); } } diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Tabs.php b/app/code/core/Mage/Adminhtml/Block/System/Config/Tabs.php index 7ddcd52ce9d..78104b88bd6 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Tabs.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Config/Tabs.php @@ -324,7 +324,7 @@ public function checkSectionPermissions($code=null) { static $permissions; - if (!$code or trim($code) == "") { + if (!$code || trim($code) == "") { return false; } diff --git a/app/code/core/Mage/Api/Helper/Data.php b/app/code/core/Mage/Api/Helper/Data.php index 416c12ce84e..5078ef79548 100644 --- a/app/code/core/Mage/Api/Helper/Data.php +++ b/app/code/core/Mage/Api/Helper/Data.php @@ -245,7 +245,7 @@ public function toArray(&$data) } if (is_array($data)) { foreach ($data as &$value) { - if (is_array($value) or is_object($value)) { + if (is_array($value) || is_object($value)) { $this->toArray($value); } } diff --git a/app/code/core/Mage/Authorizenet/Helper/Admin.php b/app/code/core/Mage/Authorizenet/Helper/Admin.php index 64a6662c0b5..08c33faa545 100644 --- a/app/code/core/Mage/Authorizenet/Helper/Admin.php +++ b/app/code/core/Mage/Authorizenet/Helper/Admin.php @@ -44,7 +44,7 @@ public function getSuccessOrderUrl($params) $url = parent::getSuccessOrderUrl($params); if ($params['controller_action_name'] === 'sales_order_create' - or $params['controller_action_name'] === 'sales_order_edit' + || $params['controller_action_name'] === 'sales_order_edit' ) { /** @var Mage_Sales_Model_Order $order */ $order = Mage::getModel('sales/order'); @@ -66,7 +66,7 @@ public function getSaveOrderUrlParams($controller) { $route = parent::getSaveOrderUrlParams($controller); - if ($controller === "sales_order_create" or $controller === "sales_order_edit") { + if ($controller === "sales_order_create" || $controller === "sales_order_edit") { $route['action'] = 'save'; $route['controller'] = 'sales_order_create'; $route['module'] = 'admin'; diff --git a/app/code/core/Mage/Catalog/Model/Product/Option/Value/Api.php b/app/code/core/Mage/Catalog/Model/Product/Option/Value/Api.php index 3c0c6bee8ea..3cb5d856386 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Option/Value/Api.php +++ b/app/code/core/Mage/Catalog/Model/Product/Option/Value/Api.php @@ -150,7 +150,7 @@ public function update($valueId, $data, $store = null) foreach ($data as $key => $value) { $data[$key] = Mage::helper('catalog')->stripTags($value); } - if (!isset($data['title']) OR empty($data['title'])) { + if (!isset($data['title']) || empty($data['title'])) { $this->_fault('option_value_title_required'); } $data['option_type_id'] = $valueId; diff --git a/app/code/core/Mage/Sendfriend/Model/Sendfriend.php b/app/code/core/Mage/Sendfriend/Model/Sendfriend.php index e6064bfe0c3..85280655906 100644 --- a/app/code/core/Mage/Sendfriend/Model/Sendfriend.php +++ b/app/code/core/Mage/Sendfriend/Model/Sendfriend.php @@ -177,7 +177,7 @@ public function validate() } $email = $this->getSender()->getEmail(); - if (empty($email) OR !Zend_Validate::is($email, 'EmailAddress')) { + if (empty($email) || !Zend_Validate::is($email, 'EmailAddress')) { $errors[] = Mage::helper('sendfriend')->__('Invalid sender email.'); } @@ -289,9 +289,9 @@ public function getWebsiteId() public function setRecipients($recipients) { // validate array - if (!is_array($recipients) OR !isset($recipients['email']) - OR !isset($recipients['name']) OR !is_array($recipients['email']) - OR !is_array($recipients['name'])) { + if (!is_array($recipients) || !isset($recipients['email']) + || !isset($recipients['name']) || !is_array($recipients['email']) + || !is_array($recipients['name'])) { return $this; } diff --git a/app/code/core/Mage/Tag/Model/Api.php b/app/code/core/Mage/Tag/Model/Api.php index b0cce4c4c60..fcf65bf270f 100644 --- a/app/code/core/Mage/Tag/Model/Api.php +++ b/app/code/core/Mage/Tag/Model/Api.php @@ -218,8 +218,8 @@ public function remove($tagId) */ protected function _prepareDataForAdd($data) { - if (!isset($data['product_id']) or !isset($data['tag']) - or !isset($data['customer_id']) or !isset($data['store'])) { + if (!isset($data['product_id']) || !isset($data['tag']) + || !isset($data['customer_id']) || !isset($data['store'])) { $this->_fault('invalid_data'); } @@ -235,7 +235,7 @@ protected function _prepareDataForAdd($data) protected function _prepareDataForUpdate($data) { // $data should contain at least one field to change - if ( !(isset($data['name']) or isset($data['status']) or isset($data['base_popularity']))) { + if ( !(isset($data['name']) || isset($data['status']) || isset($data['base_popularity']))) { $this->_fault('invalid_data'); } diff --git a/app/code/core/Mage/XmlConnect/Helper/Data.php b/app/code/core/Mage/XmlConnect/Helper/Data.php index 3cec6bb14fc..a1b43a427e2 100644 --- a/app/code/core/Mage/XmlConnect/Helper/Data.php +++ b/app/code/core/Mage/XmlConnect/Helper/Data.php @@ -427,7 +427,7 @@ static public function arrayMergeRecursive($target, $changes) $target[$key] = $changes[$key]; continue; } - if (is_array($value) or is_array($target[$key])) { + if (is_array($value) || is_array($target[$key])) { $target[$key] = self::arrayMergeRecursive($target[$key], $changes[$key]); } else if (is_numeric($key)) { if (!in_array($value, $target)) { diff --git a/app/code/core/Zend/Date.php b/app/code/core/Zend/Date.php index d96360a21f2..39916ca52f7 100644 --- a/app/code/core/Zend/Date.php +++ b/app/code/core/Zend/Date.php @@ -204,7 +204,7 @@ public function __construct($date = null, $part = null, $locale = null) } // set datepart - if (($part !== null && $part !== self::TIMESTAMP) or (!is_numeric($date))) { + if (($part !== null && $part !== self::TIMESTAMP) || (!is_numeric($date))) { // switch off dst handling for value setting $this->setUnixTimestamp($this->getGmtOffset()); $this->set($date, $part, $this->_locale); @@ -472,7 +472,7 @@ public function toString($format = null, $type = null, $locale = null) if ($format === null) { $format = Zend_Locale_Format::getDateFormat($locale) . ' ' . Zend_Locale_Format::getTimeFormat($locale); - } else if (((self::$_options['format_type'] == 'php') && ($type === null)) or ($type == 'php')) { + } else if (((self::$_options['format_type'] == 'php') && ($type === null)) || ($type == 'php')) { $format = Zend_Locale_Format::convertPhpToIsoFormat($format); } @@ -1276,9 +1276,9 @@ private function _assign($calc, $date, $comp = 0, $dst = false) if ((self::$_options['fix_dst'] === true) and ($dst !== false) and ($this->_dst === true)) { $hour = $this->toString(self::HOUR, 'iso'); if ($hour != $dst) { - if (($dst == ($hour + 1)) or ($dst == ($hour - 23))) { + if (($dst == ($hour + 1)) || ($dst == ($hour - 23))) { $value += 3600; - } else if (($dst == ($hour - 1)) or ($dst == ($hour + 23))) { + } else if (($dst == ($hour - 1)) || ($dst == ($hour + 23))) { $value -= 3600; } $this->setUnixTimestamp($value); @@ -2795,7 +2795,7 @@ private function _time($calc, $time, $format, $locale) $time = $time->toString('HH:mm:ss', 'iso'); } else { if (is_array($time)) { - if ((isset($time['hour']) === true) or (isset($time['minute']) === true) or + if ((isset($time['hour']) === true) || (isset($time['minute']) === true) || (isset($time['second']) === true)) { $parsed = $time; } else { @@ -2957,7 +2957,7 @@ private function _date($calc, $date, $format, $locale) $date = $date->toString('d.M.y', 'iso'); } else { if (is_array($date)) { - if ((isset($date['year']) === true) or (isset($date['month']) === true) or + if ((isset($date['year']) === true) || (isset($date['month']) === true) || (isset($date['day']) === true)) { $parsed = $date; } else { @@ -3261,15 +3261,15 @@ public function compareArpa($date, $locale = null) */ private function _checkLocation($location) { - if (!isset($location['longitude']) or !isset($location['latitude'])) { + if (!isset($location['longitude']) || !isset($location['latitude'])) { #require_once 'Zend/Date/Exception.php'; throw new Zend_Date_Exception('Location must include \'longitude\' and \'latitude\'', 0, null, $location); } - if (($location['longitude'] > 180) or ($location['longitude'] < -180)) { + if (($location['longitude'] > 180) || ($location['longitude'] < -180)) { #require_once 'Zend/Date/Exception.php'; throw new Zend_Date_Exception('Longitude must be between -180 and 180', 0, null, $location); } - if (($location['latitude'] > 90) or ($location['latitude'] < -90)) { + if (($location['latitude'] > 90) || ($location['latitude'] < -90)) { #require_once 'Zend/Date/Exception.php'; throw new Zend_Date_Exception('Latitude must be between -90 and 90', 0, null, $location); } @@ -4454,7 +4454,7 @@ public function getFractionalPrecision() */ public function setFractionalPrecision($precision) { - if (!intval($precision) or ($precision < 0) or ($precision > 9)) { + if (!intval($precision) || ($precision < 0) || ($precision > 9)) { #require_once 'Zend/Date/Exception.php'; throw new Zend_Date_Exception("precision ($precision) must be a positive integer less than 10", 0, null, $precision); } @@ -4800,7 +4800,7 @@ public static function isDate($date, $format = null, $locale = null) $parsed = $date; } - if (((strpos($format, 'Y') !== false) or (strpos($format, 'y') !== false)) and + if (((strpos($format, 'Y') !== false) || (strpos($format, 'y') !== false)) and (!isset($parsed['year']))) { // Year expected but not found return false; @@ -4816,7 +4816,7 @@ public static function isDate($date, $format = null, $locale = null) return false; } - if (((strpos($format, 'H') !== false) or (strpos($format, 'h') !== false)) and + if (((strpos($format, 'H') !== false) || (strpos($format, 'h') !== false)) and (!isset($parsed['hour']))) { // Hour expected but not found return false; diff --git a/app/code/core/Zend/Locale/Math/PhpMath.php b/app/code/core/Zend/Locale/Math/PhpMath.php index 850940a9bfc..7a3aa49e074 100644 --- a/app/code/core/Zend/Locale/Math/PhpMath.php +++ b/app/code/core/Zend/Locale/Math/PhpMath.php @@ -72,7 +72,7 @@ public static function Add($op1, $op2, $scale = null) $op1 = self::normalize($op1); $op2 = self::normalize($op2); $result = $op1 + $op2; - if (is_infinite($result) or (abs($result - $op2 - $op1) > $precision)) { + if (is_infinite($result) || (abs($result - $op2 - $op1) > $precision)) { #require_once 'Zend/Locale/Math/Exception.php'; throw new Zend_Locale_Math_Exception("addition overflow: $op1 + $op2 != $result", $op1, $op2, $result); } @@ -98,7 +98,7 @@ public static function Sub($op1, $op2, $scale = null) $op1 = self::normalize($op1); $op2 = self::normalize($op2); $result = $op1 - $op2; - if (is_infinite($result) or (abs($result + $op2 - $op1) > $precision)) { + if (is_infinite($result) || (abs($result + $op2 - $op1) > $precision)) { #require_once 'Zend/Locale/Math/Exception.php'; throw new Zend_Locale_Math_Exception("subtraction overflow: $op1 - $op2 != $result", $op1, $op2, $result); } @@ -120,7 +120,7 @@ public static function Pow($op1, $op2, $scale = null) $op2 = ($op2 > 0) ? floor($op2) : ceil($op2); $result = pow($op1, $op2); - if (is_infinite($result) or is_nan($result)) { + if (is_infinite($result) || is_nan($result)) { #require_once 'Zend/Locale/Math/Exception.php'; throw new Zend_Locale_Math_Exception("power overflow: $op1 ^ $op2", $op1, $op2, $result); } @@ -140,7 +140,7 @@ public static function Mul($op1, $op2, $scale = null) $op1 = self::normalize($op1); $op2 = self::normalize($op2); $result = $op1 * $op2; - if (is_infinite($result) or is_nan($result)) { + if (is_infinite($result) || is_nan($result)) { #require_once 'Zend/Locale/Math/Exception.php'; throw new Zend_Locale_Math_Exception("multiplication overflow: $op1 * $op2 != $result", $op1, $op2, $result); } @@ -164,7 +164,7 @@ public static function Div($op1, $op2, $scale = null) $op1 = self::normalize($op1); $op2 = self::normalize($op2); $result = $op1 / $op2; - if (is_infinite($result) or is_nan($result)) { + if (is_infinite($result) || is_nan($result)) { #require_once 'Zend/Locale/Math/Exception.php'; throw new Zend_Locale_Math_Exception("division overflow: $op1 / $op2 != $result", $op1, $op2, $result); } @@ -204,7 +204,7 @@ public static function Mod($op1, $op2) return NULL; } $result = $op1 % $op2; - if (is_nan($result) or (($op1 - $result) % $op2 != 0)) { + if (is_nan($result) || (($op1 - $result) % $op2 != 0)) { #require_once 'Zend/Locale/Math/Exception.php'; throw new Zend_Locale_Math_Exception( "modulus calculation error: $op1 % $op2 != $result", $op1, $op2, $result); From 9d8270e4d63fab5370bcddfe5c17d5e3bb0e142a Mon Sep 17 00:00:00 2001 From: "kkrieger (Kevin Krieger)" Date: Thu, 4 Jun 2020 18:58:49 +0200 Subject: [PATCH 2/2] =?UTF-8?q?Use=20||=20operators=20instead=20of=20?= =?UTF-8?q?=E2=80=9Eor=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ref #958 --- .../TestStep/ContinuePayPalCheckoutStep.php | 2 +- .../Test/TestStep/LoginToPayPalStep.php | 2 +- .../Maged/Model/BruteForce/ConfigIni.php | 2 +- lib/Cm/Cache/Backend/Redis.php | 4 ++-- lib/PEAR/HTTP/Request.php | 4 ++-- lib/PEAR/Mail/mimePart.php | 2 +- lib/PEAR/Net/URL.php | 2 +- lib/PEAR/SOAP/Transport/HTTP.php | 2 +- lib/Varien/Filter/Template.php | 4 ++-- lib/Varien/Pear/Frontend.php | 2 +- lib/Zend/Cache/Backend.php | 2 +- lib/Zend/Currency.php | 4 ++-- lib/Zend/Date.php | 24 +++++++++---------- lib/Zend/Date/DateObject.php | 6 ++--- lib/Zend/Filter/Encrypt.php | 2 +- lib/Zend/Filter/File/Rename.php | 2 +- lib/Zend/Gdata/Analytics/AccountQuery.php | 4 ++-- lib/Zend/Locale.php | 12 +++++----- lib/Zend/Locale/Data.php | 6 ++--- lib/Zend/Locale/Format.php | 16 ++++++------- lib/Zend/Locale/Math/PhpMath.php | 12 +++++----- lib/Zend/Text/Table.php | 2 +- lib/Zend/Text/Table/Column.php | 4 ++-- lib/Zend/Translate/Adapter.php | 8 +++---- lib/Zend/Translate/Adapter/Tbx.php | 2 +- lib/Zend/Translate/Adapter/Tmx.php | 2 +- lib/Zend/Validate/Date.php | 4 ++-- lib/Zend/Validate/File/ImageSize.php | 2 +- lib/Zend/XmlRpc/Value.php | 2 +- 29 files changed, 71 insertions(+), 71 deletions(-) diff --git a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestStep/ContinuePayPalCheckoutStep.php b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestStep/ContinuePayPalCheckoutStep.php index c52268ddf19..c258fe3a1dd 100644 --- a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestStep/ContinuePayPalCheckoutStep.php +++ b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestStep/ContinuePayPalCheckoutStep.php @@ -93,7 +93,7 @@ public function run() while (!$reviewBlockIsPresent and $sleepingTime <= 60) { sleep(1); $reviewBlockIsPresent = $this->paypalPage->getReviewBlock()->isVisible() - or $this->paypalPage->getOldReviewBlock()->isVisible(); + || $this->paypalPage->getOldReviewBlock()->isVisible(); $sleepingTime++; } $this->reviewBlock = $this->paypalPage->getReviewBlock()->isVisible() diff --git a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestStep/LoginToPayPalStep.php b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestStep/LoginToPayPalStep.php index 106a60bb16e..ae883828e5e 100644 --- a/dev/tests/functional/tests/app/Mage/Paypal/Test/TestStep/LoginToPayPalStep.php +++ b/dev/tests/functional/tests/app/Mage/Paypal/Test/TestStep/LoginToPayPalStep.php @@ -90,7 +90,7 @@ public function run() { sleep(1); $reviewBlockIsPresent = $this->paypalPage->getReviewBlock()->isVisible() - or $this->paypalPage->getOldReviewBlock()->isVisible(); + || $this->paypalPage->getOldReviewBlock()->isVisible(); $sleepingTime++; } /** Log out from previous session. */ diff --git a/downloader/Maged/Model/BruteForce/ConfigIni.php b/downloader/Maged/Model/BruteForce/ConfigIni.php index 92883fe8dc2..cef2354526a 100644 --- a/downloader/Maged/Model/BruteForce/ConfigIni.php +++ b/downloader/Maged/Model/BruteForce/ConfigIni.php @@ -79,7 +79,7 @@ public function get($name, $defaultValue = null) */ public function set($name, $value) { - if (is_array($value) or is_object($value)) { + if (is_array($value) || is_object($value)) { throw new Exception ("Bad value type."); } $this->data[$name] = $value; diff --git a/lib/Cm/Cache/Backend/Redis.php b/lib/Cm/Cache/Backend/Redis.php index 2c9d797c3b6..bf2c39ba1ed 100644 --- a/lib/Cm/Cache/Backend/Redis.php +++ b/lib/Cm/Cache/Backend/Redis.php @@ -125,14 +125,14 @@ public function __construct($options = array()) } if ( ! empty($options['password'])) { - $this->_redis->auth($options['password']) or Zend_Cache::throwException('Unable to authenticate with the redis server.'); + $this->_redis->auth($options['password']) || Zend_Cache::throwException('Unable to authenticate with the redis server.'); } // Always select database on startup in case persistent connection is re-used by other code if (empty($options['database'])) { $options['database'] = 0; } - $this->_redis->select( (int) $options['database']) or Zend_Cache::throwException('The redis database could not be selected.'); + $this->_redis->select( (int) $options['database']) || Zend_Cache::throwException('The redis database could not be selected.'); if ( isset($options['notMatchingTags']) ) { $this->_notMatchingTags = (bool) $options['notMatchingTags']; diff --git a/lib/PEAR/HTTP/Request.php b/lib/PEAR/HTTP/Request.php index b4b9b668ad1..1a11d42a05a 100644 --- a/lib/PEAR/HTTP/Request.php +++ b/lib/PEAR/HTTP/Request.php @@ -736,7 +736,7 @@ function sendRequest($saveBody = true) $this->_sock = new Net_Socket(); $err = $this->_sock->connect($host, $port, null, $this->_timeout, $this->_socketOptions); } - PEAR::isError($err) or $err = $this->_sock->write($this->_buildRequest()); + PEAR::isError($err) || $err = $this->_sock->write($this->_buildRequest()); if (!PEAR::isError($err)) { if (!empty($this->_readTimeout)) { @@ -798,7 +798,7 @@ function sendRequest($saveBody = true) $this->_url->path = $redirect; // Relative path - } elseif (substr($redirect, 0, 3) == '../' OR substr($redirect, 0, 2) == './') { + } elseif (substr($redirect, 0, 3) == '../' || substr($redirect, 0, 2) == './') { if (substr($this->_url->path, -1) == '/') { $redirect = $this->_url->path . $redirect; } else { diff --git a/lib/PEAR/Mail/mimePart.php b/lib/PEAR/Mail/mimePart.php index 7ad54e5ef58..f8c8fe5a418 100644 --- a/lib/PEAR/Mail/mimePart.php +++ b/lib/PEAR/Mail/mimePart.php @@ -355,7 +355,7 @@ function _quotedPrintableEncode($input , $line_max = 76) $char = '=09'; } elseif ($dec == 9) { ; // Do nothing if a tab. - } elseif (($dec == 61) OR ($dec < 32 ) OR ($dec > 126)) { + } elseif (($dec == 61) || ($dec < 32 ) || ($dec > 126)) { $char = $escape . strtoupper(sprintf('%02s', dechex($dec))); } elseif (($dec == 46) AND ($newline == '')) { //Bug #9722: convert full-stop at bol diff --git a/lib/PEAR/Net/URL.php b/lib/PEAR/Net/URL.php index 0c964a9f428..97cb8a598aa 100644 --- a/lib/PEAR/Net/URL.php +++ b/lib/PEAR/Net/URL.php @@ -388,7 +388,7 @@ function resolvePath($path) $path = array_values($path); $i--; - } elseif ($path[$i] == '..' AND ($i > 1 OR ($i == 1 AND $path[0] != '') ) ) { + } elseif ($path[$i] == '..' AND ($i > 1 || ($i == 1 AND $path[0] != '') ) ) { unset($path[$i]); unset($path[$i-1]); $path = array_values($path); diff --git a/lib/PEAR/SOAP/Transport/HTTP.php b/lib/PEAR/SOAP/Transport/HTTP.php index 34d116a439a..a758b76d062 100644 --- a/lib/PEAR/SOAP/Transport/HTTP.php +++ b/lib/PEAR/SOAP/Transport/HTTP.php @@ -306,7 +306,7 @@ function _parseHeaders($headers) $cookie['secure'] = true; } elseif ('expires' == $elName) { $cookie['expires'] = str_replace('"', '', $elValue); - } elseif ('path' == $elName OR 'domain' == $elName) { + } elseif ('path' == $elName || 'domain' == $elName) { $cookie[$elName] = urldecode($elValue); } else { $cookie[$elName] = $elValue; diff --git a/lib/Varien/Filter/Template.php b/lib/Varien/Filter/Template.php index ff41946a047..3a27b49deb1 100644 --- a/lib/Varien/Filter/Template.php +++ b/lib/Varien/Filter/Template.php @@ -186,7 +186,7 @@ public function includeDirective($construction) { // Processing of {include template=... [...]} statement $includeParameters = $this->_getIncludeParameters($construction[2]); - if(!isset($includeParameters['template']) or !$this->getIncludeProcessor()) { + if(!isset($includeParameters['template']) || !$this->getIncludeProcessor()) { // Not specified template or not seted include processor $replacedValue = '{Error in include processing}'; } else { @@ -213,7 +213,7 @@ public function templateDirective($construction) { // Processing of {template config_path=... [...]} statement $templateParameters = $this->_getIncludeParameters($construction[2]); - if (!isset($templateParameters['config_path']) or !$this->getTemplateProcessor()) { + if (!isset($templateParameters['config_path']) || !$this->getTemplateProcessor()) { $replacedValue = '{Error in template processing}'; } else { // Including of template diff --git a/lib/Varien/Pear/Frontend.php b/lib/Varien/Pear/Frontend.php index 91828577a5a..c2f89c46f54 100644 --- a/lib/Varien/Pear/Frontend.php +++ b/lib/Varien/Pear/Frontend.php @@ -57,7 +57,7 @@ public function getLogStream() public function log($msg, $append_crlf = true) { - if (is_null($msg) || false===$msg or ''===$msg) { + if (is_null($msg) || false===$msg || ''===$msg) { return; } diff --git a/lib/Zend/Cache/Backend.php b/lib/Zend/Cache/Backend.php index df6621763c9..c440b34d1f6 100644 --- a/lib/Zend/Cache/Backend.php +++ b/lib/Zend/Cache/Backend.php @@ -175,7 +175,7 @@ public function getTmpDir() foreach (array($_ENV, $_SERVER) as $tab) { foreach (array('TMPDIR', 'TEMP', 'TMP', 'windir', 'SystemRoot') as $key) { if (isset($tab[$key]) && is_string($tab[$key])) { - if (($key == 'windir') or ($key == 'SystemRoot')) { + if (($key == 'windir') || ($key == 'SystemRoot')) { $dir = realpath($tab[$key] . '\\temp'); } else { $dir = realpath($tab[$key]); diff --git a/lib/Zend/Currency.php b/lib/Zend/Currency.php index 33408c498e1..896d54674e4 100644 --- a/lib/Zend/Currency.php +++ b/lib/Zend/Currency.php @@ -161,7 +161,7 @@ public function toCurrency($value = null, array $options = array()) } // Validate the passed number - if (!(isset($value)) or (is_numeric($value) === false)) { + if (!(isset($value)) || (is_numeric($value) === false)) { #require_once 'Zend/Currency/Exception.php'; throw new Zend_Currency_Exception("Value '$value' has to be numeric"); } @@ -877,7 +877,7 @@ protected function _checkOptions(array $options = array()) $value = -1; } - if (($value < -1) or ($value > 30)) { + if (($value < -1) || ($value > 30)) { #require_once 'Zend/Currency/Exception.php'; throw new Zend_Currency_Exception("'$value' precision has to be between -1 and 30."); } diff --git a/lib/Zend/Date.php b/lib/Zend/Date.php index 1b3247d858f..0d890a9209e 100644 --- a/lib/Zend/Date.php +++ b/lib/Zend/Date.php @@ -191,7 +191,7 @@ public function __construct($date = null, $part = null, $locale = null) } // set datepart - if (($part !== null && $part !== self::TIMESTAMP) or (!is_numeric($date))) { + if (($part !== null && $part !== self::TIMESTAMP) || (!is_numeric($date))) { // switch off dst handling for value setting $this->setUnixTimestamp($this->getGmtOffset()); $this->set($date, $part, $this->_locale); @@ -459,7 +459,7 @@ public function toString($format = null, $type = null, $locale = null) if ($format === null) { $format = Zend_Locale_Format::getDateFormat($locale) . ' ' . Zend_Locale_Format::getTimeFormat($locale); - } else if (((self::$_options['format_type'] == 'php') && ($type === null)) or ($type == 'php')) { + } else if (((self::$_options['format_type'] == 'php') && ($type === null)) || ($type == 'php')) { $format = Zend_Locale_Format::convertPhpToIsoFormat($format); } @@ -1263,9 +1263,9 @@ private function _assign($calc, $date, $comp = 0, $dst = false) if ((self::$_options['fix_dst'] === true) and ($dst !== false) and ($this->_dst === true)) { $hour = $this->toString(self::HOUR, 'iso'); if ($hour != $dst) { - if (($dst == ($hour + 1)) or ($dst == ($hour - 23))) { + if (($dst == ($hour + 1)) || ($dst == ($hour - 23))) { $value += 3600; - } else if (($dst == ($hour - 1)) or ($dst == ($hour + 23))) { + } else if (($dst == ($hour - 1)) || ($dst == ($hour + 23))) { $value -= 3600; } $this->setUnixTimestamp($value); @@ -2790,7 +2790,7 @@ private function _time($calc, $time, $format, $locale) $time = $time->toString('HH:mm:ss', 'iso'); } else { if (is_array($time)) { - if ((isset($time['hour']) === true) or (isset($time['minute']) === true) or + if ((isset($time['hour']) === true) || (isset($time['minute']) === true) or (isset($time['second']) === true)) { $parsed = $time; } else { @@ -2952,7 +2952,7 @@ private function _date($calc, $date, $format, $locale) $date = $date->toString('d.M.y', 'iso'); } else { if (is_array($date)) { - if ((isset($date['year']) === true) or (isset($date['month']) === true) or + if ((isset($date['year']) === true) || (isset($date['month']) === true) or (isset($date['day']) === true)) { $parsed = $date; } else { @@ -3256,15 +3256,15 @@ public function compareArpa($date, $locale = null) */ private function _checkLocation($location) { - if (!isset($location['longitude']) or !isset($location['latitude'])) { + if (!isset($location['longitude']) || !isset($location['latitude'])) { #require_once 'Zend/Date/Exception.php'; throw new Zend_Date_Exception('Location must include \'longitude\' and \'latitude\'', 0, null, $location); } - if (($location['longitude'] > 180) or ($location['longitude'] < -180)) { + if (($location['longitude'] > 180) || ($location['longitude'] < -180)) { #require_once 'Zend/Date/Exception.php'; throw new Zend_Date_Exception('Longitude must be between -180 and 180', 0, null, $location); } - if (($location['latitude'] > 90) or ($location['latitude'] < -90)) { + if (($location['latitude'] > 90) || ($location['latitude'] < -90)) { #require_once 'Zend/Date/Exception.php'; throw new Zend_Date_Exception('Latitude must be between -90 and 90', 0, null, $location); } @@ -4449,7 +4449,7 @@ public function getFractionalPrecision() */ public function setFractionalPrecision($precision) { - if (!intval($precision) or ($precision < 0) or ($precision > 9)) { + if (!intval($precision) || ($precision < 0) || ($precision > 9)) { #require_once 'Zend/Date/Exception.php'; throw new Zend_Date_Exception("precision ($precision) must be a positive integer less than 10", 0, null, $precision); } @@ -4795,7 +4795,7 @@ public static function isDate($date, $format = null, $locale = null) $parsed = $date; } - if (((strpos($format, 'Y') !== false) or (strpos($format, 'y') !== false)) and + if (((strpos($format, 'Y') !== false) || (strpos($format, 'y') !== false)) and (!isset($parsed['year']))) { // Year expected but not found return false; @@ -4811,7 +4811,7 @@ public static function isDate($date, $format = null, $locale = null) return false; } - if (((strpos($format, 'H') !== false) or (strpos($format, 'h') !== false)) and + if (((strpos($format, 'H') !== false) || (strpos($format, 'h') !== false)) and (!isset($parsed['hour']))) { // Hour expected but not found return false; diff --git a/lib/Zend/Date/DateObject.php b/lib/Zend/Date/DateObject.php index 99ce6f61c2d..9bffb4ae979 100644 --- a/lib/Zend/Date/DateObject.php +++ b/lib/Zend/Date/DateObject.php @@ -641,7 +641,7 @@ protected static function dayOfWeek($year, $month, $day) // gregorian correction $correction = 0; - if (($year < 1582) or (($year == 1582) and (($month < 10) or (($month == 10) && ($day < 15))))) { + if (($year < 1582) || (($year == 1582) and (($month < 10) || (($month == 10) && ($day < 15))))) { $correction = 3; } @@ -872,7 +872,7 @@ protected function weekNumber($year, $month, $day) $dayofweek = self::dayOfWeek($year, $month, $day); $firstday = self::dayOfWeek($year, 1, 1); - if (($month == 1) and (($firstday < 1) or ($firstday > 4)) and ($day < 4)) { + if (($month == 1) and (($firstday < 1) || ($firstday > 4)) and ($day < 4)) { $firstday = self::dayOfWeek($year - 1, 1, 1); $month = 12; $day = 31; @@ -1033,7 +1033,7 @@ public function setTimezone($zone = null) } date_default_timezone_set($oldzone); - if (($zone == 'UTC') or ($zone == 'GMT')) { + if (($zone == 'UTC') || ($zone == 'GMT')) { $this->_dst = false; } else { $this->_dst = true; diff --git a/lib/Zend/Filter/Encrypt.php b/lib/Zend/Filter/Encrypt.php index 7c7df0c24b6..a66c1d92b9d 100644 --- a/lib/Zend/Filter/Encrypt.php +++ b/lib/Zend/Filter/Encrypt.php @@ -115,7 +115,7 @@ public function setAdapter($options = null) public function __call($method, $options) { $part = substr($method, 0, 3); - if ((($part != 'get') and ($part != 'set')) or !method_exists($this->_adapter, $method)) { + if ((($part != 'get') and ($part != 'set')) || !method_exists($this->_adapter, $method)) { #require_once 'Zend/Filter/Exception.php'; throw new Zend_Filter_Exception("Unknown method '{$method}'"); } diff --git a/lib/Zend/Filter/File/Rename.php b/lib/Zend/Filter/File/Rename.php index 7a0d78e2207..273486b5d29 100644 --- a/lib/Zend/Filter/File/Rename.php +++ b/lib/Zend/Filter/File/Rename.php @@ -290,7 +290,7 @@ protected function _getFileName($file) return $file; } - if (!isset($rename['target']) or ($rename['target'] == '*')) { + if (!isset($rename['target']) || ($rename['target'] == '*')) { $rename['target'] = $rename['source']; } diff --git a/lib/Zend/Gdata/Analytics/AccountQuery.php b/lib/Zend/Gdata/Analytics/AccountQuery.php index 8c946ff7b93..0e3a2272dee 100644 --- a/lib/Zend/Gdata/Analytics/AccountQuery.php +++ b/lib/Zend/Gdata/Analytics/AccountQuery.php @@ -172,11 +172,11 @@ public function getQueryUrl() $url = $this->_defaultFeedUri; // add account id - if ($this->_webproperties or $this->_profiles or $this->_goals) { + if ($this->_webproperties || $this->_profiles || $this->_goals) { $url .= '/' . $this->_accountId . '/webproperties'; } - if ($this->_profiles or $this->_goals) { + if ($this->_profiles || $this->_goals) { $url .= '/' . $this->_webpropertyId . '/profiles'; } diff --git a/lib/Zend/Locale.php b/lib/Zend/Locale.php index d1c3761964d..f9c6dc69a80 100644 --- a/lib/Zend/Locale.php +++ b/lib/Zend/Locale.php @@ -1154,7 +1154,7 @@ public function __toString() */ public static function getDefault() { - if ((self::$compatibilityMode === true) or (func_num_args() > 0)) { + if ((self::$compatibilityMode === true) || (func_num_args() > 0)) { if (!self::$_breakChain) { self::$_breakChain = true; trigger_error('You are running Zend_Locale in compatibility mode... please migrate your scripts', E_USER_NOTICE); @@ -1186,13 +1186,13 @@ public static function getDefault() */ public static function setDefault($locale, $quality = 1) { - if (($locale === 'auto') or ($locale === 'root') or ($locale === 'default') or - ($locale === 'environment') or ($locale === 'browser')) { + if (($locale === 'auto') || ($locale === 'root') || ($locale === 'default') || + ($locale === 'environment') || ($locale === 'browser')) { #require_once 'Zend/Locale/Exception.php'; throw new Zend_Locale_Exception('Only full qualified locales can be used as default!'); } - if (($quality < 0.1) or ($quality > 100)) { + if (($quality < 0.1) || ($quality > 100)) { #require_once 'Zend/Locale/Exception.php'; throw new Zend_Locale_Exception("Quality must be between 0.1 and 100"); } @@ -1360,7 +1360,7 @@ public function setLocale($locale = null) $region = substr((string) $locale, 0, 3); if (isset($region[2]) === true) { - if (($region[2] === '_') or ($region[2] === '-')) { + if (($region[2] === '_') || ($region[2] === '-')) { $region = substr($region, 0, 2); } } @@ -1907,7 +1907,7 @@ private static function _prepareLocale($locale, $strict = false) $locale = self::$_default; } - if (($locale === 'auto') or ($locale === null)) { + if (($locale === 'auto') || ($locale === null)) { $locale = self::$_auto; } diff --git a/lib/Zend/Locale/Data.php b/lib/Zend/Locale/Data.php index c4331abd731..2065f3a046f 100644 --- a/lib/Zend/Locale/Data.php +++ b/lib/Zend/Locale/Data.php @@ -359,7 +359,7 @@ public static function getList($locale, $path, $value = false) } } else if ($value === 2) { foreach($temp as $key => $value) { - if (is_numeric($key) or ($key == 'QO') or ($key == 'EU')) { + if (is_numeric($key) || ($key == 'QO') || ($key == 'EU')) { unset($temp[$key]); } } @@ -1242,7 +1242,7 @@ public static function getContent($locale, $path, $value = false) $temp = array(); foreach ($_temp as $key => $keyvalue) { $val = self::_getFile($locale, '/ldml/numbers/currencies/currency[@type=\'' . $key . '\']/displayName', '', $key); - if (!isset($val[$key]) or ($val[$key] != $value)) { + if (!isset($val[$key]) || ($val[$key] != $value)) { continue; } if (!isset($temp[$val[$key]])) { @@ -1284,7 +1284,7 @@ public static function getContent($locale, $path, $value = false) $temp = array(); foreach ($_temp as $key => $keyvalue) { $val = self::_getFile('supplementalData', '/supplementalData/currencyData/region[@iso3166=\'' . $key . '\']/currency', 'iso4217', $key); - if (!isset($val[$key]) or ($val[$key] != $value)) { + if (!isset($val[$key]) || ($val[$key] != $value)) { continue; } if (!isset($temp[$val[$key]])) { diff --git a/lib/Zend/Locale/Format.php b/lib/Zend/Locale/Format.php index 909831300c1..68959eb1558 100644 --- a/lib/Zend/Locale/Format.php +++ b/lib/Zend/Locale/Format.php @@ -1186,34 +1186,34 @@ public static function checkDateFormat($date, array $options = array()) $options = self::_checkOptions($options) + self::$_options; // day expected but not parsed - if ((iconv_strpos($options['date_format'], 'd', 0, 'UTF-8') !== false) and (!isset($date['day']) or ($date['day'] === ""))) { + if ((iconv_strpos($options['date_format'], 'd', 0, 'UTF-8') !== false) and (!isset($date['day']) || ($date['day'] === ""))) { return false; } // month expected but not parsed - if ((iconv_strpos($options['date_format'], 'M', 0, 'UTF-8') !== false) and (!isset($date['month']) or ($date['month'] === ""))) { + if ((iconv_strpos($options['date_format'], 'M', 0, 'UTF-8') !== false) and (!isset($date['month']) || ($date['month'] === ""))) { return false; } // year expected but not parsed - if (((iconv_strpos($options['date_format'], 'Y', 0, 'UTF-8') !== false) or - (iconv_strpos($options['date_format'], 'y', 0, 'UTF-8') !== false)) and (!isset($date['year']) or ($date['year'] === ""))) { + if (((iconv_strpos($options['date_format'], 'Y', 0, 'UTF-8') !== false) || + (iconv_strpos($options['date_format'], 'y', 0, 'UTF-8') !== false)) and (!isset($date['year']) || ($date['year'] === ""))) { return false; } // second expected but not parsed - if ((iconv_strpos($options['date_format'], 's', 0, 'UTF-8') !== false) and (!isset($date['second']) or ($date['second'] === ""))) { + if ((iconv_strpos($options['date_format'], 's', 0, 'UTF-8') !== false) and (!isset($date['second']) || ($date['second'] === ""))) { return false; } // minute expected but not parsed - if ((iconv_strpos($options['date_format'], 'm', 0, 'UTF-8') !== false) and (!isset($date['minute']) or ($date['minute'] === ""))) { + if ((iconv_strpos($options['date_format'], 'm', 0, 'UTF-8') !== false) and (!isset($date['minute']) || ($date['minute'] === ""))) { return false; } // hour expected but not parsed - if (((iconv_strpos($options['date_format'], 'H', 0, 'UTF-8') !== false) or - (iconv_strpos($options['date_format'], 'h', 0, 'UTF-8') !== false)) and (!isset($date['hour']) or ($date['hour'] === ""))) { + if (((iconv_strpos($options['date_format'], 'H', 0, 'UTF-8') !== false) || + (iconv_strpos($options['date_format'], 'h', 0, 'UTF-8') !== false)) and (!isset($date['hour']) || ($date['hour'] === ""))) { return false; } diff --git a/lib/Zend/Locale/Math/PhpMath.php b/lib/Zend/Locale/Math/PhpMath.php index 16dbf11836c..6ea60a27e59 100644 --- a/lib/Zend/Locale/Math/PhpMath.php +++ b/lib/Zend/Locale/Math/PhpMath.php @@ -69,7 +69,7 @@ public static function Add($op1, $op2, $scale = null) $op1 = self::normalize($op1); $op2 = self::normalize($op2); $result = $op1 + $op2; - if (is_infinite($result) or (abs($result - $op2 - $op1) > $precision)) { + if (is_infinite($result) || (abs($result - $op2 - $op1) > $precision)) { #require_once 'Zend/Locale/Math/Exception.php'; throw new Zend_Locale_Math_Exception("addition overflow: $op1 + $op2 != $result", $op1, $op2, $result); } @@ -92,7 +92,7 @@ public static function Sub($op1, $op2, $scale = null) $op1 = self::normalize($op1); $op2 = self::normalize($op2); $result = $op1 - $op2; - if (is_infinite($result) or (abs($result + $op2 - $op1) > $precision)) { + if (is_infinite($result) || (abs($result + $op2 - $op1) > $precision)) { #require_once 'Zend/Locale/Math/Exception.php'; throw new Zend_Locale_Math_Exception("subtraction overflow: $op1 - $op2 != $result", $op1, $op2, $result); } @@ -114,7 +114,7 @@ public static function Pow($op1, $op2, $scale = null) $op2 = ($op2 > 0) ? floor($op2) : ceil($op2); $result = pow($op1, $op2); - if (is_infinite($result) or is_nan($result)) { + if (is_infinite($result) || is_nan($result)) { #require_once 'Zend/Locale/Math/Exception.php'; throw new Zend_Locale_Math_Exception("power overflow: $op1 ^ $op2", $op1, $op2, $result); } @@ -134,7 +134,7 @@ public static function Mul($op1, $op2, $scale = null) $op1 = self::normalize($op1); $op2 = self::normalize($op2); $result = $op1 * $op2; - if (is_infinite($result) or is_nan($result)) { + if (is_infinite($result) || is_nan($result)) { #require_once 'Zend/Locale/Math/Exception.php'; throw new Zend_Locale_Math_Exception("multiplication overflow: $op1 * $op2 != $result", $op1, $op2, $result); } @@ -158,7 +158,7 @@ public static function Div($op1, $op2, $scale = null) $op1 = self::normalize($op1); $op2 = self::normalize($op2); $result = $op1 / $op2; - if (is_infinite($result) or is_nan($result)) { + if (is_infinite($result) || is_nan($result)) { #require_once 'Zend/Locale/Math/Exception.php'; throw new Zend_Locale_Math_Exception("division overflow: $op1 / $op2 != $result", $op1, $op2, $result); } @@ -198,7 +198,7 @@ public static function Mod($op1, $op2) return NULL; } $result = $op1 % $op2; - if (is_nan($result) or (($op1 - $result) % $op2 != 0)) { + if (is_nan($result) || (($op1 - $result) % $op2 != 0)) { #require_once 'Zend/Locale/Math/Exception.php'; throw new Zend_Locale_Math_Exception("modulus calculation error: $op1 % $op2 != $result", $op1, $op2, $result); } diff --git a/lib/Zend/Text/Table.php b/lib/Zend/Text/Table.php index b44babbf9f0..3bde8725a39 100644 --- a/lib/Zend/Text/Table.php +++ b/lib/Zend/Text/Table.php @@ -193,7 +193,7 @@ public function setColumnWidths(array $columnWidths) } foreach ($columnWidths as $columnNum => $columnWidth) { - if (is_int($columnWidth) === false or $columnWidth < 1) { + if (is_int($columnWidth) === false || $columnWidth < 1) { #require_once 'Zend/Text/Table/Exception.php'; throw new Zend_Text_Table_Exception('Column ' . $columnNum . ' has an invalid' . ' column width'); diff --git a/lib/Zend/Text/Table/Column.php b/lib/Zend/Text/Table/Column.php index 91f8d9a6cc7..6e4bbbe788c 100644 --- a/lib/Zend/Text/Table/Column.php +++ b/lib/Zend/Text/Table/Column.php @@ -165,7 +165,7 @@ public function setAlign($align) */ public function setColSpan($colSpan) { - if (is_int($colSpan) === false or $colSpan < 1) { + if (is_int($colSpan) === false || $colSpan < 1) { #require_once 'Zend/Text/Table/Exception.php'; throw new Zend_Text_Table_Exception('$colSpan must be an integer and greater than 0'); } @@ -196,7 +196,7 @@ public function getColSpan() */ public function render($columnWidth, $padding = 0) { - if (is_int($columnWidth) === false or $columnWidth < 1) { + if (is_int($columnWidth) === false || $columnWidth < 1) { #require_once 'Zend/Text/Table/Exception.php'; throw new Zend_Text_Table_Exception('$columnWidth must be an integer and greater than 0'); } diff --git a/lib/Zend/Translate/Adapter.php b/lib/Zend/Translate/Adapter.php index c0553fcd095..b2817b19657 100644 --- a/lib/Zend/Translate/Adapter.php +++ b/lib/Zend/Translate/Adapter.php @@ -422,7 +422,7 @@ public function getLocale() */ public function setLocale($locale) { - if (($locale === "auto") or ($locale === null)) { + if (($locale === "auto") || ($locale === null)) { $this->_automatic = true; } else { $this->_automatic = false; @@ -503,7 +503,7 @@ public function getList() */ public function getMessageId($message, $locale = null) { - if (empty($locale) or !$this->isAvailable($locale)) { + if (empty($locale) || !$this->isAvailable($locale)) { $locale = $this->_options['locale']; } @@ -519,7 +519,7 @@ public function getMessageId($message, $locale = null) */ public function getMessageIds($locale = null) { - if (empty($locale) or !$this->isAvailable($locale)) { + if (empty($locale) || !$this->isAvailable($locale)) { $locale = $this->_options['locale']; } @@ -540,7 +540,7 @@ public function getMessages($locale = null) return $this->_translate; } - if ((empty($locale) === true) or ($this->isAvailable($locale) === false)) { + if ((empty($locale) === true) || ($this->isAvailable($locale) === false)) { $locale = $this->_options['locale']; } diff --git a/lib/Zend/Translate/Adapter/Tbx.php b/lib/Zend/Translate/Adapter/Tbx.php index 9f62b836ae5..a7a7e3e722c 100644 --- a/lib/Zend/Translate/Adapter/Tbx.php +++ b/lib/Zend/Translate/Adapter/Tbx.php @@ -140,7 +140,7 @@ private function _endElement($file, $name) if (empty($this->_termentry)) { $this->_termentry = $this->_content; } - if (!empty($this->_content) or (isset($this->_data[$this->_langset][$this->_termentry]) === false)) { + if (!empty($this->_content) || (isset($this->_data[$this->_langset][$this->_termentry]) === false)) { $this->_data[$this->_langset][$this->_termentry] = $this->_content; } break; diff --git a/lib/Zend/Translate/Adapter/Tmx.php b/lib/Zend/Translate/Adapter/Tmx.php index 6a9e8c4661f..cc1e1602364 100644 --- a/lib/Zend/Translate/Adapter/Tmx.php +++ b/lib/Zend/Translate/Adapter/Tmx.php @@ -195,7 +195,7 @@ protected function _endElement($file, $name) $this->_tu = $this->_content; } - if (!empty($this->_content) or (!isset($this->_data[$this->_tuv][$this->_tu]))) { + if (!empty($this->_content) || (!isset($this->_data[$this->_tuv][$this->_tu]))) { $this->_data[$this->_tuv][$this->_tu] = $this->_content; } break; diff --git a/lib/Zend/Validate/Date.php b/lib/Zend/Validate/Date.php index 450d725420e..2d9dcfe965d 100644 --- a/lib/Zend/Validate/Date.php +++ b/lib/Zend/Validate/Date.php @@ -220,7 +220,7 @@ private function _checkFormat($value) return false; } - if (((strpos($this->_format, 'Y') !== false) or (strpos($this->_format, 'y') !== false)) and + if (((strpos($this->_format, 'Y') !== false) || (strpos($this->_format, 'y') !== false)) and (!isset($parsed['year']))) { // Year expected but not found return false; @@ -236,7 +236,7 @@ private function _checkFormat($value) return false; } - if (((strpos($this->_format, 'H') !== false) or (strpos($this->_format, 'h') !== false)) and + if (((strpos($this->_format, 'H') !== false) || (strpos($this->_format, 'h') !== false)) and (!isset($parsed['hour']))) { // Hour expected but not found return false; diff --git a/lib/Zend/Validate/File/ImageSize.php b/lib/Zend/Validate/File/ImageSize.php index c3c9f11ee5d..0fedeb51956 100644 --- a/lib/Zend/Validate/File/ImageSize.php +++ b/lib/Zend/Validate/File/ImageSize.php @@ -316,7 +316,7 @@ public function isValid($value, $file = null) $size = @getimagesize($value); $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->_throw($file, self::NOT_DETECTED); } diff --git a/lib/Zend/XmlRpc/Value.php b/lib/Zend/XmlRpc/Value.php index 2af87bdff63..34f0bea6630 100644 --- a/lib/Zend/XmlRpc/Value.php +++ b/lib/Zend/XmlRpc/Value.php @@ -442,7 +442,7 @@ protected static function _xmlStringToNativeXmlRpc($xml) foreach ($value->member as $member) { // @todo? If a member doesn't have a tag, we don't add it to the struct // Maybe we want to throw an exception here ? - if (!isset($member->value) or !isset($member->name)) { + if (!isset($member->value) || !isset($member->name)) { continue; //throw new Zend_XmlRpc_Value_Exception('Member of the '. self::XMLRPC_TYPE_STRUCT .' XML-RPC native type must contain a VALUE tag'); }