@@ -35,19 +35,19 @@ discard block |
||
| 35 | 35 | // Model or Object |
| 36 | 36 | if (!array_key_exists('field_name', $value)) { |
| 37 | 37 | $this->$field = ObjectFactory::make($client, $value); |
| 38 | - } else { |
|
| 38 | + }else { |
|
| 39 | 39 | // Has One Relation - Deprecated |
| 40 | 40 | $name = $value['field_name']; |
| 41 | 41 | $this->$name = $value['field_value']; |
| 42 | 42 | $this->$field = ObjectFactory::make($client, $value['object_data']); |
| 43 | 43 | } |
| 44 | - } else { |
|
| 44 | + }else { |
|
| 45 | 45 | // HasMany / ManyMany Relation |
| 46 | 46 | $list = []; |
| 47 | 47 | foreach ($value as $item) { |
| 48 | 48 | if (ArrayLib::is_associative($item)) { |
| 49 | 49 | $list[] = ObjectFactory::make($client, $item); |
| 50 | - } else { |
|
| 50 | + }else { |
|
| 51 | 51 | $list[] = $item; |
| 52 | 52 | } |
| 53 | 53 | } |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | $data[$key] = []; |
| 75 | 75 | /** @var self $item */ |
| 76 | 76 | foreach ($value as $item) $data[$key][] = $item->toArray(true); |
| 77 | - } else $data[$key] = $value; |
|
| 77 | + }else $data[$key] = $value; |
|
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | return $data; |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | if ($model === static::class) return new $service($this->getClient()); |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | - throw new ErrorException("Could not determine which service to use for " . static::class); |
|
| 101 | + throw new ErrorException("Could not determine which service to use for ".static::class); |
|
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | /** |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | if ($this->exists()) { |
| 113 | 113 | if (!method_exists($service, 'update')) return $this; |
| 114 | 114 | return $service->update($this->ID, $this->toArray()); |
| 115 | - } else { |
|
| 115 | + }else { |
|
| 116 | 116 | if (!method_exists($service, 'create')) return $this; |
| 117 | 117 | return $service->create($this->toArray()); |
| 118 | 118 | } |