Completed
Push — master ( b8a416...8971e9 )
by Aleksey
16:11
created
src/SpeckCatalog/Model/CartItemMeta.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,13 +15,13 @@
 block discarded – undo
15 15
     public function __construct(array $config = array())
16 16
     {
17 17
         if (count($config)) {
18
-            $this->parentOptionId   = isset($config['parent_option_id'])   ? $config['parent_option_id']   : null;
19
-            $this->productId        = isset($config['product_id'])         ? $config['product_id']         : null;
20
-            $this->itemNumber       = isset($config['item_number'])        ? $config['item_number']        : null;
18
+            $this->parentOptionId   = isset($config['parent_option_id']) ? $config['parent_option_id'] : null;
19
+            $this->productId        = isset($config['product_id']) ? $config['product_id'] : null;
20
+            $this->itemNumber       = isset($config['item_number']) ? $config['item_number'] : null;
21 21
             $this->parentOptionName = isset($config['parent_option_name']) ? $config['parent_option_name'] : null;
22
-            $this->flatOptions      = isset($config['flat_options'])       ? $config['flat_options']       : array();
23
-            $this->image            = isset($config['image'])              ? $config['image']              : null;
24
-            $this->uom              = isset($config['uom'])                ? $config['uom']                : null;
22
+            $this->flatOptions      = isset($config['flat_options']) ? $config['flat_options'] : array();
23
+            $this->image            = isset($config['image']) ? $config['image'] : null;
24
+            $this->uom              = isset($config['uom']) ? $config['uom'] : null;
25 25
         }
26 26
     }
27 27
 
Please login to merge, or discard this patch.
src/SpeckCatalog/Service/Category.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -85,8 +85,8 @@  discard block
 block discarded – undo
85 85
 
86 86
     public function addProduct($categoryOrId, $productOrId)
87 87
     {
88
-        $categoryId = ( is_numeric($categoryOrId) ? $categoryOrId : $categoryOrId->getCategoryId() );
89
-        $productId = ( is_numeric($productOrId) ? $productOrId  : $productOrId->getProductId() );
88
+        $categoryId = (is_numeric($categoryOrId) ? $categoryOrId : $categoryOrId->getCategoryId());
89
+        $productId = (is_numeric($productOrId) ? $productOrId : $productOrId->getProductId());
90 90
 
91 91
         return $this->getEntityMapper()->addProduct($categoryId, $productId);
92 92
     }
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         if (null === $categoryOrId) {
97 97
             throw new \RuntimeException('categoryOrId cannot be null');
98 98
         }
99
-        $categoryId = ( is_numeric($categoryOrId) ? $categoryOrId : $categoryOrId->getCategoryId() );
99
+        $categoryId = (is_numeric($categoryOrId) ? $categoryOrId : $categoryOrId->getCategoryId());
100 100
 
101 101
         $parentCategoryId = (
102 102
             is_int($parentCategoryOrIdOrNull)
@@ -112,8 +112,8 @@  discard block
 block discarded – undo
112 112
 
113 113
     public function setImage($categoryOrId, $imageOrId)
114 114
     {
115
-        $categoryId = ( is_int($categoryOrId) ? $categoryOrId : $categoryOrId->getCategoryId() );
116
-        $imageId    = ( is_int($imageOrId)    ? $imageOrId    : $imageOrId->getMediaId() );
115
+        $categoryId = (is_int($categoryOrId) ? $categoryOrId : $categoryOrId->getCategoryId());
116
+        $imageId    = (is_int($imageOrId) ? $imageOrId : $imageOrId->getMediaId());
117 117
 
118 118
         return $this->getImageService()->addLinker('category', $categoryId, $imageId);
119 119
     }
Please login to merge, or discard this patch.
src/SpeckCatalog/Service/Choice.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -42,8 +42,8 @@  discard block
 block discarded – undo
42 42
 
43 43
     public function addOption($choiceOrId, $optionOrId)
44 44
     {
45
-        $choiceId = ( is_int($choiceOrId) ? $choiceOrId : $choiceOrId->getChoiceId() );
46
-        $optionId = ( is_int($optionOrId) ? $optionOrId : $optionOrId->getOptionId() );
45
+        $choiceId = (is_int($choiceOrId) ? $choiceOrId : $choiceOrId->getChoiceId());
46
+        $optionId = (is_int($optionOrId) ? $optionOrId : $optionOrId->getOptionId());
47 47
         $this->getEntityMapper()->addOption($choiceId, $optionId);
48 48
         return $this->getOptionService()->find(array('option_id' => $optionId));
49 49
     }
@@ -68,14 +68,14 @@  discard block
 block discarded – undo
68 68
 
69 69
     public function removeOption($choiceOrId, $optionOrId)
70 70
     {
71
-        $productId = ( is_int($choiceOrId) ? $choiceOrId : $choiceOrId->getProductId() );
72
-        $optionId  = ( is_int($optionOrId) ? $optionOrId : $optionOrId->getOptionId() );
71
+        $productId = (is_int($choiceOrId) ? $choiceOrId : $choiceOrId->getProductId());
72
+        $optionId  = (is_int($optionOrId) ? $optionOrId : $optionOrId->getOptionId());
73 73
         $this->getEntityMapper()->removeOption($productId, $optionId);
74 74
     }
75 75
 
76 76
     public function choiceFromProduct($productOrId)
77 77
     {
78
-        $product = ( !is_int($productOrId) ? $productOrId : $this->getProductService()->find($productOrId) );
78
+        $product = (!is_int($productOrId) ? $productOrId : $this->getProductService()->find($productOrId));
79 79
         $choice = $this->getEntity()->setProductId($product->getProductId());
80 80
         return $this->persist($choice);
81 81
     }
Please login to merge, or discard this patch.
src/SpeckCatalog/View/Helper/Functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
         if ($product->has('features')) {
18 18
             $str = '<ul>';
19 19
             $features = $product->getFeatures();
20
-            for ($i=0; $i < 3; $i++) {
20
+            for ($i = 0; $i < 3; $i++) {
21 21
                 if ($features[$i]) {
22 22
                     $str .= '<li><span>&nbsp;' . $features[$i] . '</span></li>';
23 23
                 }
Please login to merge, or discard this patch.