@@ -15,6 +15,6 @@ |
||
15 | 15 | */ |
16 | 16 | protected function getSaveURL(): string |
17 | 17 | { |
18 | - return 'api/orders/order/' . $this->ID; |
|
18 | + return 'api/orders/order/'.$this->ID; |
|
19 | 19 | } |
20 | 20 | } |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | // Model or Object |
39 | 39 | if (!array_key_exists('field_name', $value)) { |
40 | 40 | $this->$field = ObjectFactory::make($client, $value); |
41 | - } else { |
|
41 | + }else { |
|
42 | 42 | // Has One Relation - Deprecated |
43 | 43 | $name = $value['field_name']; |
44 | 44 | $this->$name = $value['field_value']; |
@@ -49,20 +49,20 @@ discard block |
||
49 | 49 | if (!property_exists($this->$field, $model)) { |
50 | 50 | $this->$field->$model = $this; |
51 | 51 | } |
52 | - } else { |
|
52 | + }else { |
|
53 | 53 | // HasMany / ManyMany Relation |
54 | 54 | $list = []; |
55 | 55 | foreach ($value as $item) { |
56 | 56 | if (ArrayLib::is_associative($item)) { |
57 | 57 | $list = ObjectFactory::make($client, $item); |
58 | - } else { |
|
58 | + }else { |
|
59 | 59 | $list = $item; |
60 | 60 | } |
61 | 61 | } |
62 | 62 | |
63 | 63 | $this->$field = $list; |
64 | 64 | } |
65 | - } else { |
|
65 | + }else { |
|
66 | 66 | $this->$field = $value; |
67 | 67 | } |
68 | 68 | } |
@@ -29,7 +29,9 @@ |
||
29 | 29 | throw new InvalidArgumentException("Model::__construct() expects an associative array"); |
30 | 30 | } |
31 | 31 | |
32 | - if (array_key_exists('model', $_object_data)) $this->model = $_object_data['model']; |
|
32 | + if (array_key_exists('model', $_object_data)) { |
|
33 | + $this->model = $_object_data['model']; |
|
34 | + } |
|
33 | 35 | $model = $this->model; |
34 | 36 | |
35 | 37 | foreach ($_object_data as $field => $value) { |