@@ -154,8 +154,7 @@ discard block |
||
| 154 | 154 | $from = $match[3][0] === '-' ? count($words) - substr($match[3], 1) : $match[3]; |
| 155 | 155 | if (isset($words[$from])) { |
| 156 | 156 | return !isset($match[4]) ? |
| 157 | - $words[$from] : |
|
| 158 | - implode('_', array_slice($words, $from)); |
|
| 157 | + $words[$from] : implode('_', array_slice($words, $from)); |
|
| 159 | 158 | } |
| 160 | 159 | return ''; |
| 161 | 160 | }, static::getTableNameTemplate()); |
@@ -677,7 +676,7 @@ discard block |
||
| 677 | 676 | if (empty($associations)) { |
| 678 | 677 | $cols[] = $this->entityManager->escapeIdentifier($fkCol); |
| 679 | 678 | } |
| 680 | - $value = $entity->__get($hisVar); |
|
| 679 | + $value = $entity->__get($hisVar); |
|
| 681 | 680 | |
| 682 | 681 | if ($value === null) { |
| 683 | 682 | throw new IncompletePrimaryKey('Key incomplete to save foreign key'); |
@@ -723,7 +722,7 @@ discard block |
||
| 723 | 722 | $where = []; |
| 724 | 723 | |
| 725 | 724 | foreach ($myRelDef[self::OPT_RELATION_REFERENCE] as $myVar => $fkCol) { |
| 726 | - $value = $this->__get($myVar); |
|
| 725 | + $value = $this->__get($myVar); |
|
| 727 | 726 | |
| 728 | 727 | if ($value === null) { |
| 729 | 728 | throw new IncompletePrimaryKey('Key incomplete to save foreign key'); |
@@ -740,13 +739,13 @@ discard block |
||
| 740 | 739 | |
| 741 | 740 | $condition = []; |
| 742 | 741 | foreach ($oppRelDef[self::OPT_RELATION_REFERENCE] as $hisVar => $fkCol) { |
| 743 | - $value = $entity->__get($hisVar); |
|
| 742 | + $value = $entity->__get($hisVar); |
|
| 744 | 743 | |
| 745 | 744 | if ($value === null) { |
| 746 | 745 | throw new IncompletePrimaryKey('Key incomplete to save foreign key'); |
| 747 | 746 | } |
| 748 | 747 | |
| 749 | - $condition[] = $this->entityManager->escapeIdentifier($fkCol) .' = ' . |
|
| 748 | + $condition[] = $this->entityManager->escapeIdentifier($fkCol) . ' = ' . |
|
| 750 | 749 | $this->entityManager->escapeValue($value); |
| 751 | 750 | } |
| 752 | 751 | $where[] = implode(' AND ', $condition); |
@@ -900,8 +899,7 @@ discard block |
||
| 900 | 899 | } |
| 901 | 900 | |
| 902 | 901 | $reference = !isset($myRelDef[self::OPT_RELATION_TABLE]) ? |
| 903 | - array_flip($oppRelDef[self::OPT_RELATION_REFERENCE]) : |
|
| 904 | - $myRelDef[self::OPT_RELATION_REFERENCE]; |
|
| 902 | + array_flip($oppRelDef[self::OPT_RELATION_REFERENCE]) : $myRelDef[self::OPT_RELATION_REFERENCE]; |
|
| 905 | 903 | $foreignKey = $this->getForeignKey($reference); |
| 906 | 904 | |
| 907 | 905 | if (!isset($myRelDef[self::OPT_RELATION_TABLE])) { |