@@ -40,8 +40,7 @@ |
||
| 40 | 40 | */ |
| 41 | 41 | public function number_of_copies($value){ |
| 42 | 42 | if ($value >= 1 && $value <= 4 ) |
| 43 | - {$this->number_of_copies = $value; } |
|
| 44 | - else { |
|
| 43 | + {$this->number_of_copies = $value; } else { |
|
| 45 | 44 | $error = "Number of copies must be between 1 and 4"; |
| 46 | 45 | throw new \Exception($error); |
| 47 | 46 | } |
@@ -55,8 +55,7 @@ |
||
| 55 | 55 | */ |
| 56 | 56 | public function unit($value) { |
| 57 | 57 | if ($value == "in" || $value = "cm") |
| 58 | - {$this->unit = $value; } |
|
| 59 | - else { |
|
| 58 | + {$this->unit = $value; } else { |
|
| 60 | 59 | $error = "Unit must be in or cm"; |
| 61 | 60 | throw new \Exception($error); |
| 62 | 61 | } |
@@ -21,8 +21,7 @@ |
||
| 21 | 21 | */ |
| 22 | 22 | public function unit($value){ |
| 23 | 23 | if ($value == "lb" || $value == "kg") |
| 24 | - { $this->unit = $value; } |
|
| 25 | - else { |
|
| 24 | + { $this->unit = $value; } else { |
|
| 26 | 25 | $error = "Unit must be lb or kg"; |
| 27 | 26 | throw new \Exception($error); |
| 28 | 27 | } |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | public function street2($value){ |
| 100 | 100 | if(empty($value)) { |
| 101 | 101 | $this->street2 = null; |
| 102 | - }else { |
|
| 102 | + } else { |
|
| 103 | 103 | $this->street2 = strval($value); |
| 104 | 104 | } |
| 105 | 105 | return $this; |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | public function street3($value){ |
| 113 | 113 | if(empty($value)) { |
| 114 | 114 | $this->street3 = null; |
| 115 | - }else { |
|
| 115 | + } else { |
|
| 116 | 116 | $this->street3 = strval($value); |
| 117 | 117 | } |
| 118 | 118 | return $this; |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | 'ZMW']; |
| 41 | 41 | if (in_array($value, $acceptedCurrencies)){ |
| 42 | 42 | $this->currency = $value; |
| 43 | - }else { |
|
| 43 | + } else { |
|
| 44 | 44 | $error = "Currency code invalid or not serviceable"; |
| 45 | 45 | throw new \Exception($error); |
| 46 | 46 | } |