@@ -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 | } |
@@ -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 | } |
@@ -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 | } |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | $isInitialized = $collection->isInitialized(); |
| 62 | 62 | $isDirty = $collection->isDirty(); |
| 63 | 63 | |
| 64 | - if (! $isInitialized && ! $isDirty) { |
|
| 64 | + if ( ! $isInitialized && ! $isDirty) { |
|
| 65 | 65 | return; |
| 66 | 66 | } |
| 67 | 67 | |
@@ -39,8 +39,8 @@ discard block |
||
| 39 | 39 | for ($i = 1; $i <= 10000; ++$i) { |
| 40 | 40 | $user = new CMS\CmsUser(); |
| 41 | 41 | $user->status = 'user'; |
| 42 | - $user->username = 'user' . $i; |
|
| 43 | - $user->name = 'Mr.Smith-' . $i; |
|
| 42 | + $user->username = 'user'.$i; |
|
| 43 | + $user->name = 'Mr.Smith-'.$i; |
|
| 44 | 44 | |
| 45 | 45 | $this->users[$i] = $user; |
| 46 | 46 | } |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | // Yes, this is a lot of overhead, but I have no better solution other than |
| 54 | 54 | // completely mocking out the DB, which would be silly (query impact is |
| 55 | 55 | // necessarily part of our benchmarks) |
| 56 | - $this->entityManager->getConnection()->executeQuery('DELETE FROM ' . $this->tableName)->execute(); |
|
| 56 | + $this->entityManager->getConnection()->executeQuery('DELETE FROM '.$this->tableName)->execute(); |
|
| 57 | 57 | |
| 58 | 58 | foreach ($this->users as $key => $user) { |
| 59 | 59 | $this->entityManager->persist($user); |