GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Pull Request — master (#20)
by Michael
10:50
created
src/app/code/community/EbayEnterprise/Address/Block/Suggestions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 class EbayEnterprise_Address_Block_Suggestions extends Mage_Core_Block_Template
22 22
 {
23 23
     // Name of the input field
24
-    const SUGGESTION_INPUT_NAME         = 'validation_option';
24
+    const SUGGESTION_INPUT_NAME = 'validation_option';
25 25
     /**
26 26
      * Where to find the format template in the config registry
27 27
      * @see EbayEnterprise_Address_Model_Config::$_configPaths
Please login to merge, or discard this patch.
src/app/code/community/EbayEnterprise/Address/Test/Model/ValidatorTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -917,8 +917,8 @@  discard block
 block discarded – undo
917 917
             ->method('getAddressType')
918 918
             ->will($this->returnValue($addressType));
919 919
         $addressData = [
920
-            ['street',    null, '123 Main St'],
921
-            ['city',      null, 'Fooville'],
920
+            ['street', null, '123 Main St'],
921
+            ['city', null, 'Fooville'],
922 922
             ['region_id', null, 51],
923 923
         ];
924 924
         $address->expects($this->any())
@@ -967,8 +967,8 @@  discard block
 block discarded – undo
967 967
         // any one of these being different from the validatedAddressData below
968 968
         // will cause the comparison check fail
969 969
         $addressData = [
970
-            ['street',    null, 'Borg'],
971
-            ['city',      null, 'Barton'],
970
+            ['street', null, 'Borg'],
971
+            ['city', null, 'Barton'],
972 972
             ['region_id', null, 41],
973 973
         ];
974 974
         $address->expects($this->any())
Please login to merge, or discard this patch.
src/app/code/community/EbayEnterprise/Amqp/Test/Helper/ConfigTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
             ->will($this->returnValue(array_map(
85 85
                 // Get just the "store" key from each triple in the $stores array - produces
86 86
                 // an array of Mage_Core_Model_Store objects.
87
-                function ($storeAndConfig) {
87
+                function($storeAndConfig) {
88 88
                     return $storeAndConfig['store'];
89 89
                 },
90 90
                 $stores
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
                 // and the Eb2cCore module's config as the second for each triple in
100 100
                 // the $stores array - allows the stub to return the correct
101 101
                 // configuration for a given store.
102
-                function ($storeAndConfig) {
102
+                function($storeAndConfig) {
103 103
                     return array($storeAndConfig['store'], $storeAndConfig['core_config']);
104 104
                 },
105 105
                 $stores
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
                 // and the EbayEnterprise_Amqp module's config as the second for each
114 114
                 // triple in the $stores array - allows the stub to return the correct
115 115
                 // configuration for a given store.
116
-                function ($storeAndConfig) {
116
+                function($storeAndConfig) {
117 117
                     return array($storeAndConfig['store'], $storeAndConfig['amqp_config']);
118 118
                 },
119 119
                 $stores
Please login to merge, or discard this patch.
src/app/code/community/EbayEnterprise/Catalog/Helper/Feed.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -165,8 +165,7 @@  discard block
 block discarded – undo
165 165
         // (dates prior to unix epoch time 0 for example). If the two combined
166 166
         // functions are unable to produce a valid time, fall back to the unix
167 167
         // time `0` so something can be returned.
168
-        return DateTime::createFromFormat('U', strtotime($messageDateTime)) ?:
169
-            DateTime::createFromFormat('U', 0);
168
+        return DateTime::createFromFormat('U', strtotime($messageDateTime)) ?: DateTime::createFromFormat('U', 0);
170 169
     }
171 170
     /**
172 171
      * Ensure the Feed's event type matches.
@@ -224,7 +223,7 @@  discard block
 block discarded – undo
224 223
     {
225 224
         $data = array();
226 225
         foreach ($mhc as $key => $value) {
227
-            $data[$key] = (is_array($value))? Mage::helper('eb2ccore')->invokeCallback($value) : $value;
226
+            $data[$key] = (is_array($value)) ? Mage::helper('eb2ccore')->invokeCallback($value) : $value;
228 227
         }
229 228
         return $data;
230 229
     }
Please login to merge, or discard this patch.
src/app/code/community/EbayEnterprise/Catalog/Helper/Itemmaster.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/app/code/community/EbayEnterprise/Catalog/Helper/Map.php 1 patch
Spacing   +11 added lines, -13 removed lines patch added patch discarded remove patch
@@ -99,9 +99,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/app/code/community/EbayEnterprise/Catalog/Helper/Map/Attribute.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
src/app/code/community/EbayEnterprise/Catalog/Helper/Map/Category.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     {
73 73
         return array_filter(
74 74
             array_map(array($this, '_mapNamePathToId'), $this->_convertNodesToDashNames($nodes)),
75
-            function ($id) {
75
+            function($id) {
76 76
                 // Strip elements where the path was not found.
77 77
                 // @see _mapNamePathToId
78 78
                 return $id !== -1;
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
             $ids = array_reverse($catColl->getAllIds());
116 116
             $names = array_reverse($catColl->getColumnValues('name'));
117 117
             $this->_namePathToIdMap = array_combine(
118
-                array_map(function ($path) use ($ids, $names) {
118
+                array_map(function($path) use ($ids, $names) {
119 119
                     // replace each id in a path with the category name for that
120 120
                     // category id, and replace slashes with dashes.
121 121
                     return strtr(str_replace($ids, $names, $path), '/', '-');
Please login to merge, or discard this patch.
src/app/code/community/EbayEnterprise/Catalog/Helper/Map/Giftcard.php 1 patch
Spacing   +6 added lines, -9 removed lines patch added patch discarded remove patch
@@ -94,9 +94,8 @@  discard block
 block discarded – undo
94 94
      */
95 95
     public function extractIsRedeemable(DOMNodeList $nodes, Mage_Catalog_Model_Product $product)
96 96
     {
97
-        return (!is_null($this->extractGiftcardTenderValue($nodes, $product)) && $product->getUseConfigIsRedeemable())?
98
-            Mage::helper('eb2ccore')->getStoreConfigFlag(Enterprise_GiftCard_Model_Giftcard::XML_PATH_IS_REDEEMABLE, $product->getStoreId()) :
99
-            (bool) $product->getIsRedeemable();
97
+        return (!is_null($this->extractGiftcardTenderValue($nodes, $product)) && $product->getUseConfigIsRedeemable()) ?
98
+            Mage::helper('eb2ccore')->getStoreConfigFlag(Enterprise_GiftCard_Model_Giftcard::XML_PATH_IS_REDEEMABLE, $product->getStoreId()) : (bool) $product->getIsRedeemable();
100 99
     }
101 100
 
102 101
     /**
@@ -109,9 +108,8 @@  discard block
 block discarded – undo
109 108
      */
110 109
     public function extractLifetime(DOMNodeList $nodes, Mage_Catalog_Model_Product $product)
111 110
     {
112
-        return (!is_null($this->extractGiftcardTenderValue($nodes, $product)) && $product->getUseConfigLifetime())?
113
-            (int) Mage::helper('eb2ccore')->getStoreConfig(Enterprise_GiftCard_Model_Giftcard::XML_PATH_LIFETIME, $product->getStoreId()) :
114
-            (int) $product->getLifetime();
111
+        return (!is_null($this->extractGiftcardTenderValue($nodes, $product)) && $product->getUseConfigLifetime()) ?
112
+            (int) Mage::helper('eb2ccore')->getStoreConfig(Enterprise_GiftCard_Model_Giftcard::XML_PATH_LIFETIME, $product->getStoreId()) : (int) $product->getLifetime();
115 113
     }
116 114
 
117 115
     /**
@@ -125,8 +123,7 @@  discard block
 block discarded – undo
125 123
      */
126 124
     public function extractEmailTemplate(DOMNodeList $nodes, Mage_Catalog_Model_Product $product)
127 125
     {
128
-        return (!is_null($this->extractGiftcardTenderValue($nodes, $product)) && $product->getUseConfigEmailTemplate())?
129
-            Mage::helper('eb2ccore')->getStoreConfig(Enterprise_GiftCard_Model_Giftcard::XML_PATH_EMAIL_TEMPLATE, $product->getStoreId()) :
130
-            $product->getEmailTemplate();
126
+        return (!is_null($this->extractGiftcardTenderValue($nodes, $product)) && $product->getUseConfigEmailTemplate()) ?
127
+            Mage::helper('eb2ccore')->getStoreConfig(Enterprise_GiftCard_Model_Giftcard::XML_PATH_EMAIL_TEMPLATE, $product->getStoreId()) : $product->getEmailTemplate();
131 128
     }
132 129
 }
Please login to merge, or discard this patch.