@@ -141,7 +141,7 @@ |
||
| 141 | 141 | * same configuration as (or is) the default store, should return 'default' |
| 142 | 142 | * and 0. |
| 143 | 143 | * @param Mage_Core_Model_Store $store |
| 144 | - * @return mixed[] Tuple of scope "type" and scope id |
|
| 144 | + * @return string[] Tuple of scope "type" and scope id |
|
| 145 | 145 | */ |
| 146 | 146 | public function getScopeForStoreSettings(Mage_Core_Model_Store $store) |
| 147 | 147 | { |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | * Return the value at field in array if it exists. Otherwise, use the |
| 69 | 69 | * default value. |
| 70 | 70 | * @param array $arr |
| 71 | - * @param string|int $field Valid array key |
|
| 71 | + * @param string $field Valid array key |
|
| 72 | 72 | * @param mixed $default |
| 73 | 73 | * @return mixed |
| 74 | 74 | */ |
@@ -1,17 +1,17 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Copyright (c) 2013-2014 eBay Enterprise, Inc. |
|
| 4 | - * |
|
| 5 | - * NOTICE OF LICENSE |
|
| 6 | - * |
|
| 7 | - * This source file is subject to the Open Software License (OSL 3.0) |
|
| 8 | - * that is bundled with this package in the file LICENSE.md. |
|
| 9 | - * It is also available through the world-wide-web at this URL: |
|
| 10 | - * http://opensource.org/licenses/osl-3.0.php |
|
| 11 | - * |
|
| 12 | - * @copyright Copyright (c) 2013-2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/) |
|
| 13 | - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
|
| 14 | - */ |
|
| 3 | + * Copyright (c) 2013-2014 eBay Enterprise, Inc. |
|
| 4 | + * |
|
| 5 | + * NOTICE OF LICENSE |
|
| 6 | + * |
|
| 7 | + * This source file is subject to the Open Software License (OSL 3.0) |
|
| 8 | + * that is bundled with this package in the file LICENSE.md. |
|
| 9 | + * It is also available through the world-wide-web at this URL: |
|
| 10 | + * http://opensource.org/licenses/osl-3.0.php |
|
| 11 | + * |
|
| 12 | + * @copyright Copyright (c) 2013-2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/) |
|
| 13 | + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
|
| 14 | + */ |
|
| 15 | 15 | |
| 16 | 16 | use eBayEnterprise\RetailOrderManagement\Api\Exception\ConnectionError; |
| 17 | 17 | |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | /** |
| 32 | 32 | * Type checks for self::__construct $initParams |
| 33 | 33 | * @param EbayEnterprise_Amqp_Helper_Config $configHelper |
| 34 | - * @return mixed[] |
|
| 34 | + * @return EbayEnterprise_Amqp_Helper_Config[] |
|
| 35 | 35 | */ |
| 36 | 36 | protected function _checkTypes(EbayEnterprise_Amqp_Helper_Config $configHelper) |
| 37 | 37 | { |
@@ -41,9 +41,9 @@ discard block |
||
| 41 | 41 | * Return the value at field in array if it exists. Otherwise, use the |
| 42 | 42 | * default value. |
| 43 | 43 | * @param array $arr |
| 44 | - * @param string|int $field Valid array key |
|
| 44 | + * @param string $field Valid array key |
|
| 45 | 45 | * @param mixed $default |
| 46 | - * @return mixed |
|
| 46 | + * @return EbayEnterprise_Amqp_Helper_Config |
|
| 47 | 47 | */ |
| 48 | 48 | protected function _nullCoalesce(array $arr, $field, $default) |
| 49 | 49 | { |
@@ -1,17 +1,17 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Copyright (c) 2013-2014 eBay Enterprise, Inc. |
|
| 4 | - * |
|
| 5 | - * NOTICE OF LICENSE |
|
| 6 | - * |
|
| 7 | - * This source file is subject to the Open Software License (OSL 3.0) |
|
| 8 | - * that is bundled with this package in the file LICENSE.md. |
|
| 9 | - * It is also available through the world-wide-web at this URL: |
|
| 10 | - * http://opensource.org/licenses/osl-3.0.php |
|
| 11 | - * |
|
| 12 | - * @copyright Copyright (c) 2013-2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/) |
|
| 13 | - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
|
| 14 | - */ |
|
| 3 | + * Copyright (c) 2013-2014 eBay Enterprise, Inc. |
|
| 4 | + * |
|
| 5 | + * NOTICE OF LICENSE |
|
| 6 | + * |
|
| 7 | + * This source file is subject to the Open Software License (OSL 3.0) |
|
| 8 | + * that is bundled with this package in the file LICENSE.md. |
|
| 9 | + * It is also available through the world-wide-web at this URL: |
|
| 10 | + * http://opensource.org/licenses/osl-3.0.php |
|
| 11 | + * |
|
| 12 | + * @copyright Copyright (c) 2013-2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/) |
|
| 13 | + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
|
| 14 | + */ |
|
| 15 | 15 | |
| 16 | 16 | class EbayEnterprise_Amqp_Model_Observer |
| 17 | 17 | { |
@@ -70,7 +70,7 @@ |
||
| 70 | 70 | * Return the value at field in array if it exists. Otherwise, use the |
| 71 | 71 | * default value. |
| 72 | 72 | * @param array $arr |
| 73 | - * @param string|int $field Valid array key |
|
| 73 | + * @param string $field Valid array key |
|
| 74 | 74 | * @param mixed $default |
| 75 | 75 | * @return mixed |
| 76 | 76 | */ |
@@ -1,17 +1,17 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Copyright (c) 2013-2014 eBay Enterprise, Inc. |
|
| 4 | - * |
|
| 5 | - * NOTICE OF LICENSE |
|
| 6 | - * |
|
| 7 | - * This source file is subject to the Open Software License (OSL 3.0) |
|
| 8 | - * that is bundled with this package in the file LICENSE.md. |
|
| 9 | - * It is also available through the world-wide-web at this URL: |
|
| 10 | - * http://opensource.org/licenses/osl-3.0.php |
|
| 11 | - * |
|
| 12 | - * @copyright Copyright (c) 2013-2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/) |
|
| 13 | - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
|
| 14 | - */ |
|
| 3 | + * Copyright (c) 2013-2014 eBay Enterprise, Inc. |
|
| 4 | + * |
|
| 5 | + * NOTICE OF LICENSE |
|
| 6 | + * |
|
| 7 | + * This source file is subject to the Open Software License (OSL 3.0) |
|
| 8 | + * that is bundled with this package in the file LICENSE.md. |
|
| 9 | + * It is also available through the world-wide-web at this URL: |
|
| 10 | + * http://opensource.org/licenses/osl-3.0.php |
|
| 11 | + * |
|
| 12 | + * @copyright Copyright (c) 2013-2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/) |
|
| 13 | + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
|
| 14 | + */ |
|
| 15 | 15 | |
| 16 | 16 | use eBayEnterprise\RetailOrderManagement\Payload\Exception; |
| 17 | 17 | use eBayEnterprise\RetailOrderManagement\Payload\OrderEvents\IOrderEvent; |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | /** |
| 31 | 31 | * Test getting the last saved test message timestamp to be displayed in the |
| 32 | 32 | * admin. |
| 33 | - * @param string|null $timestamp |
|
| 33 | + * @param string|null $lastTimestamp |
|
| 34 | 34 | * @param string $value |
| 35 | 35 | * @dataProvider provideLastTimestamp |
| 36 | 36 | */ |
@@ -1,17 +1,17 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Copyright (c) 2013-2014 eBay Enterprise, Inc. |
|
| 4 | - * |
|
| 5 | - * NOTICE OF LICENSE |
|
| 6 | - * |
|
| 7 | - * This source file is subject to the Open Software License (OSL 3.0) |
|
| 8 | - * that is bundled with this package in the file LICENSE.md. |
|
| 9 | - * It is also available through the world-wide-web at this URL: |
|
| 10 | - * http://opensource.org/licenses/osl-3.0.php |
|
| 11 | - * |
|
| 12 | - * @copyright Copyright (c) 2013-2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/) |
|
| 13 | - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
|
| 14 | - */ |
|
| 3 | + * Copyright (c) 2013-2014 eBay Enterprise, Inc. |
|
| 4 | + * |
|
| 5 | + * NOTICE OF LICENSE |
|
| 6 | + * |
|
| 7 | + * This source file is subject to the Open Software License (OSL 3.0) |
|
| 8 | + * that is bundled with this package in the file LICENSE.md. |
|
| 9 | + * It is also available through the world-wide-web at this URL: |
|
| 10 | + * http://opensource.org/licenses/osl-3.0.php |
|
| 11 | + * |
|
| 12 | + * @copyright Copyright (c) 2013-2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/) |
|
| 13 | + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
|
| 14 | + */ |
|
| 15 | 15 | |
| 16 | 16 | class EbayEnterprise_Amqp_Test_Model_Adminhtml_System_Config_Backend_LasttestmessageTest extends EbayEnterprise_Eb2cCore_Test_Base |
| 17 | 17 | { |
@@ -63,6 +63,7 @@ discard block |
||
| 63 | 63 | * @param string |
| 64 | 64 | * @param array |
| 65 | 65 | * @param mixed |
| 66 | + * @param string $key |
|
| 66 | 67 | * @return mixed |
| 67 | 68 | */ |
| 68 | 69 | protected function _nullCoalesce(array $arr, $key, $default) |
@@ -159,7 +160,7 @@ discard block |
||
| 159 | 160 | /** |
| 160 | 161 | * Get the base url for a given store |
| 161 | 162 | * |
| 162 | - * @param $storeId |
|
| 163 | + * @param integer $storeId |
|
| 163 | 164 | * @return string the store base url |
| 164 | 165 | */ |
| 165 | 166 | public function getStoreUrl($storeId) |
@@ -717,6 +718,7 @@ discard block |
||
| 717 | 718 | * |
| 718 | 719 | * @param string |
| 719 | 720 | * @param mixed |
| 721 | + * @param string $key |
|
| 720 | 722 | * @return mixed |
| 721 | 723 | */ |
| 722 | 724 | protected function reregister($key, $value=null) |
@@ -370,8 +370,8 @@ discard block |
||
| 370 | 370 | */ |
| 371 | 371 | public function mapPattern(array $keyMap, $pattern) |
| 372 | 372 | { |
| 373 | - return array_reduce(array_keys($keyMap), function ($result, $key) use ($keyMap, $pattern) { |
|
| 374 | - $result = (trim($result) === '')? $pattern : $result; |
|
| 373 | + return array_reduce(array_keys($keyMap), function($result, $key) use ($keyMap, $pattern) { |
|
| 374 | + $result = (trim($result) === '') ? $pattern : $result; |
|
| 375 | 375 | return str_replace(sprintf('{%s}', $key), $keyMap[$key], $result); |
| 376 | 376 | }); |
| 377 | 377 | } |
@@ -547,7 +547,7 @@ discard block |
||
| 547 | 547 | protected function _loadWebsiteFilter($mageStoreId) |
| 548 | 548 | { |
| 549 | 549 | $config = Mage::helper('eb2ccore')->getConfigModel($mageStoreId); |
| 550 | - return array ( |
|
| 550 | + return array( |
|
| 551 | 551 | 'catalog_id' => $config->catalogId, |
| 552 | 552 | 'client_id' => $config->clientId, |
| 553 | 553 | 'store_id' => $config->storeId, |
@@ -641,7 +641,7 @@ discard block |
||
| 641 | 641 | */ |
| 642 | 642 | public function denormalizeSku($itemId, $catalogId) |
| 643 | 643 | { |
| 644 | - return (!empty($itemId) && strpos($itemId, $catalogId . '-') === 0)? |
|
| 644 | + return (!empty($itemId) && strpos($itemId, $catalogId . '-') === 0) ? |
|
| 645 | 645 | str_replace($catalogId . '-', '', $itemId) : $itemId; |
| 646 | 646 | } |
| 647 | 647 | |
@@ -719,7 +719,7 @@ discard block |
||
| 719 | 719 | * @param mixed |
| 720 | 720 | * @return mixed |
| 721 | 721 | */ |
| 722 | - protected function reregister($key, $value=null) |
|
| 722 | + protected function reregister($key, $value = null) |
|
| 723 | 723 | { |
| 724 | 724 | $old = Mage::registry($key); |
| 725 | 725 | Mage::unregister($key); |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | * @param string $attribute |
| 90 | 90 | * @param Mage_Catalog_Model_Product $product |
| 91 | 91 | * @param DOMDocument $doc |
| 92 | - * @return DOMNode|null |
|
| 92 | + * @return DOMDocumentFragment|null |
|
| 93 | 93 | * @SuppressWarnings(PHPMD.UnusedFormalParameter) |
| 94 | 94 | */ |
| 95 | 95 | public function passStyle($attrValue, $attribute, Mage_Catalog_Model_Product $product, DOMDocument $doc) |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | * @param Mage_Catalog_Model_Product $product |
| 178 | 178 | * @param DOMDocument $doc |
| 179 | 179 | * @throws EbayEnterprise_Catalog_Model_Pim_Product_Validation_Exception |
| 180 | - * @return DOMNode|null |
|
| 180 | + * @return DOMCdataSection |
|
| 181 | 181 | * @SuppressWarnings(PHPMD.UnusedFormalParameter) |
| 182 | 182 | */ |
| 183 | 183 | public function passTaxCode($attrValue, $attribute, Mage_Catalog_Model_Product $product, DOMDocument $doc) |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | * @param string $attribute |
| 196 | 196 | * @param Mage_Catalog_Model_Product $product |
| 197 | 197 | * @param DOMDocument $doc |
| 198 | - * @return DOMNode|null |
|
| 198 | + * @return null|DOMDocumentFragment |
|
| 199 | 199 | * @SuppressWarnings(PHPMD.UnusedFormalParameter) |
| 200 | 200 | */ |
| 201 | 201 | public function passUnitCost($attrValue, $attribute, Mage_Catalog_Model_Product $product, DOMDocument $doc) |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | * @param string $attribute |
| 232 | 232 | * @param Mage_Catalog_Model_Product $product |
| 233 | 233 | * @param DOMDocument $doc |
| 234 | - * @return DOMNode|null |
|
| 234 | + * @return DOMCdataSection|null |
|
| 235 | 235 | * @SuppressWarnings(PHPMD.UnusedFormalParameter) |
| 236 | 236 | */ |
| 237 | 237 | public function passColorCode($attrValue, $attribute, Mage_Catalog_Model_Product $product, DOMDocument $doc) |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | * @param string $attribute |
| 248 | 248 | * @param Mage_Catalog_Model_Product $product |
| 249 | 249 | * @param DOMDocument $doc |
| 250 | - * @return DOMNode|null |
|
| 250 | + * @return DOMCdataSection|null |
|
| 251 | 251 | * @SuppressWarnings(PHPMD.UnusedFormalParameter) |
| 252 | 252 | */ |
| 253 | 253 | public function passColorDescription($attrValue, $attribute, Mage_Catalog_Model_Product $product, DOMDocument $doc) |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | * @param string $attribute |
| 264 | 264 | * @param Mage_Catalog_Model_Product $product |
| 265 | 265 | * @param DOMDocument $doc |
| 266 | - * @return DOMNode|null |
|
| 266 | + * @return DOMDocumentFragment |
|
| 267 | 267 | * @SuppressWarnings(PHPMD.UnusedFormalParameter) |
| 268 | 268 | */ |
| 269 | 269 | public function passItemURL($attrValue, $attribute, Mage_Catalog_Model_Product $product, DOMDocument $doc) |
@@ -300,7 +300,7 @@ discard block |
||
| 300 | 300 | * @param string $attribute |
| 301 | 301 | * @param Mage_Catalog_Model_Product $product |
| 302 | 302 | * @param DOMDocument $doc |
| 303 | - * @return DOMNode|null |
|
| 303 | + * @return DOMDocumentFragment |
|
| 304 | 304 | * @SuppressWarnings(PHPMD.UnusedFormalParameter) |
| 305 | 305 | */ |
| 306 | 306 | public function passGiftCard($attrValue, $attribute, Mage_Catalog_Model_Product $product, DOMDocument $doc) |
@@ -324,7 +324,7 @@ discard block |
||
| 324 | 324 | * @param string |
| 325 | 325 | * @param Mage_Catalog_Model_Product |
| 326 | 326 | * @param DOMDocument |
| 327 | - * @return DOMNode|null |
|
| 327 | + * @return DOMCdataSection|null |
|
| 328 | 328 | */ |
| 329 | 329 | public function passDropShipSupplierPrefix($attrValue, $attribute, Mage_Catalog_Model_Product $product, DOMDocument $doc) |
| 330 | 330 | { |
@@ -337,7 +337,7 @@ discard block |
||
| 337 | 337 | * @param string |
| 338 | 338 | * @param Mage_Catalog_Model_Product |
| 339 | 339 | * @param DOMDocument |
| 340 | - * @return DOMNode|null |
|
| 340 | + * @return DOMCdataSection|null |
|
| 341 | 341 | */ |
| 342 | 342 | public function passSupplierPartNumber($attrValue, $attribute, Mage_Catalog_Model_Product $product, DOMDocument $doc) |
| 343 | 343 | { |
@@ -353,7 +353,7 @@ discard block |
||
| 353 | 353 | * @param string |
| 354 | 354 | * @param Mage_Catalog_Model_Product |
| 355 | 355 | * @param DOMDocument |
| 356 | - * @return DOMNode|null |
|
| 356 | + * @return DOMCdataSection |
|
| 357 | 357 | * @SuppressWarnings(PHPMD.UnusedFormalParameter) |
| 358 | 358 | */ |
| 359 | 359 | public function passSubscriptionEligible($attrValue, $attribute, Mage_Catalog_Model_Product $product, DOMDocument $doc) |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | * @param string |
| 371 | 371 | * @param Mage_Catalog_Model_Product |
| 372 | 372 | * @param DOMDocument |
| 373 | - * @return DOMNode|null |
|
| 373 | + * @return DOMCdataSection |
|
| 374 | 374 | * @SuppressWarnings(PHPMD.UnusedFormalParameter) |
| 375 | 375 | */ |
| 376 | 376 | public function passSubscriptionType($attrValue, $attribute, Mage_Catalog_Model_Product $product, DOMDocument $doc) |
@@ -1,17 +1,17 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Copyright (c) 2013-2014 eBay Enterprise, Inc. |
|
| 4 | - * |
|
| 5 | - * NOTICE OF LICENSE |
|
| 6 | - * |
|
| 7 | - * This source file is subject to the Open Software License (OSL 3.0) |
|
| 8 | - * that is bundled with this package in the file LICENSE.md. |
|
| 9 | - * It is also available through the world-wide-web at this URL: |
|
| 10 | - * http://opensource.org/licenses/osl-3.0.php |
|
| 11 | - * |
|
| 12 | - * @copyright Copyright (c) 2013-2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/) |
|
| 13 | - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
|
| 14 | - */ |
|
| 3 | + * Copyright (c) 2013-2014 eBay Enterprise, Inc. |
|
| 4 | + * |
|
| 5 | + * NOTICE OF LICENSE |
|
| 6 | + * |
|
| 7 | + * This source file is subject to the Open Software License (OSL 3.0) |
|
| 8 | + * that is bundled with this package in the file LICENSE.md. |
|
| 9 | + * It is also available through the world-wide-web at this URL: |
|
| 10 | + * http://opensource.org/licenses/osl-3.0.php |
|
| 11 | + * |
|
| 12 | + * @copyright Copyright (c) 2013-2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/) |
|
| 13 | + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
|
| 14 | + */ |
|
| 15 | 15 | |
| 16 | 16 | class EbayEnterprise_Catalog_Helper_Itemmaster extends EbayEnterprise_Catalog_Helper_Pim |
| 17 | 17 | { |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | */ |
| 117 | 117 | public function passSubClass($attrValue, $attribute, Mage_Catalog_Model_Product $product, DOMDocument $doc) |
| 118 | 118 | { |
| 119 | - $value = (int)0; |
|
| 119 | + $value = (int) 0; |
|
| 120 | 120 | if (!empty($attrValue)) { |
| 121 | 121 | $value = $attrValue; |
| 122 | 122 | } |
@@ -287,8 +287,7 @@ discard block |
||
| 287 | 287 | */ |
| 288 | 288 | public function passSalesClass($attrValue, $attribute, Mage_Catalog_Model_Product $product, DOMDocument $doc) |
| 289 | 289 | { |
| 290 | - $enum = empty($attrValue) ? 'stock' : |
|
| 291 | - Mage::getSingleton('eav/entity_attribute') |
|
| 290 | + $enum = empty($attrValue) ? 'stock' : Mage::getSingleton('eav/entity_attribute') |
|
| 292 | 291 | ->loadByCode($product::ENTITY, $attribute) |
| 293 | 292 | ->getSource()->getOptionText($attrValue); |
| 294 | 293 | return $this->passString($enum, $attribute, $product, $doc); |
@@ -346,7 +346,7 @@ |
||
| 346 | 346 | /** |
| 347 | 347 | * it return the pass in value parameter |
| 348 | 348 | * it's a callback to return static value set in the config |
| 349 | - * @param mixed $value |
|
| 349 | + * @param string $value |
|
| 350 | 350 | * @return mixed |
| 351 | 351 | */ |
| 352 | 352 | public function passThrough($value) |
@@ -1,17 +1,17 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Copyright (c) 2013-2014 eBay Enterprise, Inc. |
|
| 4 | - * |
|
| 5 | - * NOTICE OF LICENSE |
|
| 6 | - * |
|
| 7 | - * This source file is subject to the Open Software License (OSL 3.0) |
|
| 8 | - * that is bundled with this package in the file LICENSE.md. |
|
| 9 | - * It is also available through the world-wide-web at this URL: |
|
| 10 | - * http://opensource.org/licenses/osl-3.0.php |
|
| 11 | - * |
|
| 12 | - * @copyright Copyright (c) 2013-2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/) |
|
| 13 | - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
|
| 14 | - */ |
|
| 3 | + * Copyright (c) 2013-2014 eBay Enterprise, Inc. |
|
| 4 | + * |
|
| 5 | + * NOTICE OF LICENSE |
|
| 6 | + * |
|
| 7 | + * This source file is subject to the Open Software License (OSL 3.0) |
|
| 8 | + * that is bundled with this package in the file LICENSE.md. |
|
| 9 | + * It is also available through the world-wide-web at this URL: |
|
| 10 | + * http://opensource.org/licenses/osl-3.0.php |
|
| 11 | + * |
|
| 12 | + * @copyright Copyright (c) 2013-2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/) |
|
| 13 | + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
|
| 14 | + */ |
|
| 15 | 15 | |
| 16 | 16 | /** |
| 17 | 17 | * Functions to help import EB2C attributes into Magento product attributes. |
@@ -99,9 +99,8 @@ discard block |
||
| 99 | 99 | */ |
| 100 | 100 | public function extractStatusValue(DOMNodeList $nodes) |
| 101 | 101 | { |
| 102 | - return ($nodes->length && strtolower($nodes->item(0)->nodeValue) === 'active')? |
|
| 103 | - Mage_Catalog_Model_Product_Status::STATUS_ENABLED: |
|
| 104 | - Mage_Catalog_Model_Product_Status::STATUS_DISABLED; |
|
| 102 | + return ($nodes->length && strtolower($nodes->item(0)->nodeValue) === 'active') ? |
|
| 103 | + Mage_Catalog_Model_Product_Status::STATUS_ENABLED : Mage_Catalog_Model_Product_Status::STATUS_DISABLED; |
|
| 105 | 104 | } |
| 106 | 105 | /** |
| 107 | 106 | * extracts visibility from node list, returning an expected integer or translating an expected string |
@@ -142,7 +141,7 @@ discard block |
||
| 142 | 141 | public function extractProductTypeValue(DOMNodeList $nodes, Mage_Catalog_Model_Product $product) |
| 143 | 142 | { |
| 144 | 143 | $value = strtolower($this->coreHelper->extractNodeVal($nodes)); |
| 145 | - $type = ($this->_isValidProductType($value))? $value : Mage_Catalog_Model_Product_Type::TYPE_SIMPLE; |
|
| 144 | + $type = ($this->_isValidProductType($value)) ? $value : Mage_Catalog_Model_Product_Type::TYPE_SIMPLE; |
|
| 146 | 145 | $product->setTypeId($type) |
| 147 | 146 | ->setTypeInstance(Mage_Catalog_Model_Product_Type::factory($product, true), true); |
| 148 | 147 | return $type; |
@@ -232,9 +231,8 @@ discard block |
||
| 232 | 231 | public function extractUrlKeyValue(DOMNodeList $nodes, Mage_Catalog_Model_Product $product) |
| 233 | 232 | { |
| 234 | 233 | $urlKey = $this->coreHelper->extractNodeVal($nodes); |
| 235 | - return ($urlKey !== '')? |
|
| 236 | - $urlKey . '-' . $product->getStoreId() : |
|
| 237 | - 'Incomplete Product: ' . $product->getSku() . '-' . $product->getStoreId(); |
|
| 234 | + return ($urlKey !== '') ? |
|
| 235 | + $urlKey . '-' . $product->getStoreId() : 'Incomplete Product: ' . $product->getSku() . '-' . $product->getStoreId(); |
|
| 238 | 236 | } |
| 239 | 237 | /** |
| 240 | 238 | * given a gift card type return the gift card constant mapped to it |
@@ -264,7 +262,7 @@ discard block |
||
| 264 | 262 | $value = $this->coreHelper->extractNodeVal($nodes); |
| 265 | 263 | $cfg = Mage::helper('ebayenterprise_catalog')->getConfigModel(); |
| 266 | 264 | $mapData = $cfg->getConfigData(EbayEnterprise_Catalog_Helper_Feed::GIFTCARD_TENDER_CONFIG_PATH); |
| 267 | - return isset($mapData[$value])? $this->_getGiftCardType($mapData[$value]) : null; |
|
| 265 | + return isset($mapData[$value]) ? $this->_getGiftCardType($mapData[$value]) : null; |
|
| 268 | 266 | } |
| 269 | 267 | |
| 270 | 268 | /** |
@@ -313,7 +311,7 @@ discard block |
||
| 313 | 311 | */ |
| 314 | 312 | public function extractStringValue(DOMNodeList $nodes) |
| 315 | 313 | { |
| 316 | - return ($nodes->length)? $nodes->item(0)->nodeValue : null; |
|
| 314 | + return ($nodes->length) ? $nodes->item(0)->nodeValue : null; |
|
| 317 | 315 | } |
| 318 | 316 | /** |
| 319 | 317 | * extract the first element of a dom node list and return a boolean |
@@ -323,7 +321,7 @@ discard block |
||
| 323 | 321 | */ |
| 324 | 322 | public function extractBoolValue(DOMNodeList $nodes) |
| 325 | 323 | { |
| 326 | - return $this->coreHelper->parseBool(($nodes->length)? $nodes->item(0)->nodeValue : null); |
|
| 324 | + return $this->coreHelper->parseBool(($nodes->length) ? $nodes->item(0)->nodeValue : null); |
|
| 327 | 325 | } |
| 328 | 326 | /** |
| 329 | 327 | * extract the first element of a dom node list and return the string value cast as integer value |
@@ -332,7 +330,7 @@ discard block |
||
| 332 | 330 | */ |
| 333 | 331 | public function extractIntValue(DOMNodeList $nodes) |
| 334 | 332 | { |
| 335 | - return ($nodes->length)? (int) $nodes->item(0)->nodeValue : 0; |
|
| 333 | + return ($nodes->length) ? (int) $nodes->item(0)->nodeValue : 0; |
|
| 336 | 334 | } |
| 337 | 335 | /** |
| 338 | 336 | * extract the first element of a dom node list and return the string value cast as float value |
@@ -341,7 +339,7 @@ discard block |
||
| 341 | 339 | */ |
| 342 | 340 | public function extractFloatValue(DOMNodeList $nodes) |
| 343 | 341 | { |
| 344 | - return ($nodes->length)? (float) $nodes->item(0)->nodeValue : 0; |
|
| 342 | + return ($nodes->length) ? (float) $nodes->item(0)->nodeValue : 0; |
|
| 345 | 343 | } |
| 346 | 344 | /** |
| 347 | 345 | * it return the pass in value parameter |
@@ -425,7 +423,7 @@ discard block |
||
| 425 | 423 | $product->setUseConfigGiftMessageAvailable(0); |
| 426 | 424 | // Explicitly casting the extracted boolean value as an integer value because |
| 427 | 425 | // Magento only work with integer value 0 or 1 representing boolean value in the database. |
| 428 | - return (int) $this->coreHelper->parseBool(($nodes->length)? $nodes->item(0)->nodeValue : null); |
|
| 426 | + return (int) $this->coreHelper->parseBool(($nodes->length) ? $nodes->item(0)->nodeValue : null); |
|
| 429 | 427 | } |
| 430 | 428 | return null; |
| 431 | 429 | } |
@@ -73,8 +73,7 @@ |
||
| 73 | 73 | EbayEnterprise_Eb2cCore_Helper_Data $coreHelper, |
| 74 | 74 | EbayEnterprise_MageLog_Helper_Data $logger, |
| 75 | 75 | EbayEnterprise_MageLog_Helper_Context $context |
| 76 | - ) |
|
| 77 | - { |
|
| 76 | + ) { |
|
| 78 | 77 | return func_get_args(); |
| 79 | 78 | } |
| 80 | 79 | |
@@ -149,6 +149,8 @@ discard block |
||
| 149 | 149 | * |
| 150 | 150 | * @param string |
| 151 | 151 | * @param string |
| 152 | + * @param string $attributeCode |
|
| 153 | + * @param string $optionValue |
|
| 152 | 154 | * @return Mage_Eav_Model_Entity_Attribute_Option | null |
| 153 | 155 | */ |
| 154 | 156 | protected function _getAttributeOptionModel($attributeCode, $optionValue) |
@@ -395,7 +397,7 @@ discard block |
||
| 395 | 397 | * Return empty array if there's no option id |
| 396 | 398 | * |
| 397 | 399 | * @param $attribute |
| 398 | - * @param $attributeOptionId |
|
| 400 | + * @param integer $attributeOptionId |
|
| 399 | 401 | * @return array |
| 400 | 402 | */ |
| 401 | 403 | protected function _getAllOptionValues($attribute, $attributeOptionId) |
@@ -1,17 +1,17 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Copyright (c) 2013-2014 eBay Enterprise, Inc. |
|
| 4 | - * |
|
| 5 | - * NOTICE OF LICENSE |
|
| 6 | - * |
|
| 7 | - * This source file is subject to the Open Software License (OSL 3.0) |
|
| 8 | - * that is bundled with this package in the file LICENSE.md. |
|
| 9 | - * It is also available through the world-wide-web at this URL: |
|
| 10 | - * http://opensource.org/licenses/osl-3.0.php |
|
| 11 | - * |
|
| 12 | - * @copyright Copyright (c) 2013-2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/) |
|
| 13 | - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
|
| 14 | - */ |
|
| 3 | + * Copyright (c) 2013-2014 eBay Enterprise, Inc. |
|
| 4 | + * |
|
| 5 | + * NOTICE OF LICENSE |
|
| 6 | + * |
|
| 7 | + * This source file is subject to the Open Software License (OSL 3.0) |
|
| 8 | + * that is bundled with this package in the file LICENSE.md. |
|
| 9 | + * It is also available through the world-wide-web at this URL: |
|
| 10 | + * http://opensource.org/licenses/osl-3.0.php |
|
| 11 | + * |
|
| 12 | + * @copyright Copyright (c) 2013-2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/) |
|
| 13 | + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
|
| 14 | + */ |
|
| 15 | 15 | |
| 16 | 16 | class EbayEnterprise_Catalog_Helper_Map_Attribute extends Mage_Core_Helper_Abstract |
| 17 | 17 | { |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | protected function _getAttributeIdByName($name) |
| 66 | 66 | { |
| 67 | 67 | $attribute = $this->_getAttributeCollection()->getItemByColumnValue('attribute_code', $name); |
| 68 | - return ($attribute)? $attribute->getId() : null; |
|
| 68 | + return ($attribute) ? $attribute->getId() : null; |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | /** |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | { |
| 141 | 141 | /** @var Mage_Eav_Model_Entity_Attribute_Option */ |
| 142 | 142 | $option = $this->_getAttributeOptionModel($attributeCode, $optionValue); |
| 143 | - return (!is_null($option))? (int) $option->getOptionId() : 0; |
|
| 143 | + return (!is_null($option)) ? (int) $option->getOptionId() : 0; |
|
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | /** |