|
@@ -46,7 +46,7 @@ discard block |
|
|
block discarded – undo |
|
46
|
46
|
*/ |
|
47
|
47
|
public function __construct(string $targetTable, string $pivotTable, array $joinForeignKeys, array $joinLocalKeys, array $whereKeys, string $resultIteratorClass) |
|
48
|
48
|
{ |
|
49
|
|
- assert(is_a($resultIteratorClass, ResultIterator::class, true), new TDBMInvalidArgumentException('$resultIteratorClass should be a `'. ResultIterator::class. '`. `' . $resultIteratorClass . '` provided.')); |
|
|
49
|
+ assert(is_a($resultIteratorClass, ResultIterator::class, true), new TDBMInvalidArgumentException('$resultIteratorClass should be a `'.ResultIterator::class.'`. `'.$resultIteratorClass.'` provided.')); |
|
50
|
50
|
$this->targetTable = $targetTable; |
|
51
|
51
|
$this->pivotTable = $pivotTable; |
|
52
|
52
|
$this->joinForeignKeys = $joinForeignKeys; |
|
@@ -57,7 +57,7 @@ discard block |
|
|
block discarded – undo |
|
57
|
57
|
|
|
58
|
58
|
public static function generateModelKey(ForeignKeyConstraint $remoteFk, ForeignKeyConstraint $localFk): string |
|
59
|
59
|
{ |
|
60
|
|
- return $remoteFk->getLocalTableName() . "." . implode("__", $localFk->getUnquotedLocalColumns()); |
|
|
60
|
+ return $remoteFk->getLocalTableName().".".implode("__", $localFk->getUnquotedLocalColumns()); |
|
61
|
61
|
} |
|
62
|
62
|
|
|
63
|
63
|
public function getPivotName(): string |
|
@@ -91,7 +91,7 @@ discard block |
|
|
block discarded – undo |
|
91
|
91
|
); |
|
92
|
92
|
} |
|
93
|
93
|
|
|
94
|
|
- return $platform->quoteIdentifier($mainTable) . ' JOIN ' . $platform->quoteIdentifier($pivotTable) . ' ON ' . implode(' AND ', $join); |
|
|
94
|
+ return $platform->quoteIdentifier($mainTable).' JOIN '.$platform->quoteIdentifier($pivotTable).' ON '.implode(' AND ', $join); |
|
95
|
95
|
} |
|
96
|
96
|
|
|
97
|
97
|
/** |
|
@@ -116,7 +116,7 @@ discard block |
|
|
block discarded – undo |
|
116
|
116
|
{ |
|
117
|
117
|
$params = []; |
|
118
|
118
|
foreach ($primaryKeys as $key => $primaryKeyValue) { |
|
119
|
|
- $params['param' . $key] = $primaryKeyValue; |
|
|
119
|
+ $params['param'.$key] = $primaryKeyValue; |
|
120
|
120
|
} |
|
121
|
121
|
return $params; |
|
122
|
122
|
} |