@@ -68,7 +68,7 @@ |
||
68 | 68 | if ($this->getPriceDiscountFixed()) { |
69 | 69 | return -$this->getPriceDiscountFixed(); |
70 | 70 | } elseif ($this->getPriceDiscountPercent()) { |
71 | - return $parentPrice * -($this->getPriceDiscountPercent()/100); |
|
71 | + return $parentPrice * -($this->getPriceDiscountPercent() / 100); |
|
72 | 72 | } elseif ($this->getPriceNoCharge()) { |
73 | 73 | return -$parentPrice; |
74 | 74 | } elseif ($this->getPriceOverrideFixed()) { |
@@ -10,7 +10,7 @@ |
||
10 | 10 | protected $parent; |
11 | 11 | |
12 | 12 | /** |
13 | - * @return parent |
|
13 | + * @return AbstractModel |
|
14 | 14 | */ |
15 | 15 | public function getParent() |
16 | 16 | { |
@@ -85,8 +85,8 @@ discard block |
||
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 |
||
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 |
||
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 | } |
@@ -42,8 +42,8 @@ discard block |
||
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 |
||
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 | } |
@@ -17,7 +17,7 @@ |
||
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> ' . $features[$i] . '</span></li>'; |
23 | 23 | } |