@@ -26,8 +26,8 @@ |
||
| 26 | 26 | |
| 27 | 27 | namespace ntentan\nibii\relationships; |
| 28 | 28 | |
| 29 | -use ntentan\nibii\exceptions\NibiiException; |
|
| 30 | 29 | use ntentan\nibii\Relationship; |
| 30 | +use ntentan\nibii\exceptions\NibiiException; |
|
| 31 | 31 | use ntentan\utils\Text; |
| 32 | 32 | |
| 33 | 33 | class HasManyRelationship extends Relationship |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | |
| 69 | 69 | public function postSave(&$wrapper) |
| 70 | 70 | { |
| 71 | - foreach($this->tempData as $relatedRecord) { |
|
| 71 | + foreach ($this->tempData as $relatedRecord) { |
|
| 72 | 72 | $relatedRecord[$this->options['foreign_key']] = $wrapper[$this->options['local_key']]; |
| 73 | 73 | if (!$relatedRecord->save()) { |
| 74 | 74 | throw new NibiiException("Failed to save related model [{$this->options['model']}]"); |