@@ -106,6 +106,6 @@ |
||
106 | 106 | $pivotData = $data[ORMInterface::PIVOT_DATA]; |
107 | 107 | |
108 | 108 | //Unique row criteria |
109 | - return $pivotData[$this->innerPivotKey] . '.' . $pivotData[$this->outerPivotKey]; |
|
109 | + return $pivotData[$this->innerPivotKey].'.'.$pivotData[$this->outerPivotKey]; |
|
110 | 110 | } |
111 | 111 | } |
112 | 112 | \ No newline at end of file |
@@ -79,7 +79,7 @@ |
||
79 | 79 | |
80 | 80 | if (!$this->isSynced($this->parent, $this->instance)) { |
81 | 81 | //Syncing FKs before primary command been executed |
82 | - $innerCommand->onExecute(function ($innerCommand) use ($parentCommand) { |
|
82 | + $innerCommand->onExecute(function($innerCommand) use ($parentCommand) { |
|
83 | 83 | $parentCommand->addContext( |
84 | 84 | $this->key(Record::INNER_KEY), |
85 | 85 | $this->lookupKey(Record::OUTER_KEY, $this->parent, $innerCommand) |
@@ -87,7 +87,7 @@ |
||
87 | 87 | //Inversed version of BelongsTo |
88 | 88 | if (!$this->isSynced($this->parent, $this->instance)) { |
89 | 89 | //Syncing FKs after primary command been executed |
90 | - $parentCommand->onExecute(function ($outerCommand) use ($innerCommand) { |
|
90 | + $parentCommand->onExecute(function($outerCommand) use ($innerCommand) { |
|
91 | 91 | $innerCommand->addContext( |
92 | 92 | $this->key(Record::OUTER_KEY), |
93 | 93 | $this->lookupKey(Record::INNER_KEY, $this->parent, $outerCommand) |
@@ -387,7 +387,7 @@ |
||
387 | 387 | |
388 | 388 | if (!$this->isSynced($this->parent, $instance)) { |
389 | 389 | //Delayed linking |
390 | - $parentCommand->onExecute(function ($outerCommand) use ($innerCommand) { |
|
390 | + $parentCommand->onExecute(function($outerCommand) use ($innerCommand) { |
|
391 | 391 | $innerCommand->addContext( |
392 | 392 | $this->key(Record::OUTER_KEY), |
393 | 393 | $this->lookupKey(Record::INNER_KEY, $this->parent, $outerCommand) |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | { |
172 | 172 | if (empty($matched = $this->matchOne($record))) { |
173 | 173 | throw new RelationException( |
174 | - "Unable to get pivotData for non linked record" . ($this->autoload ? '' : " (partial on)") |
|
174 | + "Unable to get pivotData for non linked record".($this->autoload ? '' : " (partial on)") |
|
175 | 175 | ); |
176 | 176 | } |
177 | 177 | |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | } |
362 | 362 | |
363 | 363 | //Syncing pivot data values |
364 | - $command->onComplete(function (ContextualCommandInterface $command) use ($record) { |
|
364 | + $command->onComplete(function(ContextualCommandInterface $command) use ($record) { |
|
365 | 365 | //Now when we are done we can sync our values with current data |
366 | 366 | $this->pivotData->offsetSet($record, $command->getContext()); |
367 | 367 | }); |
@@ -501,7 +501,7 @@ discard block |
||
501 | 501 | ContextualCommandInterface $outerCommand |
502 | 502 | ) { |
503 | 503 | //Parent record dependency |
504 | - $parentCommand->onExecute(function ($parentCommand) use ($pivotCommand, $parent) { |
|
504 | + $parentCommand->onExecute(function($parentCommand) use ($pivotCommand, $parent) { |
|
505 | 505 | $pivotCommand->addContext( |
506 | 506 | $this->key(Record::THOUGHT_INNER_KEY), |
507 | 507 | $this->lookupKey(Record::INNER_KEY, $parent, $parentCommand) |
@@ -509,7 +509,7 @@ discard block |
||
509 | 509 | }); |
510 | 510 | |
511 | 511 | //Outer record dependency |
512 | - $outerCommand->onExecute(function ($outerCommand) use ($pivotCommand, $outer) { |
|
512 | + $outerCommand->onExecute(function($outerCommand) use ($pivotCommand, $outer) { |
|
513 | 513 | $pivotCommand->addContext( |
514 | 514 | $this->key(Record::THOUGHT_OUTER_KEY), |
515 | 515 | $this->lookupKey(Record::OUTER_KEY, $outer, $outerCommand) |
@@ -611,7 +611,7 @@ discard block |
||
611 | 611 | { |
612 | 612 | if ($diff = array_diff(array_keys($pivotData), $this->schema[Record::PIVOT_COLUMNS])) { |
613 | 613 | throw new RelationException( |
614 | - "Invalid pivot data, undefined columns found: " . join(', ', $diff) |
|
614 | + "Invalid pivot data, undefined columns found: ".join(', ', $diff) |
|
615 | 615 | ); |
616 | 616 | } |
617 | 617 | } |