@@ -26,7 +26,6 @@ |
||
| 26 | 26 | |
| 27 | 27 | namespace ntentan\nibii\relationships; |
| 28 | 28 | |
| 29 | -use ntentan\nibii\exceptions\NibiiException; |
|
| 30 | 29 | use ntentan\nibii\ORMContext; |
| 31 | 30 | use ntentan\nibii\Relationship; |
| 32 | 31 | use ntentan\utils\Text; |
@@ -110,7 +110,7 @@ |
||
| 110 | 110 | $jointModelRecords = []; |
| 111 | 111 | foreach ($this->tempdata as $relatedRecord) { |
| 112 | 112 | if (!$relatedRecord->save()) { |
| 113 | - $this->invalidFields =$this->tempdata->getInvalidFields(); |
|
| 113 | + $this->invalidFields = $this->tempdata->getInvalidFields(); |
|
| 114 | 114 | } |
| 115 | 115 | $jointModelRecords[] = [ |
| 116 | 116 | $this->options['junction_local_key'] => $wrapper[$this->options['local_key']], |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | foreach ($relationshipsWithData as $model => $relationship) { |
| 240 | 240 | $relationship->postSave($record); |
| 241 | 241 | $invalidRelatedFields = $relationship->getInvalidFields(); |
| 242 | - if(!empty($invalidRelatedFields)) { |
|
| 242 | + if (!empty($invalidRelatedFields)) { |
|
| 243 | 243 | $status['success'] = false; |
| 244 | 244 | $status['invalid_fields'][$model] = $invalidRelatedFields; |
| 245 | 245 | } |
@@ -265,10 +265,10 @@ discard block |
||
| 265 | 265 | $mainValidatorErrors = $validator->getInvalidFields(); |
| 266 | 266 | } |
| 267 | 267 | |
| 268 | - if(!empty($this->wrapper->getValidationRules())) { |
|
| 268 | + if (!empty($this->wrapper->getValidationRules())) { |
|
| 269 | 269 | $modelValidator = new Validator(); |
| 270 | 270 | $modelValidator->setRules($this->wrapper->getValidationRules()); |
| 271 | - if(!$modelValidator->validate($data)) { |
|
| 271 | + if (!$modelValidator->validate($data)) { |
|
| 272 | 272 | $modelValidatorErrors = $modelValidator->getInvalidFields(); |
| 273 | 273 | } |
| 274 | 274 | } |
@@ -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. |