@@ -28,8 +28,8 @@ |
||
| 28 | 28 | |
| 29 | 29 | use ntentan\atiaa\Driver; |
| 30 | 30 | use ntentan\atiaa\exceptions\ConnectionException; |
| 31 | -use ntentan\utils\exceptions\ValidatorNotFoundException; |
|
| 32 | 31 | use ntentan\utils\Validator; |
| 32 | +use ntentan\utils\exceptions\ValidatorNotFoundException; |
|
| 33 | 33 | |
| 34 | 34 | /** |
| 35 | 35 | * Description of DataOperations. |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | $this->initialize(); |
| 212 | 212 | |
| 213 | 213 | return $this->context->getCache()->read( |
| 214 | - "{$this->className}::desc", function () { |
|
| 214 | + "{$this->className}::desc", function() { |
|
| 215 | 215 | return $this->context->getModelDescription($this); |
| 216 | 216 | } |
| 217 | 217 | ); |
@@ -449,13 +449,13 @@ discard block |
||
| 449 | 449 | return null; |
| 450 | 450 | } |
| 451 | 451 | $name = $relationship->getOptions()['name']; |
| 452 | - if(isset($data[$name])) |
|
| 452 | + if (isset($data[$name])) |
|
| 453 | 453 | { |
| 454 | 454 | return $data[$name]; |
| 455 | 455 | } |
| 456 | 456 | $query = $relationship->prepareQuery($data); |
| 457 | 457 | |
| 458 | - if($query) { |
|
| 458 | + if ($query) { |
|
| 459 | 459 | $model = $relationship->getModelInstance(); |
| 460 | 460 | return $model->fetch($query); |
| 461 | 461 | } else { |
@@ -555,7 +555,7 @@ discard block |
||
| 555 | 555 | $expandableModels = empty($expandableModels) ? array_keys($relationships) : $expandableModels; |
| 556 | 556 | foreach ($expandableModels as $name) { |
| 557 | 557 | $value = $this->fetchRelatedFields($relationships[$name], $index); |
| 558 | - if($value) { |
|
| 558 | + if ($value) { |
|
| 559 | 559 | $array[$name] = $value->toArray($depth, $expandableModels); |
| 560 | 560 | } |
| 561 | 561 | } |
@@ -593,7 +593,7 @@ discard block |
||
| 593 | 593 | public function fromArray($data) |
| 594 | 594 | { |
| 595 | 595 | // Create a new instance if this model already has data. |
| 596 | - if($this->hasDataBeenSet) { |
|
| 596 | + if ($this->hasDataBeenSet) { |
|
| 597 | 597 | $instance = new $this->className(); |
| 598 | 598 | } else { |
| 599 | 599 | $instance = $this; |