@@ -54,11 +54,11 @@ discard block |
||
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | foreach ($metadata->getDeclaredPropertiesIterator() as $name => $association) { |
| 57 | - if (! isset($data[$name]) || $association instanceof FieldMetadata) { |
|
| 57 | + if ( ! isset($data[$name]) || $association instanceof FieldMetadata) { |
|
| 58 | 58 | continue; |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | - if (! $association instanceof ToOneAssociationMetadata) { |
|
| 61 | + if ( ! $association instanceof ToOneAssociationMetadata) { |
|
| 62 | 62 | unset($data[$name]); |
| 63 | 63 | |
| 64 | 64 | continue; |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | $targetClassMetadata = $this->em->getClassMetadata($targetEntity); |
| 69 | 69 | $targetPersister = $this->uow->getEntityPersister($targetEntity); |
| 70 | 70 | |
| 71 | - if (! $association->getCache()) { |
|
| 71 | + if ( ! $association->getCache()) { |
|
| 72 | 72 | $owningAssociation = ! $association->isOwningSide() |
| 73 | 73 | ? $targetClassMetadata->getProperty($association->getMappedBy()) |
| 74 | 74 | : $association; |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | continue; |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | - if (! $association->isPrimaryKey()) { |
|
| 119 | + if ( ! $association->isPrimaryKey()) { |
|
| 120 | 120 | $targetClass = StaticClassNameConverter::getClass($data[$name]); |
| 121 | 121 | $targetId = $this->uow->getEntityIdentifier($data[$name]); |
| 122 | 122 | $data[$name] = new AssociationCacheEntry($targetClass, $targetId); |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | ($association instanceof OneToOneAssociationMetadata && ! $association->isOwningSide()) |
| 166 | 166 | ); |
| 167 | 167 | |
| 168 | - if (! $isEagerLoad) { |
|
| 168 | + if ( ! $isEagerLoad) { |
|
| 169 | 169 | $data[$name] = $this->em->getReference($assocClass, $assocId); |
| 170 | 170 | |
| 171 | 171 | continue; |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | public function getClassShortName(string $className) : string |
| 29 | 29 | { |
| 30 | 30 | if (strpos($className, '\\') !== false) { |
| 31 | - $className = substr($className, strrpos($className, '\\')+1); |
|
| 31 | + $className = substr($className, strrpos($className, '\\') + 1); |
|
| 32 | 32 | } |
| 33 | 33 | return $className; |
| 34 | 34 | } |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | $namespace = ''; |
| 42 | 42 | |
| 43 | 43 | if (strpos($className, '\\') !== false) { |
| 44 | - $namespace = strrev(substr(strrev($className), strpos(strrev($className), '\\')+1)); |
|
| 44 | + $namespace = strrev(substr(strrev($className), strpos(strrev($className), '\\') + 1)); |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | return $namespace; |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | */ |
| 19 | 19 | public function getParentClasses(string $className) : array |
| 20 | 20 | { |
| 21 | - if (! class_exists($className)) { |
|
| 21 | + if ( ! class_exists($className)) { |
|
| 22 | 22 | throw MappingException::nonExistingClass($className); |
| 23 | 23 | } |
| 24 | 24 | |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | */ |
| 27 | 27 | public function getRepository(EntityManagerInterface $entityManager, $entityName) |
| 28 | 28 | { |
| 29 | - $repositoryHash = $entityManager->getClassMetadata($entityName)->getClassName() . spl_object_id($entityManager); |
|
| 29 | + $repositoryHash = $entityManager->getClassMetadata($entityName)->getClassName().spl_object_id($entityManager); |
|
| 30 | 30 | |
| 31 | 31 | return $this->repositoryList[$repositoryHash] |
| 32 | 32 | ?? $this->repositoryList[$repositoryHash] = $this->createRepository($entityManager, $entityName); |
@@ -14,13 +14,13 @@ |
||
| 14 | 14 | string $method |
| 15 | 15 | ) : self { |
| 16 | 16 | return new self( |
| 17 | - "Entity '" . $entityName . "' has no field '" . $fieldName . "'. " . |
|
| 18 | - "You can therefore not call '" . $method . "' on the entities' repository." |
|
| 17 | + "Entity '".$entityName."' has no field '".$fieldName."'. ". |
|
| 18 | + "You can therefore not call '".$method."' on the entities' repository." |
|
| 19 | 19 | ); |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | public static function onMissingParameter(string $methodName) : self |
| 23 | 23 | { |
| 24 | - return new self("You need to pass a parameter to '" . $methodName . "'"); |
|
| 24 | + return new self("You need to pass a parameter to '".$methodName."'"); |
|
| 25 | 25 | } |
| 26 | 26 | } |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | string $associationFieldName |
| 14 | 14 | ) : self { |
| 15 | 15 | return new self( |
| 16 | - "You cannot search for the association field '" . $entityName . '#' . $associationFieldName . "', " . |
|
| 16 | + "You cannot search for the association field '".$entityName.'#'.$associationFieldName."', ". |
|
| 17 | 17 | 'because it is the inverse side of an association. Find methods only work on owning side associations.' |
| 18 | 18 | ); |
| 19 | 19 | } |
@@ -82,8 +82,8 @@ |
||
| 82 | 82 | */ |
| 83 | 83 | final public function getParameter($name) |
| 84 | 84 | { |
| 85 | - if (! isset($this->parameters[$name])) { |
|
| 86 | - throw new \InvalidArgumentException("Parameter '" . $name . "' does not exist."); |
|
| 85 | + if ( ! isset($this->parameters[$name])) { |
|
| 86 | + throw new \InvalidArgumentException("Parameter '".$name."' does not exist."); |
|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | return $this->em->getConnection()->quote($this->parameters[$name]['value'], $this->parameters[$name]['type']); |
@@ -80,11 +80,11 @@ discard block |
||
| 80 | 80 | */ |
| 81 | 81 | public function enable($name) |
| 82 | 82 | { |
| 83 | - if (! $this->has($name)) { |
|
| 84 | - throw new \InvalidArgumentException("Filter '" . $name . "' does not exist."); |
|
| 83 | + if ( ! $this->has($name)) { |
|
| 84 | + throw new \InvalidArgumentException("Filter '".$name."' does not exist."); |
|
| 85 | 85 | } |
| 86 | 86 | |
| 87 | - if (! $this->isEnabled($name)) { |
|
| 87 | + if ( ! $this->isEnabled($name)) { |
|
| 88 | 88 | $filterClass = $this->config->getFilterClassName($name); |
| 89 | 89 | |
| 90 | 90 | $this->enabledFilters[$name] = new $filterClass($this->em); |
@@ -132,8 +132,8 @@ discard block |
||
| 132 | 132 | */ |
| 133 | 133 | public function getFilter($name) |
| 134 | 134 | { |
| 135 | - if (! $this->isEnabled($name)) { |
|
| 136 | - throw new \InvalidArgumentException("Filter '" . $name . "' is not enabled."); |
|
| 135 | + if ( ! $this->isEnabled($name)) { |
|
| 136 | + throw new \InvalidArgumentException("Filter '".$name."' is not enabled."); |
|
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 | return $this->enabledFilters[$name]; |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | $filterHash = ''; |
| 187 | 187 | |
| 188 | 188 | foreach ($this->enabledFilters as $name => $filter) { |
| 189 | - $filterHash .= $name . $filter; |
|
| 189 | + $filterHash .= $name.$filter; |
|
| 190 | 190 | } |
| 191 | 191 | |
| 192 | 192 | return $filterHash; |
@@ -57,8 +57,8 @@ discard block |
||
| 57 | 57 | // 1. Create an INSERT INTO temptable ... SELECT identifiers WHERE $AST->getWhereClause() |
| 58 | 58 | $sqlWalker->setSQLTableAlias($primaryClass->getTableName(), 'i0', $primaryDqlAlias); |
| 59 | 59 | |
| 60 | - $this->insertSql = 'INSERT INTO ' . $tempTable . ' (' . $idColumnNameList . ')' |
|
| 61 | - . ' SELECT i0.' . implode(', i0.', array_keys($idColumns)); |
|
| 60 | + $this->insertSql = 'INSERT INTO '.$tempTable.' ('.$idColumnNameList.')' |
|
| 61 | + . ' SELECT i0.'.implode(', i0.', array_keys($idColumns)); |
|
| 62 | 62 | |
| 63 | 63 | $rangeDecl = new AST\RangeVariableDeclaration($primaryClass->getClassName(), $primaryDqlAlias); |
| 64 | 64 | $fromClause = new AST\FromClause([new AST\IdentificationVariableDeclaration($rangeDecl, null, [])]); |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | // 3. Create and store DELETE statements |
| 81 | 81 | $hierarchyClasses = array_merge( |
| 82 | 82 | array_map( |
| 83 | - function ($className) use ($em) { |
|
| 83 | + function($className) use ($em) { |
|
| 84 | 84 | return $em->getClassMetadata($className); |
| 85 | 85 | }, |
| 86 | 86 | array_reverse($primaryClass->getSubClasses()) |
@@ -103,8 +103,8 @@ discard block |
||
| 103 | 103 | ]; |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | - $this->createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable . ' (' |
|
| 107 | - . $platform->getColumnDeclarationListSQL($columnDefinitions) . ')'; |
|
| 106 | + $this->createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL().' '.$tempTable.' (' |
|
| 107 | + . $platform->getColumnDeclarationListSQL($columnDefinitions).')'; |
|
| 108 | 108 | |
| 109 | 109 | $this->dropTempTableSql = $platform->getDropTemporaryTableSQL($tempTable); |
| 110 | 110 | } |