@@ -220,11 +220,11 @@ discard block |
||
| 220 | 220 | $this->setCache(clone $parent->cache); |
| 221 | 221 | } |
| 222 | 222 | |
| 223 | - if (! empty($parent->lifecycleCallbacks)) { |
|
| 223 | + if ( ! empty($parent->lifecycleCallbacks)) { |
|
| 224 | 224 | $this->lifecycleCallbacks = $parent->lifecycleCallbacks; |
| 225 | 225 | } |
| 226 | 226 | |
| 227 | - if (! empty($parent->entityListeners)) { |
|
| 227 | + if ( ! empty($parent->entityListeners)) { |
|
| 228 | 228 | $this->entityListeners = $parent->entityListeners; |
| 229 | 229 | } |
| 230 | 230 | } |
@@ -265,7 +265,7 @@ discard block |
||
| 265 | 265 | { |
| 266 | 266 | $rootClass = $parentClass = $this; |
| 267 | 267 | while (($parentClass = $parentClass->getParent()) !== null) { |
| 268 | - if (! $parentClass->isMappedSuperclass) { |
|
| 268 | + if ( ! $parentClass->isMappedSuperclass) { |
|
| 269 | 269 | $rootClass = $parentClass; |
| 270 | 270 | } |
| 271 | 271 | } |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | */ |
| 296 | 296 | public function __toString() |
| 297 | 297 | { |
| 298 | - return self::class . '@' . spl_object_id($this); |
|
| 298 | + return self::class.'@'.spl_object_id($this); |
|
| 299 | 299 | } |
| 300 | 300 | |
| 301 | 301 | /** |
@@ -391,11 +391,11 @@ discard block |
||
| 391 | 391 | */ |
| 392 | 392 | public function isIdentifier(string $fieldName) : bool |
| 393 | 393 | { |
| 394 | - if (! $this->identifier) { |
|
| 394 | + if ( ! $this->identifier) { |
|
| 395 | 395 | return false; |
| 396 | 396 | } |
| 397 | 397 | |
| 398 | - if (! $this->isIdentifierComposite()) { |
|
| 398 | + if ( ! $this->isIdentifierComposite()) { |
|
| 399 | 399 | return $fieldName === $this->identifier[0]; |
| 400 | 400 | } |
| 401 | 401 | |
@@ -419,11 +419,11 @@ discard block |
||
| 419 | 419 | } |
| 420 | 420 | |
| 421 | 421 | // Verify & complete identifier mapping |
| 422 | - if (! $this->identifier) { |
|
| 422 | + if ( ! $this->identifier) { |
|
| 423 | 423 | throw MappingException::identifierRequired($this->className); |
| 424 | 424 | } |
| 425 | 425 | |
| 426 | - $explicitlyGeneratedProperties = array_filter($this->properties, static function (Property $property) : bool { |
|
| 426 | + $explicitlyGeneratedProperties = array_filter($this->properties, static function(Property $property) : bool { |
|
| 427 | 427 | return $property instanceof FieldMetadata |
| 428 | 428 | && $property->isPrimaryKey() |
| 429 | 429 | && $property->hasValueGenerator(); |
@@ -444,7 +444,7 @@ discard block |
||
| 444 | 444 | foreach ($this->lifecycleCallbacks as $callbacks) { |
| 445 | 445 | /** @var array $callbacks */ |
| 446 | 446 | foreach ($callbacks as $callbackFuncName) { |
| 447 | - if (! $reflectionService->hasPublicMethod($this->className, $callbackFuncName)) { |
|
| 447 | + if ( ! $reflectionService->hasPublicMethod($this->className, $callbackFuncName)) { |
|
| 448 | 448 | throw MappingException::lifecycleCallbackMethodNotFound($this->className, $callbackFuncName); |
| 449 | 449 | } |
| 450 | 450 | } |
@@ -473,7 +473,7 @@ discard block |
||
| 473 | 473 | throw MappingException::singleIdNotAllowedOnCompositePrimaryKey($this->className); |
| 474 | 474 | } |
| 475 | 475 | |
| 476 | - if (! isset($this->identifier[0])) { |
|
| 476 | + if ( ! isset($this->identifier[0])) { |
|
| 477 | 477 | throw MappingException::noIdDefined($this->className); |
| 478 | 478 | } |
| 479 | 479 | |
@@ -532,7 +532,7 @@ discard block |
||
| 532 | 532 | // Association defined as Id field |
| 533 | 533 | $targetClass = $em->getClassMetadata($property->getTargetEntity()); |
| 534 | 534 | |
| 535 | - if (! $property->isOwningSide()) { |
|
| 535 | + if ( ! $property->isOwningSide()) { |
|
| 536 | 536 | $property = $targetClass->getProperty($property->getMappedBy()); |
| 537 | 537 | $targetClass = $em->getClassMetadata($property->getTargetEntity()); |
| 538 | 538 | } |
@@ -546,7 +546,7 @@ discard block |
||
| 546 | 546 | $columnName = $joinColumn->getColumnName(); |
| 547 | 547 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 548 | 548 | |
| 549 | - if (! $joinColumn->getType()) { |
|
| 549 | + if ( ! $joinColumn->getType()) { |
|
| 550 | 550 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $em)); |
| 551 | 551 | } |
| 552 | 552 | |
@@ -580,10 +580,10 @@ discard block |
||
| 580 | 580 | { |
| 581 | 581 | $schema = $this->getSchemaName() === null |
| 582 | 582 | ? '' |
| 583 | - : $this->getSchemaName() . '_'; |
|
| 583 | + : $this->getSchemaName().'_'; |
|
| 584 | 584 | |
| 585 | 585 | // replace dots with underscores because PostgreSQL creates temporary tables in a special schema |
| 586 | - return $schema . $this->getTableName() . '_id_tmp'; |
|
| 586 | + return $schema.$this->getTableName().'_id_tmp'; |
|
| 587 | 587 | } |
| 588 | 588 | |
| 589 | 589 | /** |
@@ -617,7 +617,7 @@ discard block |
||
| 617 | 617 | */ |
| 618 | 618 | public function setInheritanceType($type) : void |
| 619 | 619 | { |
| 620 | - if (! $this->isInheritanceType($type)) { |
|
| 620 | + if ( ! $this->isInheritanceType($type)) { |
|
| 621 | 621 | throw MappingException::invalidInheritanceType($this->className, $type); |
| 622 | 622 | } |
| 623 | 623 | |
@@ -635,7 +635,7 @@ discard block |
||
| 635 | 635 | { |
| 636 | 636 | $fieldName = $property->getName(); |
| 637 | 637 | |
| 638 | - if (! isset($this->properties[$fieldName])) { |
|
| 638 | + if ( ! isset($this->properties[$fieldName])) { |
|
| 639 | 639 | throw MappingException::invalidOverrideFieldName($this->className, $fieldName); |
| 640 | 640 | } |
| 641 | 641 | |
@@ -721,13 +721,13 @@ discard block |
||
| 721 | 721 | $declaringClass = $this->properties[$fieldName]->getDeclaringClass(); |
| 722 | 722 | if ($declaringClass === $this) { |
| 723 | 723 | return false; |
| 724 | - } else if (! $declaringClass->isMappedSuperclass) { |
|
| 724 | + } else if ( ! $declaringClass->isMappedSuperclass) { |
|
| 725 | 725 | return true; |
| 726 | 726 | } |
| 727 | 727 | |
| 728 | 728 | $parentClass = $this; |
| 729 | 729 | while (($parentClass = $parentClass->getParent()) !== $declaringClass) { |
| 730 | - if (! $parentClass->isMappedSuperclass) { |
|
| 730 | + if ( ! $parentClass->isMappedSuperclass) { |
|
| 731 | 731 | return true; |
| 732 | 732 | } |
| 733 | 733 | } |
@@ -849,7 +849,7 @@ discard block |
||
| 849 | 849 | $inheritedProperty = $declaringClass->isMappedSuperclass ? clone $property : $property; |
| 850 | 850 | |
| 851 | 851 | if ($inheritedProperty instanceof FieldMetadata) { |
| 852 | - if (! $declaringClass->isMappedSuperclass) { |
|
| 852 | + if ( ! $declaringClass->isMappedSuperclass) { |
|
| 853 | 853 | $inheritedProperty->setTableName($property->getTableName()); |
| 854 | 854 | } |
| 855 | 855 | |
@@ -942,11 +942,11 @@ discard block |
||
| 942 | 942 | 'method' => $methodName, |
| 943 | 943 | ]; |
| 944 | 944 | |
| 945 | - if (! class_exists($class)) { |
|
| 945 | + if ( ! class_exists($class)) { |
|
| 946 | 946 | throw MappingException::entityListenerClassNotFound($class, $this->className); |
| 947 | 947 | } |
| 948 | 948 | |
| 949 | - if (! method_exists($class, $methodName)) { |
|
| 949 | + if ( ! method_exists($class, $methodName)) { |
|
| 950 | 950 | throw MappingException::entityListenerMethodNotFound($class, $methodName, $this->className); |
| 951 | 951 | } |
| 952 | 952 | |
@@ -1014,7 +1014,7 @@ discard block |
||
| 1014 | 1014 | return; |
| 1015 | 1015 | } |
| 1016 | 1016 | |
| 1017 | - if (! (class_exists($className) || interface_exists($className))) { |
|
| 1017 | + if ( ! (class_exists($className) || interface_exists($className))) { |
|
| 1018 | 1018 | throw MappingException::invalidClassInDiscriminatorMap($className, $this->className); |
| 1019 | 1019 | } |
| 1020 | 1020 | |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | $parentClass = $this->class; |
| 55 | 55 | |
| 56 | 56 | while (($parentClass = $parentClass->getParent()) !== null) { |
| 57 | - if (! $parentClass->isMappedSuperclass) { |
|
| 57 | + if ( ! $parentClass->isMappedSuperclass) { |
|
| 58 | 58 | $parentTableName = $parentClass->getTableName(); |
| 59 | 59 | |
| 60 | 60 | if ($parentClass !== $rootClass) { |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | foreach ($data as $columnName => $value) { |
| 113 | - if (! is_array($id) || ! isset($id[$columnName])) { |
|
| 113 | + if ( ! is_array($id) || ! isset($id[$columnName])) { |
|
| 114 | 114 | $type = $this->columns[$columnName]->getType(); |
| 115 | 115 | |
| 116 | 116 | $stmt->bindValue($paramIndex++, $value, $type); |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | { |
| 135 | 135 | $updateData = $this->prepareUpdateData($entity); |
| 136 | 136 | |
| 137 | - if (! $updateData) { |
|
| 137 | + if ( ! $updateData) { |
|
| 138 | 138 | return; |
| 139 | 139 | } |
| 140 | 140 | |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | $versionedClass = $this->class->versionProperty->getDeclaringClass(); |
| 153 | 153 | $versionedTable = $versionedClass->getTableName(); |
| 154 | 154 | |
| 155 | - if (! isset($updateData[$versionedTable])) { |
|
| 155 | + if ( ! isset($updateData[$versionedTable])) { |
|
| 156 | 156 | $tableName = $versionedClass->table->getQuotedQualifiedName($this->platform); |
| 157 | 157 | |
| 158 | 158 | $this->updateTable($entity, $tableName, [], true); |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | $parentClass = $this->class; |
| 190 | 190 | |
| 191 | 191 | while (($parentClass = $parentClass->getParent()) !== null) { |
| 192 | - if (! $parentClass->isMappedSuperclass) { |
|
| 192 | + if ( ! $parentClass->isMappedSuperclass) { |
|
| 193 | 193 | $parentTable = $parentClass->table->getQuotedQualifiedName($this->platform); |
| 194 | 194 | |
| 195 | 195 | $this->conn->delete($parentTable, $id); |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | |
| 236 | 236 | if ($filterSql) { |
| 237 | 237 | $conditionSql .= $conditionSql |
| 238 | - ? ' AND ' . $filterSql |
|
| 238 | + ? ' AND '.$filterSql |
|
| 239 | 239 | : $filterSql; |
| 240 | 240 | } |
| 241 | 241 | |
@@ -243,26 +243,26 @@ discard block |
||
| 243 | 243 | |
| 244 | 244 | switch ($lockMode) { |
| 245 | 245 | case LockMode::PESSIMISTIC_READ: |
| 246 | - $lockSql = ' ' . $this->platform->getReadLockSQL(); |
|
| 246 | + $lockSql = ' '.$this->platform->getReadLockSQL(); |
|
| 247 | 247 | break; |
| 248 | 248 | |
| 249 | 249 | case LockMode::PESSIMISTIC_WRITE: |
| 250 | - $lockSql = ' ' . $this->platform->getWriteLockSQL(); |
|
| 250 | + $lockSql = ' '.$this->platform->getWriteLockSQL(); |
|
| 251 | 251 | break; |
| 252 | 252 | } |
| 253 | 253 | |
| 254 | 254 | $tableName = $this->class->table->getQuotedQualifiedName($this->platform); |
| 255 | - $from = ' FROM ' . $tableName . ' ' . $baseTableAlias; |
|
| 256 | - $where = $conditionSql !== '' ? ' WHERE ' . $conditionSql : ''; |
|
| 255 | + $from = ' FROM '.$tableName.' '.$baseTableAlias; |
|
| 256 | + $where = $conditionSql !== '' ? ' WHERE '.$conditionSql : ''; |
|
| 257 | 257 | $lock = $this->platform->appendLockHint($from, $lockMode); |
| 258 | 258 | $columnList = $this->getSelectColumnsSQL(); |
| 259 | - $query = 'SELECT ' . $columnList |
|
| 259 | + $query = 'SELECT '.$columnList |
|
| 260 | 260 | . $lock |
| 261 | 261 | . $joinSql |
| 262 | 262 | . $where |
| 263 | 263 | . $orderBySql; |
| 264 | 264 | |
| 265 | - return $this->platform->modifyLimitQuery($query, $limit, $offset ?? 0) . $lockSql; |
|
| 265 | + return $this->platform->modifyLimitQuery($query, $limit, $offset ?? 0).$lockSql; |
|
| 266 | 266 | } |
| 267 | 267 | |
| 268 | 268 | /** |
@@ -284,14 +284,14 @@ discard block |
||
| 284 | 284 | |
| 285 | 285 | if ($filterSql !== '') { |
| 286 | 286 | $conditionSql = $conditionSql |
| 287 | - ? $conditionSql . ' AND ' . $filterSql |
|
| 287 | + ? $conditionSql.' AND '.$filterSql |
|
| 288 | 288 | : $filterSql; |
| 289 | 289 | } |
| 290 | 290 | |
| 291 | 291 | return 'SELECT COUNT(*) ' |
| 292 | - . 'FROM ' . $tableName . ' ' . $baseTableAlias |
|
| 292 | + . 'FROM '.$tableName.' '.$baseTableAlias |
|
| 293 | 293 | . $joinSql |
| 294 | - . (empty($conditionSql) ? '' : ' WHERE ' . $conditionSql); |
|
| 294 | + . (empty($conditionSql) ? '' : ' WHERE '.$conditionSql); |
|
| 295 | 295 | } |
| 296 | 296 | |
| 297 | 297 | /** |
@@ -307,23 +307,23 @@ discard block |
||
| 307 | 307 | $parentClass = $this->class; |
| 308 | 308 | |
| 309 | 309 | while (($parentClass = $parentClass->getParent()) !== null) { |
| 310 | - if (! $parentClass->isMappedSuperclass) { |
|
| 310 | + if ( ! $parentClass->isMappedSuperclass) { |
|
| 311 | 311 | $conditions = []; |
| 312 | 312 | $tableName = $parentClass->table->getQuotedQualifiedName($this->platform); |
| 313 | 313 | $tableAlias = $this->getSQLTableAlias($parentClass->getTableName()); |
| 314 | - $joinSql .= ' INNER JOIN ' . $tableName . ' ' . $tableAlias . ' ON '; |
|
| 314 | + $joinSql .= ' INNER JOIN '.$tableName.' '.$tableAlias.' ON '; |
|
| 315 | 315 | |
| 316 | 316 | foreach ($identifierColumns as $idColumn) { |
| 317 | 317 | $quotedColumnName = $this->platform->quoteIdentifier($idColumn->getColumnName()); |
| 318 | 318 | |
| 319 | - $conditions[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName; |
|
| 319 | + $conditions[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName; |
|
| 320 | 320 | } |
| 321 | 321 | |
| 322 | 322 | $joinSql .= implode(' AND ', $conditions); |
| 323 | 323 | } |
| 324 | 324 | } |
| 325 | 325 | |
| 326 | - return parent::getLockTablesSql($lockMode) . $joinSql; |
|
| 326 | + return parent::getLockTablesSql($lockMode).$joinSql; |
|
| 327 | 327 | } |
| 328 | 328 | |
| 329 | 329 | /** |
@@ -347,7 +347,7 @@ discard block |
||
| 347 | 347 | if ($property instanceof FieldMetadata) { |
| 348 | 348 | $tableClass = $parentClass = $this->class; |
| 349 | 349 | while ($parentClass !== $property->getDeclaringClass() && ($parentClass = $parentClass->getParent()) !== null) { |
| 350 | - if (! $parentClass->isMappedSuperclass) { |
|
| 350 | + if ( ! $parentClass->isMappedSuperclass) { |
|
| 351 | 351 | $tableClass = $parentClass; |
| 352 | 352 | } |
| 353 | 353 | } |
@@ -356,7 +356,7 @@ discard block |
||
| 356 | 356 | continue; |
| 357 | 357 | } |
| 358 | 358 | |
| 359 | - if (! ($property instanceof ToOneAssociationMetadata) || ! $property->isOwningSide()) { |
|
| 359 | + if ( ! ($property instanceof ToOneAssociationMetadata) || ! $property->isOwningSide()) { |
|
| 360 | 360 | continue; |
| 361 | 361 | } |
| 362 | 362 | |
@@ -366,7 +366,7 @@ discard block |
||
| 366 | 366 | /** @var JoinColumnMetadata $joinColumn */ |
| 367 | 367 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 368 | 368 | |
| 369 | - if (! $joinColumn->getType()) { |
|
| 369 | + if ( ! $joinColumn->getType()) { |
|
| 370 | 370 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
| 371 | 371 | } |
| 372 | 372 | |
@@ -385,7 +385,7 @@ discard block |
||
| 385 | 385 | $this->currentPersisterContext->rsm->setDiscriminatorColumn('r', $resultColumnName); |
| 386 | 386 | $this->currentPersisterContext->rsm->addMetaResult('r', $resultColumnName, $discrColumnName, false, $discrColumnType); |
| 387 | 387 | |
| 388 | - $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias . '.' . $quotedColumnName, $this->platform); |
|
| 388 | + $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias.'.'.$quotedColumnName, $this->platform); |
|
| 389 | 389 | |
| 390 | 390 | // sub tables |
| 391 | 391 | foreach ($this->class->getSubClasses() as $subClassName) { |
@@ -409,7 +409,7 @@ discard block |
||
| 409 | 409 | /** @var JoinColumnMetadata $joinColumn */ |
| 410 | 410 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 411 | 411 | |
| 412 | - if (! $joinColumn->getType()) { |
|
| 412 | + if ( ! $joinColumn->getType()) { |
|
| 413 | 413 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
| 414 | 414 | } |
| 415 | 415 | |
@@ -459,7 +459,7 @@ discard block |
||
| 459 | 459 | $columnName = $joinColumn->getColumnName(); |
| 460 | 460 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 461 | 461 | |
| 462 | - if (! $joinColumn->getType()) { |
|
| 462 | + if ( ! $joinColumn->getType()) { |
|
| 463 | 463 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
| 464 | 464 | } |
| 465 | 465 | |
@@ -512,16 +512,16 @@ discard block |
||
| 512 | 512 | $parentClass = $this->class; |
| 513 | 513 | |
| 514 | 514 | while (($parentClass = $parentClass->getParent()) !== null) { |
| 515 | - if (! $parentClass->isMappedSuperclass) { |
|
| 515 | + if ( ! $parentClass->isMappedSuperclass) { |
|
| 516 | 516 | $conditions = []; |
| 517 | 517 | $tableName = $parentClass->table->getQuotedQualifiedName($this->platform); |
| 518 | 518 | $tableAlias = $this->getSQLTableAlias($parentClass->getTableName()); |
| 519 | - $joinSql .= ' INNER JOIN ' . $tableName . ' ' . $tableAlias . ' ON '; |
|
| 519 | + $joinSql .= ' INNER JOIN '.$tableName.' '.$tableAlias.' ON '; |
|
| 520 | 520 | |
| 521 | 521 | foreach ($identifierColumns as $idColumn) { |
| 522 | 522 | $quotedColumnName = $this->platform->quoteIdentifier($idColumn->getColumnName()); |
| 523 | 523 | |
| 524 | - $conditions[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName; |
|
| 524 | + $conditions[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName; |
|
| 525 | 525 | } |
| 526 | 526 | |
| 527 | 527 | $joinSql .= implode(' AND ', $conditions); |
@@ -534,12 +534,12 @@ discard block |
||
| 534 | 534 | $subClass = $this->em->getClassMetadata($subClassName); |
| 535 | 535 | $tableName = $subClass->table->getQuotedQualifiedName($this->platform); |
| 536 | 536 | $tableAlias = $this->getSQLTableAlias($subClass->getTableName()); |
| 537 | - $joinSql .= ' LEFT JOIN ' . $tableName . ' ' . $tableAlias . ' ON '; |
|
| 537 | + $joinSql .= ' LEFT JOIN '.$tableName.' '.$tableAlias.' ON '; |
|
| 538 | 538 | |
| 539 | 539 | foreach ($identifierColumns as $idColumn) { |
| 540 | 540 | $quotedColumnName = $this->platform->quoteIdentifier($idColumn->getColumnName()); |
| 541 | 541 | |
| 542 | - $conditions[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName; |
|
| 542 | + $conditions[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName; |
|
| 543 | 543 | } |
| 544 | 544 | |
| 545 | 545 | $joinSql .= implode(' AND ', $conditions); |