@@ 29-38 (lines=10) @@ | ||
26 | * |
|
27 | * @return $this |
|
28 | */ |
|
29 | public function country($value) |
|
30 | { |
|
31 | if (in_array($value, $this->acceptedCountries)) { |
|
32 | $this->country = $value; |
|
33 | } else { |
|
34 | $error = 'Country code invalid or not serviceable'; |
|
35 | throw new \Exception($error); |
|
36 | } |
|
37 | ||
38 | return $this; |
|
39 | } |
|
40 | ||
41 | /** |
@@ 83-91 (lines=9) @@ | ||
80 | * |
|
81 | * @return $this |
|
82 | */ |
|
83 | public function origin_country($value) |
|
84 | { |
|
85 | if (in_array($value, $this->acceptedCountries)) { |
|
86 | $this->origin_country = $value; |
|
87 | } else { |
|
88 | $error = 'Country code invalid or not serviceable'; |
|
89 | throw new \Exception($error); |
|
90 | } |
|
91 | ||
92 | return $this; |
|
93 | } |
|
94 |
@@ 43-52 (lines=10) @@ | ||
40 | * |
|
41 | * @return $this |
|
42 | */ |
|
43 | public function country($value) |
|
44 | { |
|
45 | if (in_array($value, $this->acceptedCountries)) { |
|
46 | $this->country = $value; |
|
47 | } else { |
|
48 | $error = 'Country code invalid or not serviceable'; |
|
49 | throw new \Exception($error); |
|
50 | } |
|
51 | ||
52 | return $this; |
|
53 | } |
|
54 | } |
|
55 |