@@ -20,7 +20,6 @@ |
||
20 | 20 | |
21 | 21 | use Doctrine\DBAL\Types\Type; |
22 | 22 | use Doctrine\ORM\Mapping\ClassMetadataInfo; |
23 | -use Doctrine\ORM\ORMException; |
|
24 | 23 | use Doctrine\ORM\Query; |
25 | 24 | use Doctrine\ORM\Query\TreeWalkerAdapter; |
26 | 25 | use Doctrine\ORM\Query\AST\Functions\IdentityFunction; |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | ); |
94 | 94 | |
95 | 95 | $pathExpression = new PathExpression( |
96 | - PathExpression::TYPE_STATE_FIELD | PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION, |
|
96 | + PathExpression::TYPE_STATE_FIELD|PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION, |
|
97 | 97 | $rootAlias, |
98 | 98 | $identifier |
99 | 99 | ); |
@@ -104,13 +104,13 @@ discard block |
||
104 | 104 | |
105 | 105 | if (isset($AST->orderByClause)) { |
106 | 106 | foreach ($AST->orderByClause->orderByItems as $item) { |
107 | - if ( ! $item->expression instanceof PathExpression) { |
|
107 | + if (!$item->expression instanceof PathExpression) { |
|
108 | 108 | continue; |
109 | 109 | } |
110 | 110 | |
111 | 111 | $AST->selectClause->selectExpressions[] = new SelectExpression( |
112 | 112 | $this->createSelectExpressionItem($item->expression), |
113 | - '_dctrn_ord' . $this->_aliasCounter++ |
|
113 | + '_dctrn_ord'.$this->_aliasCounter++ |
|
114 | 114 | ); |
115 | 115 | } |
116 | 116 | } |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | && isset($queryComponents[$expression->identificationVariable])) { |
146 | 146 | $queryComponent = $queryComponents[$expression->identificationVariable]; |
147 | 147 | if (isset($queryComponent['parent']) |
148 | - && $queryComponent['relation']['type'] & ClassMetadataInfo::TO_MANY) { |
|
148 | + && $queryComponent['relation']['type']&ClassMetadataInfo::TO_MANY) { |
|
149 | 149 | throw new \RuntimeException("Cannot select distinct identifiers from query with LIMIT and ORDER BY on a column from a fetch joined to-many association. Use output walkers."); |
150 | 150 | } |
151 | 151 | } |
@@ -57,7 +57,7 @@ |
||
57 | 57 | /** |
58 | 58 | * Constructor. |
59 | 59 | * |
60 | - * @param Query|QueryBuilder $query A Doctrine ORM query or query builder. |
|
60 | + * @param Query $query A Doctrine ORM query or query builder. |
|
61 | 61 | * @param boolean $fetchJoinCollection Whether the query joins a collection (true by default). |
62 | 62 | */ |
63 | 63 | public function __construct($query, $fetchJoinCollection = true) |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | if ($this->count === null) { |
122 | 122 | try { |
123 | 123 | $this->count = array_sum(array_map('current', $this->getCountQuery()->getScalarResult())); |
124 | - } catch(NoResultException $e) { |
|
124 | + } catch (NoResultException $e) { |
|
125 | 125 | $this->count = 0; |
126 | 126 | } |
127 | 127 | } |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | /* @var $countQuery Query */ |
242 | 242 | $countQuery = $this->cloneQuery($this->query); |
243 | 243 | |
244 | - if ( ! $countQuery->hasHint(CountWalker::HINT_DISTINCT)) { |
|
244 | + if (!$countQuery->hasHint(CountWalker::HINT_DISTINCT)) { |
|
245 | 245 | $countQuery->setHint(CountWalker::HINT_DISTINCT, true); |
246 | 246 | } |
247 | 247 | |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | foreach ($parameters as $key => $parameter) { |
268 | 268 | $parameterName = $parameter->getName(); |
269 | 269 | |
270 | - if( ! (isset($parameterMappings[$parameterName]) || array_key_exists($parameterName, $parameterMappings))) { |
|
270 | + if (!(isset($parameterMappings[$parameterName]) || array_key_exists($parameterName, $parameterMappings))) { |
|
271 | 271 | unset($parameters[$key]); |
272 | 272 | } |
273 | 273 | } |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | $pathType = PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION; |
90 | 90 | } |
91 | 91 | |
92 | - $pathExpression = new PathExpression(PathExpression::TYPE_STATE_FIELD | PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION, $rootAlias, $identifierFieldName); |
|
92 | + $pathExpression = new PathExpression(PathExpression::TYPE_STATE_FIELD|PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION, $rootAlias, $identifierFieldName); |
|
93 | 93 | $pathExpression->type = $pathType; |
94 | 94 | |
95 | 95 | $count = $this->_getQuery()->getHint(self::HINT_PAGINATOR_ID_COUNT); |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | array($pathExpression) |
101 | 101 | ); |
102 | 102 | $expression = new InExpression($arithmeticExpression); |
103 | - $expression->literals[] = new InputParameter(":" . self::PAGINATOR_ID_ALIAS); |
|
103 | + $expression->literals[] = new InputParameter(":".self::PAGINATOR_ID_ALIAS); |
|
104 | 104 | |
105 | 105 | } else { |
106 | 106 | $expression = new NullComparisonExpression($pathExpression); |
@@ -69,7 +69,7 @@ |
||
69 | 69 | } |
70 | 70 | |
71 | 71 | $pathExpression = new PathExpression( |
72 | - PathExpression::TYPE_STATE_FIELD | PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION, $rootAlias, |
|
72 | + PathExpression::TYPE_STATE_FIELD|PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION, $rootAlias, |
|
73 | 73 | $identifierFieldName |
74 | 74 | ); |
75 | 75 | $pathExpression->type = $pathType; |