Skip to content

Commit 0c3bce4

Browse files
committed
PSR2 fixes
1 parent 7351c05 commit 0c3bce4

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

src/Utils/ManyToManyRelationshipPathDescriptor.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace TheCodingMachine\TDBM\Utils;
44

5-
65
use Doctrine\DBAL\Schema\ForeignKeyConstraint;
76
use function var_export;
87

@@ -73,7 +72,6 @@ public function getPivotFrom(): string
7372
}
7473

7574
return $mainTable.' JOIN '.$pivotTable.' pivot ON '.implode(' AND ', $join);
76-
7775
}
7876

7977
public function getPivotWhere(): string
@@ -83,7 +81,6 @@ public function getPivotWhere(): string
8381
$paramList[] = ' pivot.'.$column." = :param$key";
8482
}
8583
return implode(" AND ", $paramList);
86-
8784
}
8885

8986
/**
@@ -97,7 +94,5 @@ public function getPivotParams(array $primaryKeys): array
9794
$params["param$key"] = $primaryKeyValue;
9895
}
9996
return $params;
100-
10197
}
102-
103-
}
98+
}

src/Utils/PivotTableMethodsDescriptor.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@ public function getBeanClassName(): string
113113
*/
114114
private function getPluralName() : string
115115
{
116-
if($this->isAutoPivot()) {
117-
$name = $this->remoteFk->getForeignTableName().'By_'.$this->pivotTable->getName().'Via_'.implode('And_',$this->localFk->getUnquotedLocalColumns());
118-
} else if (!$this->useAlternateName) {
116+
if ($this->isAutoPivot()) {
117+
$name = $this->remoteFk->getForeignTableName().'By_'.$this->pivotTable->getName().'Via_'.implode('And_', $this->localFk->getUnquotedLocalColumns());
118+
} elseif (!$this->useAlternateName) {
119119
$name = $this->remoteFk->getForeignTableName();
120120
} else {
121121
$name = $this->remoteFk->getForeignTableName().'By_'.$this->pivotTable->getName();
@@ -130,9 +130,9 @@ private function getPluralName() : string
130130
*/
131131
private function getSingularName() : string
132132
{
133-
if($this->isAutoPivot()) {
134-
$name = TDBMDaoGenerator::toSingular($this->remoteFk->getForeignTableName()).'By_'.$this->pivotTable->getName().'Via_'.implode('And_',$this->localFk->getUnquotedLocalColumns());
135-
} else if (!$this->useAlternateName) {
133+
if ($this->isAutoPivot()) {
134+
$name = TDBMDaoGenerator::toSingular($this->remoteFk->getForeignTableName()).'By_'.$this->pivotTable->getName().'Via_'.implode('And_', $this->localFk->getUnquotedLocalColumns());
135+
} elseif (!$this->useAlternateName) {
136136
$name = TDBMDaoGenerator::toSingular($this->remoteFk->getForeignTableName());
137137
} else {
138138
$name = TDBMDaoGenerator::toSingular($this->remoteFk->getForeignTableName()).'By_'.$this->pivotTable->getName();

0 commit comments

Comments
 (0)