@@ -301,7 +301,7 @@ discard block |
||
| 301 | 301 | $fieldName = (string) $overrideElement['name']; |
| 302 | 302 | $property = $classMetadata->getProperty($fieldName); |
| 303 | 303 | |
| 304 | - if (! $property) { |
|
| 304 | + if ( ! $property) { |
|
| 305 | 305 | throw Mapping\MappingException::invalidOverrideFieldName($classMetadata->getClassName(), $fieldName); |
| 306 | 306 | } |
| 307 | 307 | |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | $fieldName = (string) $overrideElement['name']; |
| 336 | 336 | $property = $classMetadata->getProperty($fieldName); |
| 337 | 337 | |
| 338 | - if (! $property) { |
|
| 338 | + if ( ! $property) { |
|
| 339 | 339 | throw Mapping\MappingException::invalidOverrideFieldName($classMetadata->getClassName(), $fieldName); |
| 340 | 340 | } |
| 341 | 341 | |
@@ -393,7 +393,7 @@ discard block |
||
| 393 | 393 | // Check for fetch |
| 394 | 394 | if (isset($overrideElement['fetch'])) { |
| 395 | 395 | $override->setFetchMode( |
| 396 | - constant('Doctrine\ORM\Mapping\FetchMode::' . (string) $overrideElement['fetch']) |
|
| 396 | + constant('Doctrine\ORM\Mapping\FetchMode::'.(string) $overrideElement['fetch']) |
|
| 397 | 397 | ); |
| 398 | 398 | } |
| 399 | 399 | |
@@ -404,7 +404,7 @@ discard block |
||
| 404 | 404 | // Evaluate <lifecycle-callbacks...> |
| 405 | 405 | if (isset($xmlRoot->{'lifecycle-callbacks'})) { |
| 406 | 406 | foreach ($xmlRoot->{'lifecycle-callbacks'}->{'lifecycle-callback'} as $lifecycleCallback) { |
| 407 | - $eventName = constant(Events::class . '::' . (string) $lifecycleCallback['type']); |
|
| 407 | + $eventName = constant(Events::class.'::'.(string) $lifecycleCallback['type']); |
|
| 408 | 408 | $methodName = (string) $lifecycleCallback['method']; |
| 409 | 409 | |
| 410 | 410 | $classMetadata->addLifecycleCallback($eventName, $methodName); |
@@ -416,7 +416,7 @@ discard block |
||
| 416 | 416 | foreach ($xmlRoot->{'entity-listeners'}->{'entity-listener'} as $listenerElement) { |
| 417 | 417 | $listenerClassName = (string) $listenerElement['class']; |
| 418 | 418 | |
| 419 | - if (! class_exists($listenerClassName)) { |
|
| 419 | + if ( ! class_exists($listenerClassName)) { |
|
| 420 | 420 | throw Mapping\MappingException::entityListenerClassNotFound( |
| 421 | 421 | $listenerClassName, |
| 422 | 422 | $classMetadata->getClassName() |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | return $this->classNames; |
| 205 | 205 | } |
| 206 | 206 | |
| 207 | - if (! $this->paths) { |
|
| 207 | + if ( ! $this->paths) { |
|
| 208 | 208 | throw Mapping\MappingException::pathRequired(); |
| 209 | 209 | } |
| 210 | 210 | |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | $includedFiles = []; |
| 213 | 213 | |
| 214 | 214 | foreach ($this->paths as $path) { |
| 215 | - if (! is_dir($path)) { |
|
| 215 | + if ( ! is_dir($path)) { |
|
| 216 | 216 | throw Mapping\MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); |
| 217 | 217 | } |
| 218 | 218 | |
@@ -221,14 +221,14 @@ discard block |
||
| 221 | 221 | new RecursiveDirectoryIterator($path, FilesystemIterator::SKIP_DOTS), |
| 222 | 222 | RecursiveIteratorIterator::LEAVES_ONLY |
| 223 | 223 | ), |
| 224 | - '/^.+' . preg_quote($this->fileExtension) . '$/i', |
|
| 224 | + '/^.+'.preg_quote($this->fileExtension).'$/i', |
|
| 225 | 225 | RecursiveRegexIterator::GET_MATCH |
| 226 | 226 | ); |
| 227 | 227 | |
| 228 | 228 | foreach ($iterator as $file) { |
| 229 | 229 | $sourceFile = $file[0]; |
| 230 | 230 | |
| 231 | - if (! preg_match('(^phar:)i', $sourceFile)) { |
|
| 231 | + if ( ! preg_match('(^phar:)i', $sourceFile)) { |
|
| 232 | 232 | $sourceFile = realpath($sourceFile); |
| 233 | 233 | } |
| 234 | 234 | |
@@ -294,7 +294,7 @@ discard block |
||
| 294 | 294 | ->withCacheAnnotation($classAnnotations[Annotation\Cache::class] ?? null) |
| 295 | 295 | ->build(); |
| 296 | 296 | |
| 297 | - if (! $classMetadata->isEmbeddedClass) { |
|
| 297 | + if ( ! $classMetadata->isEmbeddedClass) { |
|
| 298 | 298 | $this->attachLifecycleCallbacks($classAnnotations, $reflectionClass, $classMetadata); |
| 299 | 299 | $this->attachEntityListeners($classAnnotations, $classMetadata); |
| 300 | 300 | } |
@@ -365,7 +365,7 @@ discard block |
||
| 365 | 365 | ]; |
| 366 | 366 | |
| 367 | 367 | foreach ($entityListenersAnnot->value as $listenerClassName) { |
| 368 | - if (! class_exists($listenerClassName)) { |
|
| 368 | + if ( ! class_exists($listenerClassName)) { |
|
| 369 | 369 | throw Mapping\MappingException::entityListenerClassNotFound( |
| 370 | 370 | $listenerClassName, |
| 371 | 371 | $metadata->getClassName() |
@@ -453,7 +453,7 @@ discard block |
||
| 453 | 453 | $fieldName = $associationOverrideAnnotation->name; |
| 454 | 454 | $property = $metadata->getProperty($fieldName); |
| 455 | 455 | |
| 456 | - if (! $property) { |
|
| 456 | + if ( ! $property) { |
|
| 457 | 457 | throw Mapping\MappingException::invalidOverrideFieldName($metadata->getClassName(), $fieldName); |
| 458 | 458 | } |
| 459 | 459 | |
@@ -506,7 +506,7 @@ discard block |
||
| 506 | 506 | |
| 507 | 507 | // Check for fetch |
| 508 | 508 | if ($associationOverrideAnnotation->fetch) { |
| 509 | - $override->setFetchMode(constant(Mapping\FetchMode::class . '::' . $associationOverrideAnnotation->fetch)); |
|
| 509 | + $override->setFetchMode(constant(Mapping\FetchMode::class.'::'.$associationOverrideAnnotation->fetch)); |
|
| 510 | 510 | } |
| 511 | 511 | |
| 512 | 512 | $metadata->setPropertyOverride($override); |
@@ -527,7 +527,7 @@ discard block |
||
| 527 | 527 | $fieldName = $attributeOverrideAnnotation->name; |
| 528 | 528 | $property = $metadata->getProperty($fieldName); |
| 529 | 529 | |
| 530 | - if (! $property) { |
|
| 530 | + if ( ! $property) { |
|
| 531 | 531 | throw Mapping\MappingException::invalidOverrideFieldName($metadata->getClassName(), $fieldName); |
| 532 | 532 | } |
| 533 | 533 | |
@@ -556,7 +556,7 @@ discard block |
||
| 556 | 556 | $classAnnotations = $this->reader->getClassAnnotations($reflectionClass); |
| 557 | 557 | |
| 558 | 558 | foreach ($classAnnotations as $key => $annot) { |
| 559 | - if (! is_numeric($key)) { |
|
| 559 | + if ( ! is_numeric($key)) { |
|
| 560 | 560 | continue; |
| 561 | 561 | } |
| 562 | 562 | |
@@ -574,7 +574,7 @@ discard block |
||
| 574 | 574 | $propertyAnnotations = $this->reader->getPropertyAnnotations($reflectionProperty); |
| 575 | 575 | |
| 576 | 576 | foreach ($propertyAnnotations as $key => $annot) { |
| 577 | - if (! is_numeric($key)) { |
|
| 577 | + if ( ! is_numeric($key)) { |
|
| 578 | 578 | continue; |
| 579 | 579 | } |
| 580 | 580 | |
@@ -592,7 +592,7 @@ discard block |
||
| 592 | 592 | $methodAnnotations = $this->reader->getMethodAnnotations($reflectionMethod); |
| 593 | 593 | |
| 594 | 594 | foreach ($methodAnnotations as $key => $annot) { |
| 595 | - if (! is_numeric($key)) { |
|
| 595 | + if ( ! is_numeric($key)) { |
|
| 596 | 596 | continue; |
| 597 | 597 | } |
| 598 | 598 | |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | $this->metadataBuildingContext = $metadataBuildingContext; |
| 67 | 67 | $this->tableMetadataBuilder = $tableMetadataBuilder ?: new TableMetadataBuilder($metadataBuildingContext); |
| 68 | 68 | $this->cacheMetadataBuilder = $cacheMetadataBuilder ?: new CacheMetadataBuilder($metadataBuildingContext); |
| 69 | - $this->discriminatorColumnMetadataBuilder = $discriminatorColumnMetadataBuilder?: new DiscriminatorColumnMetadataBuilder($metadataBuildingContext); |
|
| 69 | + $this->discriminatorColumnMetadataBuilder = $discriminatorColumnMetadataBuilder ?: new DiscriminatorColumnMetadataBuilder($metadataBuildingContext); |
|
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | public function withClassName(string $className) : ClassMetadataBuilder |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | && $parentMetadata->inheritanceType === Mapping\InheritanceType::SINGLE_TABLE) { |
| 234 | 234 | // Handle the case where a middle mapped super class inherits from a single table inheritance tree. |
| 235 | 235 | do { |
| 236 | - if (! $parentMetadata->isMappedSuperclass) { |
|
| 236 | + if ( ! $parentMetadata->isMappedSuperclass) { |
|
| 237 | 237 | $tableMetadata = $parentMetadata->table; |
| 238 | 238 | break; |
| 239 | 239 | } |
@@ -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 | |
@@ -435,7 +435,7 @@ discard block |
||
| 435 | 435 | $columns = []; |
| 436 | 436 | $parentClass = $this->class; |
| 437 | 437 | while (($parentClass = $parentClass->getParent()) !== null) { |
| 438 | - if (! $parentClass->isMappedSuperclass) { |
|
| 438 | + if ( ! $parentClass->isMappedSuperclass) { |
|
| 439 | 439 | $parentColumns = $parentClass->getIdentifierColumns($this->em); |
| 440 | 440 | |
| 441 | 441 | foreach ($parentColumns as $columnName => $column) { |
@@ -464,7 +464,7 @@ discard block |
||
| 464 | 464 | $columnName = $joinColumn->getColumnName(); |
| 465 | 465 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 466 | 466 | |
| 467 | - if (! $joinColumn->getType()) { |
|
| 467 | + if ( ! $joinColumn->getType()) { |
|
| 468 | 468 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
| 469 | 469 | } |
| 470 | 470 | |
@@ -517,16 +517,16 @@ discard block |
||
| 517 | 517 | $parentClass = $this->class; |
| 518 | 518 | |
| 519 | 519 | while (($parentClass = $parentClass->getParent()) !== null) { |
| 520 | - if (! $parentClass->isMappedSuperclass) { |
|
| 520 | + if ( ! $parentClass->isMappedSuperclass) { |
|
| 521 | 521 | $conditions = []; |
| 522 | 522 | $tableName = $parentClass->table->getQuotedQualifiedName($this->platform); |
| 523 | 523 | $tableAlias = $this->getSQLTableAlias($parentClass->getTableName()); |
| 524 | - $joinSql .= ' INNER JOIN ' . $tableName . ' ' . $tableAlias . ' ON '; |
|
| 524 | + $joinSql .= ' INNER JOIN '.$tableName.' '.$tableAlias.' ON '; |
|
| 525 | 525 | |
| 526 | 526 | foreach ($identifierColumns as $idColumn) { |
| 527 | 527 | $quotedColumnName = $this->platform->quoteIdentifier($idColumn->getColumnName()); |
| 528 | 528 | |
| 529 | - $conditions[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName; |
|
| 529 | + $conditions[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName; |
|
| 530 | 530 | } |
| 531 | 531 | |
| 532 | 532 | $joinSql .= implode(' AND ', $conditions); |
@@ -539,12 +539,12 @@ discard block |
||
| 539 | 539 | $subClass = $this->em->getClassMetadata($subClassName); |
| 540 | 540 | $tableName = $subClass->table->getQuotedQualifiedName($this->platform); |
| 541 | 541 | $tableAlias = $this->getSQLTableAlias($subClass->getTableName()); |
| 542 | - $joinSql .= ' LEFT JOIN ' . $tableName . ' ' . $tableAlias . ' ON '; |
|
| 542 | + $joinSql .= ' LEFT JOIN '.$tableName.' '.$tableAlias.' ON '; |
|
| 543 | 543 | |
| 544 | 544 | foreach ($identifierColumns as $idColumn) { |
| 545 | 545 | $quotedColumnName = $this->platform->quoteIdentifier($idColumn->getColumnName()); |
| 546 | 546 | |
| 547 | - $conditions[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName; |
|
| 547 | + $conditions[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName; |
|
| 548 | 548 | } |
| 549 | 549 | |
| 550 | 550 | $joinSql .= implode(' AND ', $conditions); |
@@ -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 | } |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | */ |
| 292 | 292 | public function __toString() |
| 293 | 293 | { |
| 294 | - return self::class . '@' . spl_object_id($this); |
|
| 294 | + return self::class.'@'.spl_object_id($this); |
|
| 295 | 295 | } |
| 296 | 296 | |
| 297 | 297 | /** |
@@ -387,11 +387,11 @@ discard block |
||
| 387 | 387 | */ |
| 388 | 388 | public function isIdentifier(string $fieldName) : bool |
| 389 | 389 | { |
| 390 | - if (! $this->identifier) { |
|
| 390 | + if ( ! $this->identifier) { |
|
| 391 | 391 | return false; |
| 392 | 392 | } |
| 393 | 393 | |
| 394 | - if (! $this->isIdentifierComposite()) { |
|
| 394 | + if ( ! $this->isIdentifierComposite()) { |
|
| 395 | 395 | return $fieldName === $this->identifier[0]; |
| 396 | 396 | } |
| 397 | 397 | |
@@ -415,11 +415,11 @@ discard block |
||
| 415 | 415 | } |
| 416 | 416 | |
| 417 | 417 | // Verify & complete identifier mapping |
| 418 | - if (! $this->identifier) { |
|
| 418 | + if ( ! $this->identifier) { |
|
| 419 | 419 | throw MappingException::identifierRequired($this->className); |
| 420 | 420 | } |
| 421 | 421 | |
| 422 | - $explicitlyGeneratedProperties = array_filter($this->properties, static function (Property $property) : bool { |
|
| 422 | + $explicitlyGeneratedProperties = array_filter($this->properties, static function(Property $property) : bool { |
|
| 423 | 423 | return $property instanceof FieldMetadata |
| 424 | 424 | && $property->isPrimaryKey() |
| 425 | 425 | && $property->hasValueGenerator(); |
@@ -440,7 +440,7 @@ discard block |
||
| 440 | 440 | foreach ($this->lifecycleCallbacks as $callbacks) { |
| 441 | 441 | /** @var array $callbacks */ |
| 442 | 442 | foreach ($callbacks as $callbackFuncName) { |
| 443 | - if (! $reflectionService->hasPublicMethod($this->className, $callbackFuncName)) { |
|
| 443 | + if ( ! $reflectionService->hasPublicMethod($this->className, $callbackFuncName)) { |
|
| 444 | 444 | throw MappingException::lifecycleCallbackMethodNotFound($this->className, $callbackFuncName); |
| 445 | 445 | } |
| 446 | 446 | } |
@@ -469,7 +469,7 @@ discard block |
||
| 469 | 469 | throw MappingException::singleIdNotAllowedOnCompositePrimaryKey($this->className); |
| 470 | 470 | } |
| 471 | 471 | |
| 472 | - if (! isset($this->identifier[0])) { |
|
| 472 | + if ( ! isset($this->identifier[0])) { |
|
| 473 | 473 | throw MappingException::noIdDefined($this->className); |
| 474 | 474 | } |
| 475 | 475 | |
@@ -528,7 +528,7 @@ discard block |
||
| 528 | 528 | // Association defined as Id field |
| 529 | 529 | $targetClass = $em->getClassMetadata($property->getTargetEntity()); |
| 530 | 530 | |
| 531 | - if (! $property->isOwningSide()) { |
|
| 531 | + if ( ! $property->isOwningSide()) { |
|
| 532 | 532 | $property = $targetClass->getProperty($property->getMappedBy()); |
| 533 | 533 | $targetClass = $em->getClassMetadata($property->getTargetEntity()); |
| 534 | 534 | } |
@@ -542,7 +542,7 @@ discard block |
||
| 542 | 542 | $columnName = $joinColumn->getColumnName(); |
| 543 | 543 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 544 | 544 | |
| 545 | - if (! $joinColumn->getType()) { |
|
| 545 | + if ( ! $joinColumn->getType()) { |
|
| 546 | 546 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $em)); |
| 547 | 547 | } |
| 548 | 548 | |
@@ -576,10 +576,10 @@ discard block |
||
| 576 | 576 | { |
| 577 | 577 | $schema = $this->getSchemaName() === null |
| 578 | 578 | ? '' |
| 579 | - : $this->getSchemaName() . '_'; |
|
| 579 | + : $this->getSchemaName().'_'; |
|
| 580 | 580 | |
| 581 | 581 | // replace dots with underscores because PostgreSQL creates temporary tables in a special schema |
| 582 | - return $schema . $this->getTableName() . '_id_tmp'; |
|
| 582 | + return $schema.$this->getTableName().'_id_tmp'; |
|
| 583 | 583 | } |
| 584 | 584 | |
| 585 | 585 | /** |
@@ -613,7 +613,7 @@ discard block |
||
| 613 | 613 | */ |
| 614 | 614 | public function setInheritanceType($type) : void |
| 615 | 615 | { |
| 616 | - if (! $this->isInheritanceType($type)) { |
|
| 616 | + if ( ! $this->isInheritanceType($type)) { |
|
| 617 | 617 | throw MappingException::invalidInheritanceType($this->className, $type); |
| 618 | 618 | } |
| 619 | 619 | |
@@ -631,7 +631,7 @@ discard block |
||
| 631 | 631 | { |
| 632 | 632 | $fieldName = $property->getName(); |
| 633 | 633 | |
| 634 | - if (! isset($this->properties[$fieldName])) { |
|
| 634 | + if ( ! isset($this->properties[$fieldName])) { |
|
| 635 | 635 | throw MappingException::invalidOverrideFieldName($this->className, $fieldName); |
| 636 | 636 | } |
| 637 | 637 | |
@@ -717,13 +717,13 @@ discard block |
||
| 717 | 717 | $declaringClass = $this->properties[$fieldName]->getDeclaringClass(); |
| 718 | 718 | if ($declaringClass === $this) { |
| 719 | 719 | return false; |
| 720 | - } else if (! $declaringClass->isMappedSuperclass) { |
|
| 720 | + } else if ( ! $declaringClass->isMappedSuperclass) { |
|
| 721 | 721 | return true; |
| 722 | 722 | } |
| 723 | 723 | |
| 724 | 724 | $parentClass = $this; |
| 725 | 725 | while (($parentClass = $parentClass->getParent()) !== $declaringClass) { |
| 726 | - if (! $parentClass->isMappedSuperclass) { |
|
| 726 | + if ( ! $parentClass->isMappedSuperclass) { |
|
| 727 | 727 | return true; |
| 728 | 728 | } |
| 729 | 729 | } |
@@ -845,7 +845,7 @@ discard block |
||
| 845 | 845 | $inheritedProperty = $declaringClass->isMappedSuperclass ? clone $property : $property; |
| 846 | 846 | |
| 847 | 847 | if ($inheritedProperty instanceof FieldMetadata) { |
| 848 | - if (! $declaringClass->isMappedSuperclass) { |
|
| 848 | + if ( ! $declaringClass->isMappedSuperclass) { |
|
| 849 | 849 | $inheritedProperty->setTableName($property->getTableName()); |
| 850 | 850 | } |
| 851 | 851 | |
@@ -938,11 +938,11 @@ discard block |
||
| 938 | 938 | 'method' => $methodName, |
| 939 | 939 | ]; |
| 940 | 940 | |
| 941 | - if (! class_exists($class)) { |
|
| 941 | + if ( ! class_exists($class)) { |
|
| 942 | 942 | throw MappingException::entityListenerClassNotFound($class, $this->className); |
| 943 | 943 | } |
| 944 | 944 | |
| 945 | - if (! method_exists($class, $methodName)) { |
|
| 945 | + if ( ! method_exists($class, $methodName)) { |
|
| 946 | 946 | throw MappingException::entityListenerMethodNotFound($class, $methodName, $this->className); |
| 947 | 947 | } |
| 948 | 948 | |
@@ -1010,7 +1010,7 @@ discard block |
||
| 1010 | 1010 | return; |
| 1011 | 1011 | } |
| 1012 | 1012 | |
| 1013 | - if (! (class_exists($className) || interface_exists($className))) { |
|
| 1013 | + if ( ! (class_exists($className) || interface_exists($className))) { |
|
| 1014 | 1014 | throw MappingException::invalidClassInDiscriminatorMap($className, $this->className); |
| 1015 | 1015 | } |
| 1016 | 1016 | |