@@ -12,7 +12,7 @@ |
||
| 12 | 12 | public static function fromClassAndAssociation(string $class, string $associationName) : self |
| 13 | 13 | { |
| 14 | 14 | return new self(sprintf( |
| 15 | - 'Cannot match on %s::%s with a non-object value. Matching objects by id is ' . |
|
| 15 | + 'Cannot match on %s::%s with a non-object value. Matching objects by id is '. |
|
| 16 | 16 | 'not compatible with matching on an in-memory collection, which compares objects by reference.', |
| 17 | 17 | $class, |
| 18 | 18 | $associationName |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | $this->currentPersisterContext->rsm->setDiscriminatorColumn('r', $resultColumnName); |
| 46 | 46 | $this->currentPersisterContext->rsm->addMetaResult('r', $resultColumnName, $discrColumnName, false, $discrColumnType); |
| 47 | 47 | |
| 48 | - $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias . '.' . $quotedColumnName, $this->platform); |
|
| 48 | + $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias.'.'.$quotedColumnName, $this->platform); |
|
| 49 | 49 | |
| 50 | 50 | // Append subclass columns |
| 51 | 51 | foreach ($this->class->getSubClasses() as $subClassName) { |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | /** @var JoinColumnMetadata $joinColumn */ |
| 70 | 70 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 71 | 71 | |
| 72 | - if (! $joinColumn->getType()) { |
|
| 72 | + if ( ! $joinColumn->getType()) { |
|
| 73 | 73 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
| 74 | 74 | } |
| 75 | 75 | |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | $conditionSql .= ' AND '; |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | - return $conditionSql . $this->getSelectConditionDiscriminatorValueSQL(); |
|
| 126 | + return $conditionSql.$this->getSelectConditionDiscriminatorValueSQL(); |
|
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | /** |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | $conditionSql .= ' AND '; |
| 138 | 138 | } |
| 139 | 139 | |
| 140 | - return $conditionSql . $this->getSelectConditionDiscriminatorValueSQL(); |
|
| 140 | + return $conditionSql.$this->getSelectConditionDiscriminatorValueSQL(); |
|
| 141 | 141 | } |
| 142 | 142 | |
| 143 | 143 | /** |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | |
| 165 | 165 | return sprintf( |
| 166 | 166 | '%s IN (%s)', |
| 167 | - $discrColumnType->convertToDatabaseValueSQL($tableAlias . '.' . $quotedColumnName, $this->platform), |
|
| 167 | + $discrColumnType->convertToDatabaseValueSQL($tableAlias.'.'.$quotedColumnName, $this->platform), |
|
| 168 | 168 | implode(', ', $values) |
| 169 | 169 | ); |
| 170 | 170 | } |
@@ -56,6 +56,6 @@ |
||
| 56 | 56 | $columnType |
| 57 | 57 | ); |
| 58 | 58 | |
| 59 | - return $columnType->convertToPHPValueSQL($sql, $this->platform) . ' AS ' . $columnAlias; |
|
| 59 | + return $columnType->convertToPHPValueSQL($sql, $this->platform).' AS '.$columnAlias; |
|
| 60 | 60 | } |
| 61 | 61 | } |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | foreach ($data as $columnName => $value) { |
| 112 | - if (! is_array($id) || ! isset($id[$columnName])) { |
|
| 112 | + if ( ! is_array($id) || ! isset($id[$columnName])) { |
|
| 113 | 113 | $type = $this->columns[$columnName]->getType(); |
| 114 | 114 | |
| 115 | 115 | $stmt->bindValue($paramIndex++, $value, $type); |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | { |
| 134 | 134 | $updateData = $this->prepareUpdateData($entity); |
| 135 | 135 | |
| 136 | - if (! $updateData) { |
|
| 136 | + if ( ! $updateData) { |
|
| 137 | 137 | return; |
| 138 | 138 | } |
| 139 | 139 | |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | $versionedClass = $this->class->versionProperty->getDeclaringClass(); |
| 152 | 152 | $versionedTable = $versionedClass->getTableName(); |
| 153 | 153 | |
| 154 | - if (! isset($updateData[$versionedTable])) { |
|
| 154 | + if ( ! isset($updateData[$versionedTable])) { |
|
| 155 | 155 | $tableName = $versionedClass->table->getQuotedQualifiedName($this->platform); |
| 156 | 156 | |
| 157 | 157 | $this->updateTable($entity, $tableName, [], true); |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | |
| 233 | 233 | if ($filterSql) { |
| 234 | 234 | $conditionSql .= $conditionSql |
| 235 | - ? ' AND ' . $filterSql |
|
| 235 | + ? ' AND '.$filterSql |
|
| 236 | 236 | : $filterSql; |
| 237 | 237 | } |
| 238 | 238 | |
@@ -240,26 +240,26 @@ discard block |
||
| 240 | 240 | |
| 241 | 241 | switch ($lockMode) { |
| 242 | 242 | case LockMode::PESSIMISTIC_READ: |
| 243 | - $lockSql = ' ' . $this->platform->getReadLockSQL(); |
|
| 243 | + $lockSql = ' '.$this->platform->getReadLockSQL(); |
|
| 244 | 244 | break; |
| 245 | 245 | |
| 246 | 246 | case LockMode::PESSIMISTIC_WRITE: |
| 247 | - $lockSql = ' ' . $this->platform->getWriteLockSQL(); |
|
| 247 | + $lockSql = ' '.$this->platform->getWriteLockSQL(); |
|
| 248 | 248 | break; |
| 249 | 249 | } |
| 250 | 250 | |
| 251 | 251 | $tableName = $this->class->table->getQuotedQualifiedName($this->platform); |
| 252 | - $from = ' FROM ' . $tableName . ' ' . $baseTableAlias; |
|
| 253 | - $where = $conditionSql !== '' ? ' WHERE ' . $conditionSql : ''; |
|
| 252 | + $from = ' FROM '.$tableName.' '.$baseTableAlias; |
|
| 253 | + $where = $conditionSql !== '' ? ' WHERE '.$conditionSql : ''; |
|
| 254 | 254 | $lock = $this->platform->appendLockHint($from, $lockMode); |
| 255 | 255 | $columnList = $this->getSelectColumnsSQL(); |
| 256 | - $query = 'SELECT ' . $columnList |
|
| 256 | + $query = 'SELECT '.$columnList |
|
| 257 | 257 | . $lock |
| 258 | 258 | . $joinSql |
| 259 | 259 | . $where |
| 260 | 260 | . $orderBySql; |
| 261 | 261 | |
| 262 | - return $this->platform->modifyLimitQuery($query, $limit, $offset) . $lockSql; |
|
| 262 | + return $this->platform->modifyLimitQuery($query, $limit, $offset).$lockSql; |
|
| 263 | 263 | } |
| 264 | 264 | |
| 265 | 265 | /** |
@@ -281,14 +281,14 @@ discard block |
||
| 281 | 281 | |
| 282 | 282 | if ($filterSql !== '') { |
| 283 | 283 | $conditionSql = $conditionSql |
| 284 | - ? $conditionSql . ' AND ' . $filterSql |
|
| 284 | + ? $conditionSql.' AND '.$filterSql |
|
| 285 | 285 | : $filterSql; |
| 286 | 286 | } |
| 287 | 287 | |
| 288 | 288 | $sql = 'SELECT COUNT(*) ' |
| 289 | - . 'FROM ' . $tableName . ' ' . $baseTableAlias |
|
| 289 | + . 'FROM '.$tableName.' '.$baseTableAlias |
|
| 290 | 290 | . $joinSql |
| 291 | - . (empty($conditionSql) ? '' : ' WHERE ' . $conditionSql); |
|
| 291 | + . (empty($conditionSql) ? '' : ' WHERE '.$conditionSql); |
|
| 292 | 292 | |
| 293 | 293 | return $sql; |
| 294 | 294 | } |
@@ -309,18 +309,18 @@ discard block |
||
| 309 | 309 | $conditions = []; |
| 310 | 310 | $tableName = $parentClass->table->getQuotedQualifiedName($this->platform); |
| 311 | 311 | $tableAlias = $this->getSQLTableAlias($parentClass->getTableName()); |
| 312 | - $joinSql .= ' INNER JOIN ' . $tableName . ' ' . $tableAlias . ' ON '; |
|
| 312 | + $joinSql .= ' INNER JOIN '.$tableName.' '.$tableAlias.' ON '; |
|
| 313 | 313 | |
| 314 | 314 | foreach ($identifierColumns as $idColumn) { |
| 315 | 315 | $quotedColumnName = $this->platform->quoteIdentifier($idColumn->getColumnName()); |
| 316 | 316 | |
| 317 | - $conditions[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName; |
|
| 317 | + $conditions[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName; |
|
| 318 | 318 | } |
| 319 | 319 | |
| 320 | 320 | $joinSql .= implode(' AND ', $conditions); |
| 321 | 321 | } |
| 322 | 322 | |
| 323 | - return parent::getLockTablesSql($lockMode) . $joinSql; |
|
| 323 | + return parent::getLockTablesSql($lockMode).$joinSql; |
|
| 324 | 324 | } |
| 325 | 325 | |
| 326 | 326 | /** |
@@ -347,7 +347,7 @@ discard block |
||
| 347 | 347 | continue; |
| 348 | 348 | } |
| 349 | 349 | |
| 350 | - if (! ($property instanceof ToOneAssociationMetadata) || ! $property->isOwningSide()) { |
|
| 350 | + if ( ! ($property instanceof ToOneAssociationMetadata) || ! $property->isOwningSide()) { |
|
| 351 | 351 | continue; |
| 352 | 352 | } |
| 353 | 353 | |
@@ -357,7 +357,7 @@ discard block |
||
| 357 | 357 | /** @var JoinColumnMetadata $joinColumn */ |
| 358 | 358 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 359 | 359 | |
| 360 | - if (! $joinColumn->getType()) { |
|
| 360 | + if ( ! $joinColumn->getType()) { |
|
| 361 | 361 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
| 362 | 362 | } |
| 363 | 363 | |
@@ -376,7 +376,7 @@ discard block |
||
| 376 | 376 | $this->currentPersisterContext->rsm->setDiscriminatorColumn('r', $resultColumnName); |
| 377 | 377 | $this->currentPersisterContext->rsm->addMetaResult('r', $resultColumnName, $discrColumnName, false, $discrColumnType); |
| 378 | 378 | |
| 379 | - $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias . '.' . $quotedColumnName, $this->platform); |
|
| 379 | + $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias.'.'.$quotedColumnName, $this->platform); |
|
| 380 | 380 | |
| 381 | 381 | // sub tables |
| 382 | 382 | foreach ($this->class->getSubClasses() as $subClassName) { |
@@ -400,7 +400,7 @@ discard block |
||
| 400 | 400 | /** @var JoinColumnMetadata $joinColumn */ |
| 401 | 401 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 402 | 402 | |
| 403 | - if (! $joinColumn->getType()) { |
|
| 403 | + if ( ! $joinColumn->getType()) { |
|
| 404 | 404 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
| 405 | 405 | } |
| 406 | 406 | |
@@ -450,7 +450,7 @@ discard block |
||
| 450 | 450 | $columnName = $joinColumn->getColumnName(); |
| 451 | 451 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 452 | 452 | |
| 453 | - if (! $joinColumn->getType()) { |
|
| 453 | + if ( ! $joinColumn->getType()) { |
|
| 454 | 454 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
| 455 | 455 | } |
| 456 | 456 | |
@@ -506,12 +506,12 @@ discard block |
||
| 506 | 506 | $conditions = []; |
| 507 | 507 | $tableName = $parentClass->table->getQuotedQualifiedName($this->platform); |
| 508 | 508 | $tableAlias = $this->getSQLTableAlias($parentClass->getTableName()); |
| 509 | - $joinSql .= ' INNER JOIN ' . $tableName . ' ' . $tableAlias . ' ON '; |
|
| 509 | + $joinSql .= ' INNER JOIN '.$tableName.' '.$tableAlias.' ON '; |
|
| 510 | 510 | |
| 511 | 511 | foreach ($identifierColumns as $idColumn) { |
| 512 | 512 | $quotedColumnName = $this->platform->quoteIdentifier($idColumn->getColumnName()); |
| 513 | 513 | |
| 514 | - $conditions[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName; |
|
| 514 | + $conditions[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName; |
|
| 515 | 515 | } |
| 516 | 516 | |
| 517 | 517 | $joinSql .= implode(' AND ', $conditions); |
@@ -523,12 +523,12 @@ discard block |
||
| 523 | 523 | $subClass = $this->em->getClassMetadata($subClassName); |
| 524 | 524 | $tableName = $subClass->table->getQuotedQualifiedName($this->platform); |
| 525 | 525 | $tableAlias = $this->getSQLTableAlias($subClass->getTableName()); |
| 526 | - $joinSql .= ' LEFT JOIN ' . $tableName . ' ' . $tableAlias . ' ON '; |
|
| 526 | + $joinSql .= ' LEFT JOIN '.$tableName.' '.$tableAlias.' ON '; |
|
| 527 | 527 | |
| 528 | 528 | foreach ($identifierColumns as $idColumn) { |
| 529 | 529 | $quotedColumnName = $this->platform->quoteIdentifier($idColumn->getColumnName()); |
| 530 | 530 | |
| 531 | - $conditions[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName; |
|
| 531 | + $conditions[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName; |
|
| 532 | 532 | } |
| 533 | 533 | |
| 534 | 534 | $joinSql .= implode(' AND ', $conditions); |
@@ -73,13 +73,13 @@ |
||
| 73 | 73 | |
| 74 | 74 | switch ($expr->getType()) { |
| 75 | 75 | case CompositeExpression::TYPE_AND: |
| 76 | - return '(' . implode(' AND ', $expressionList) . ')'; |
|
| 76 | + return '('.implode(' AND ', $expressionList).')'; |
|
| 77 | 77 | |
| 78 | 78 | case CompositeExpression::TYPE_OR: |
| 79 | - return '(' . implode(' OR ', $expressionList) . ')'; |
|
| 79 | + return '('.implode(' OR ', $expressionList).')'; |
|
| 80 | 80 | |
| 81 | 81 | default: |
| 82 | - throw new \RuntimeException('Unknown composite ' . $expr->getType()); |
|
| 82 | + throw new \RuntimeException('Unknown composite '.$expr->getType()); |
|
| 83 | 83 | } |
| 84 | 84 | } |
| 85 | 85 | |
@@ -79,13 +79,13 @@ |
||
| 79 | 79 | |
| 80 | 80 | switch ($comparison->getOperator()) { |
| 81 | 81 | case Comparison::CONTAINS: |
| 82 | - return '%' . $value . '%'; |
|
| 82 | + return '%'.$value.'%'; |
|
| 83 | 83 | |
| 84 | 84 | case Comparison::STARTS_WITH: |
| 85 | - return $value . '%'; |
|
| 85 | + return $value.'%'; |
|
| 86 | 86 | |
| 87 | 87 | case Comparison::ENDS_WITH: |
| 88 | - return '%' . $value; |
|
| 88 | + return '%'.$value; |
|
| 89 | 89 | |
| 90 | 90 | default: |
| 91 | 91 | return $value; |
@@ -10,6 +10,6 @@ |
||
| 10 | 10 | { |
| 11 | 11 | public static function fromClassNameAndField(string $className, string $field) : self |
| 12 | 12 | { |
| 13 | - return new self('Invalid order by orientation specified for ' . $className . '#' . $field); |
|
| 13 | + return new self('Invalid order by orientation specified for '.$className.'#'.$field); |
|
| 14 | 14 | } |
| 15 | 15 | } |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | { |
| 37 | 37 | $association = $collection->getMapping(); |
| 38 | 38 | |
| 39 | - if (! $association->isOwningSide()) { |
|
| 39 | + if ( ! $association->isOwningSide()) { |
|
| 40 | 40 | return; // ignore inverse side |
| 41 | 41 | } |
| 42 | 42 | |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | /** @var JoinColumnMetadata $joinColumn */ |
| 49 | 49 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 50 | 50 | |
| 51 | - if (! $joinColumn->getType()) { |
|
| 51 | + if ( ! $joinColumn->getType()) { |
|
| 52 | 52 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $class, $this->em)); |
| 53 | 53 | } |
| 54 | 54 | |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | { |
| 69 | 69 | $association = $collection->getMapping(); |
| 70 | 70 | |
| 71 | - if (! $association->isOwningSide()) { |
|
| 71 | + if ( ! $association->isOwningSide()) { |
|
| 72 | 72 | return; // ignore inverse side |
| 73 | 73 | } |
| 74 | 74 | |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | { |
| 100 | 100 | $association = $collection->getMapping(); |
| 101 | 101 | |
| 102 | - if (! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) { |
|
| 102 | + if ( ! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) { |
|
| 103 | 103 | throw new \BadMethodCallException('Selecting a collection by index is only supported on indexed collections.'); |
| 104 | 104 | } |
| 105 | 105 | |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
| 147 | 147 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 148 | 148 | |
| 149 | - if (! $joinColumn->getType()) { |
|
| 149 | + if ( ! $joinColumn->getType()) { |
|
| 150 | 150 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $sourceClass, $this->em)); |
| 151 | 151 | } |
| 152 | 152 | |
@@ -178,9 +178,9 @@ discard block |
||
| 178 | 178 | }*/ |
| 179 | 179 | |
| 180 | 180 | $sql = 'SELECT COUNT(*)' |
| 181 | - . ' FROM ' . $joinTableName . ' t' |
|
| 181 | + . ' FROM '.$joinTableName.' t' |
|
| 182 | 182 | . $joinTargetEntitySQL |
| 183 | - . ' WHERE ' . implode(' AND ', $conditions); |
|
| 183 | + . ' WHERE '.implode(' AND ', $conditions); |
|
| 184 | 184 | |
| 185 | 185 | return $this->conn->fetchColumn($sql, $params, 0, $types); |
| 186 | 186 | } |
@@ -202,13 +202,13 @@ discard block |
||
| 202 | 202 | { |
| 203 | 203 | $association = $collection->getMapping(); |
| 204 | 204 | |
| 205 | - if (! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) { |
|
| 205 | + if ( ! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) { |
|
| 206 | 206 | throw new \BadMethodCallException('Selecting a collection by index is only supported on indexed collections.'); |
| 207 | 207 | } |
| 208 | 208 | |
| 209 | 209 | list($quotedJoinTable, $whereClauses, $params, $types) = $this->getJoinTableRestrictionsWithKey($collection, $key, true); |
| 210 | 210 | |
| 211 | - $sql = 'SELECT 1 FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses); |
|
| 211 | + $sql = 'SELECT 1 FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses); |
|
| 212 | 212 | |
| 213 | 213 | return (bool) $this->conn->fetchColumn($sql, $params, 0, $types); |
| 214 | 214 | } |
@@ -218,13 +218,13 @@ discard block |
||
| 218 | 218 | */ |
| 219 | 219 | public function contains(PersistentCollection $collection, $element) |
| 220 | 220 | { |
| 221 | - if (! $this->isValidEntityState($element)) { |
|
| 221 | + if ( ! $this->isValidEntityState($element)) { |
|
| 222 | 222 | return false; |
| 223 | 223 | } |
| 224 | 224 | |
| 225 | 225 | list($quotedJoinTable, $whereClauses, $params, $types) = $this->getJoinTableRestrictions($collection, $element, true); |
| 226 | 226 | |
| 227 | - $sql = 'SELECT 1 FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses); |
|
| 227 | + $sql = 'SELECT 1 FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses); |
|
| 228 | 228 | |
| 229 | 229 | return (bool) $this->conn->fetchColumn($sql, $params, 0, $types); |
| 230 | 230 | } |
@@ -234,13 +234,13 @@ discard block |
||
| 234 | 234 | */ |
| 235 | 235 | public function removeElement(PersistentCollection $collection, $element) |
| 236 | 236 | { |
| 237 | - if (! $this->isValidEntityState($element)) { |
|
| 237 | + if ( ! $this->isValidEntityState($element)) { |
|
| 238 | 238 | return false; |
| 239 | 239 | } |
| 240 | 240 | |
| 241 | 241 | list($quotedJoinTable, $whereClauses, $params, $types) = $this->getJoinTableRestrictions($collection, $element, false); |
| 242 | 242 | |
| 243 | - $sql = 'DELETE FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses); |
|
| 243 | + $sql = 'DELETE FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses); |
|
| 244 | 244 | |
| 245 | 245 | return (bool) $this->conn->executeUpdate($sql, $params, $types); |
| 246 | 246 | } |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | $onConditions = $this->getOnConditionSQL($association); |
| 259 | 259 | $whereClauses = $params = $types = []; |
| 260 | 260 | |
| 261 | - if (! $association->isOwningSide()) { |
|
| 261 | + if ( ! $association->isOwningSide()) { |
|
| 262 | 262 | $association = $targetClass->getProperty($association->getMappedBy()); |
| 263 | 263 | $joinColumns = $association->getJoinTable()->getInverseJoinColumns(); |
| 264 | 264 | } else { |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
| 271 | 271 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 272 | 272 | |
| 273 | - if (! $joinColumn->getType()) { |
|
| 273 | + if ( ! $joinColumn->getType()) { |
|
| 274 | 274 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $ownerMetadata, $this->em)); |
| 275 | 275 | } |
| 276 | 276 | |
@@ -298,11 +298,11 @@ discard block |
||
| 298 | 298 | |
| 299 | 299 | $resultSetMapping->addRootEntityFromClassMetadata($targetClass->getClassName(), 'te'); |
| 300 | 300 | |
| 301 | - $sql = 'SELECT ' . $resultSetMapping->generateSelectClause() |
|
| 302 | - . ' FROM ' . $tableName . ' te' |
|
| 303 | - . ' JOIN ' . $joinTableName . ' t ON' |
|
| 301 | + $sql = 'SELECT '.$resultSetMapping->generateSelectClause() |
|
| 302 | + . ' FROM '.$tableName.' te' |
|
| 303 | + . ' JOIN '.$joinTableName.' t ON' |
|
| 304 | 304 | . implode(' AND ', $onConditions) |
| 305 | - . ' WHERE ' . implode(' AND ', $whereClauses); |
|
| 305 | + . ' WHERE '.implode(' AND ', $whereClauses); |
|
| 306 | 306 | |
| 307 | 307 | $sql .= $this->getOrderingSql($criteria, $targetClass); |
| 308 | 308 | $sql .= $this->getLimitSql($criteria); |
@@ -337,8 +337,8 @@ discard block |
||
| 337 | 337 | |
| 338 | 338 | // A join is needed if there is filtering on the target entity |
| 339 | 339 | $tableName = $rootClass->table->getQuotedQualifiedName($this->platform); |
| 340 | - $joinSql = ' JOIN ' . $tableName . ' te' |
|
| 341 | - . ' ON' . implode(' AND ', $this->getOnConditionSQL($association)); |
|
| 340 | + $joinSql = ' JOIN '.$tableName.' te' |
|
| 341 | + . ' ON'.implode(' AND ', $this->getOnConditionSQL($association)); |
|
| 342 | 342 | |
| 343 | 343 | return [$joinSql, $filterSql]; |
| 344 | 344 | } |
@@ -359,18 +359,18 @@ discard block |
||
| 359 | 359 | $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias); |
| 360 | 360 | |
| 361 | 361 | if ($filterExpr) { |
| 362 | - $filterClauses[] = '(' . $filterExpr . ')'; |
|
| 362 | + $filterClauses[] = '('.$filterExpr.')'; |
|
| 363 | 363 | } |
| 364 | 364 | } |
| 365 | 365 | |
| 366 | - if (! $filterClauses) { |
|
| 366 | + if ( ! $filterClauses) { |
|
| 367 | 367 | return ''; |
| 368 | 368 | } |
| 369 | 369 | |
| 370 | 370 | $filterSql = implode(' AND ', $filterClauses); |
| 371 | 371 | |
| 372 | 372 | return isset($filterClauses[1]) |
| 373 | - ? '(' . $filterSql . ')' |
|
| 373 | + ? '('.$filterSql.')' |
|
| 374 | 374 | : $filterSql |
| 375 | 375 | ; |
| 376 | 376 | } |
@@ -399,7 +399,7 @@ discard block |
||
| 399 | 399 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
| 400 | 400 | $quotedReferencedColumnName = $this->platform->quoteIdentifier($joinColumn->getReferencedColumnName()); |
| 401 | 401 | |
| 402 | - $conditions[] = ' t.' . $quotedColumnName . ' = te.' . $quotedReferencedColumnName; |
|
| 402 | + $conditions[] = ' t.'.$quotedColumnName.' = te.'.$quotedReferencedColumnName; |
|
| 403 | 403 | } |
| 404 | 404 | |
| 405 | 405 | return $conditions; |
@@ -421,7 +421,7 @@ discard block |
||
| 421 | 421 | $columns[] = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
| 422 | 422 | } |
| 423 | 423 | |
| 424 | - return 'DELETE FROM ' . $joinTableName . ' WHERE ' . implode(' = ? AND ', $columns) . ' = ?'; |
|
| 424 | + return 'DELETE FROM '.$joinTableName.' WHERE '.implode(' = ? AND ', $columns).' = ?'; |
|
| 425 | 425 | } |
| 426 | 426 | |
| 427 | 427 | /** |
@@ -476,7 +476,7 @@ discard block |
||
| 476 | 476 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
| 477 | 477 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 478 | 478 | |
| 479 | - if (! $joinColumn->getType()) { |
|
| 479 | + if ( ! $joinColumn->getType()) { |
|
| 480 | 480 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $class, $this->em)); |
| 481 | 481 | } |
| 482 | 482 | |
@@ -489,7 +489,7 @@ discard block |
||
| 489 | 489 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
| 490 | 490 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 491 | 491 | |
| 492 | - if (! $joinColumn->getType()) { |
|
| 492 | + if ( ! $joinColumn->getType()) { |
|
| 493 | 493 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
| 494 | 494 | } |
| 495 | 495 | |
@@ -540,7 +540,7 @@ discard block |
||
| 540 | 540 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
| 541 | 541 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 542 | 542 | |
| 543 | - if (! $joinColumn->getType()) { |
|
| 543 | + if ( ! $joinColumn->getType()) { |
|
| 544 | 544 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $class, $this->em)); |
| 545 | 545 | } |
| 546 | 546 | |
@@ -553,7 +553,7 @@ discard block |
||
| 553 | 553 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
| 554 | 554 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 555 | 555 | |
| 556 | - if (! $joinColumn->getType()) { |
|
| 556 | + if ( ! $joinColumn->getType()) { |
|
| 557 | 557 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
| 558 | 558 | } |
| 559 | 559 | |
@@ -637,7 +637,7 @@ discard block |
||
| 637 | 637 | $sourceClass = $this->em->getClassMetadata($owningAssociation->getSourceEntity()); |
| 638 | 638 | $targetClass = $this->em->getClassMetadata($owningAssociation->getTargetEntity()); |
| 639 | 639 | |
| 640 | - if (! $owningAssociation->isOwningSide()) { |
|
| 640 | + if ( ! $owningAssociation->isOwningSide()) { |
|
| 641 | 641 | $owningAssociation = $targetClass->getProperty($owningAssociation->getMappedBy()); |
| 642 | 642 | $joinTable = $owningAssociation->getJoinTable(); |
| 643 | 643 | $joinColumns = $joinTable->getJoinColumns(); |
@@ -649,7 +649,7 @@ discard block |
||
| 649 | 649 | } |
| 650 | 650 | |
| 651 | 651 | $joinTableName = $joinTable->getQuotedQualifiedName($this->platform); |
| 652 | - $quotedJoinTable = $joinTableName . ' t'; |
|
| 652 | + $quotedJoinTable = $joinTableName.' t'; |
|
| 653 | 653 | $whereClauses = []; |
| 654 | 654 | $params = []; |
| 655 | 655 | $types = []; |
@@ -663,11 +663,11 @@ discard block |
||
| 663 | 663 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
| 664 | 664 | $quotedReferencedColumnName = $this->platform->quoteIdentifier($joinColumn->getReferencedColumnName()); |
| 665 | 665 | |
| 666 | - $joinConditions[] = ' t.' . $quotedColumnName . ' = tr.' . $quotedReferencedColumnName; |
|
| 666 | + $joinConditions[] = ' t.'.$quotedColumnName.' = tr.'.$quotedReferencedColumnName; |
|
| 667 | 667 | } |
| 668 | 668 | |
| 669 | 669 | $tableName = $targetClass->table->getQuotedQualifiedName($this->platform); |
| 670 | - $quotedJoinTable .= ' JOIN ' . $tableName . ' tr ON ' . implode(' AND ', $joinConditions); |
|
| 670 | + $quotedJoinTable .= ' JOIN '.$tableName.' tr ON '.implode(' AND ', $joinConditions); |
|
| 671 | 671 | $indexByProperty = $targetClass->getProperty($indexBy); |
| 672 | 672 | |
| 673 | 673 | switch (true) { |
@@ -690,7 +690,7 @@ discard block |
||
| 690 | 690 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
| 691 | 691 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 692 | 692 | |
| 693 | - if (! $joinColumn->getType()) { |
|
| 693 | + if ( ! $joinColumn->getType()) { |
|
| 694 | 694 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $sourceClass, $this->em)); |
| 695 | 695 | } |
| 696 | 696 | |
@@ -699,13 +699,13 @@ discard block |
||
| 699 | 699 | $types[] = $joinColumn->getType(); |
| 700 | 700 | } |
| 701 | 701 | |
| 702 | - if (! $joinNeeded) { |
|
| 702 | + if ( ! $joinNeeded) { |
|
| 703 | 703 | foreach ($joinColumns as $joinColumn) { |
| 704 | 704 | /** @var JoinColumnMetadata $joinColumn */ |
| 705 | 705 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
| 706 | 706 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 707 | 707 | |
| 708 | - if (! $joinColumn->getType()) { |
|
| 708 | + if ( ! $joinColumn->getType()) { |
|
| 709 | 709 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
| 710 | 710 | } |
| 711 | 711 | |
@@ -719,7 +719,7 @@ discard block |
||
| 719 | 719 | list($joinTargetEntitySQL, $filterSql) = $this->getFilterSql($association); |
| 720 | 720 | |
| 721 | 721 | if ($filterSql) { |
| 722 | - $quotedJoinTable .= ' ' . $joinTargetEntitySQL; |
|
| 722 | + $quotedJoinTable .= ' '.$joinTargetEntitySQL; |
|
| 723 | 723 | $whereClauses[] = $filterSql; |
| 724 | 724 | } |
| 725 | 725 | } |
@@ -742,7 +742,7 @@ discard block |
||
| 742 | 742 | $association = $collection->getMapping(); |
| 743 | 743 | $owningAssociation = $association; |
| 744 | 744 | |
| 745 | - if (! $association->isOwningSide()) { |
|
| 745 | + if ( ! $association->isOwningSide()) { |
|
| 746 | 746 | $sourceClass = $this->em->getClassMetadata($association->getTargetEntity()); |
| 747 | 747 | $targetClass = $this->em->getClassMetadata($association->getSourceEntity()); |
| 748 | 748 | $sourceIdentifier = $this->uow->getEntityIdentifier($element); |
@@ -768,11 +768,11 @@ discard block |
||
| 768 | 768 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
| 769 | 769 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 770 | 770 | |
| 771 | - if (! $joinColumn->getType()) { |
|
| 771 | + if ( ! $joinColumn->getType()) { |
|
| 772 | 772 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $sourceClass, $this->em)); |
| 773 | 773 | } |
| 774 | 774 | |
| 775 | - $whereClauses[] = ($addFilters ? 't.' : '') . $quotedColumnName . ' = ?'; |
|
| 775 | + $whereClauses[] = ($addFilters ? 't.' : '').$quotedColumnName.' = ?'; |
|
| 776 | 776 | $params[] = $sourceIdentifier[$sourceClass->fieldNames[$referencedColumnName]]; |
| 777 | 777 | $types[] = $joinColumn->getType(); |
| 778 | 778 | } |
@@ -782,11 +782,11 @@ discard block |
||
| 782 | 782 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
| 783 | 783 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 784 | 784 | |
| 785 | - if (! $joinColumn->getType()) { |
|
| 785 | + if ( ! $joinColumn->getType()) { |
|
| 786 | 786 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
| 787 | 787 | } |
| 788 | 788 | |
| 789 | - $whereClauses[] = ($addFilters ? 't.' : '') . $quotedColumnName . ' = ?'; |
|
| 789 | + $whereClauses[] = ($addFilters ? 't.' : '').$quotedColumnName.' = ?'; |
|
| 790 | 790 | $params[] = $targetIdentifier[$targetClass->fieldNames[$referencedColumnName]]; |
| 791 | 791 | $types[] = $joinColumn->getType(); |
| 792 | 792 | } |
@@ -797,7 +797,7 @@ discard block |
||
| 797 | 797 | list($joinTargetEntitySQL, $filterSql) = $this->getFilterSql($association); |
| 798 | 798 | |
| 799 | 799 | if ($filterSql) { |
| 800 | - $quotedJoinTable .= ' ' . $joinTargetEntitySQL; |
|
| 800 | + $quotedJoinTable .= ' '.$joinTargetEntitySQL; |
|
| 801 | 801 | $whereClauses[] = $filterSql; |
| 802 | 802 | } |
| 803 | 803 | } |
@@ -842,10 +842,10 @@ discard block |
||
| 842 | 842 | $property = $targetClass->getProperty($name); |
| 843 | 843 | $columnName = $this->platform->quoteIdentifier($property->getColumnName()); |
| 844 | 844 | |
| 845 | - $orderBy[] = $columnName . ' ' . $direction; |
|
| 845 | + $orderBy[] = $columnName.' '.$direction; |
|
| 846 | 846 | } |
| 847 | 847 | |
| 848 | - return ' ORDER BY ' . implode(', ', $orderBy); |
|
| 848 | + return ' ORDER BY '.implode(', ', $orderBy); |
|
| 849 | 849 | } |
| 850 | 850 | return ''; |
| 851 | 851 | } |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | 'u__status' => 'developer', |
| 64 | 64 | 'u__username' => 'jwage', |
| 65 | 65 | 'u__name' => 'Jonathan', |
| 66 | - 'sclr0' => 'JWAGE' . $i, |
|
| 66 | + 'sclr0' => 'JWAGE'.$i, |
|
| 67 | 67 | 'p__phonenumber' => '91', |
| 68 | 68 | ]; |
| 69 | 69 | } |