@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | 'type' => Join::INNER_JOIN, |
68 | 68 | 'join'=> null, |
69 | 69 | 'alias' => null, |
70 | - ], $join, [ 'join', 'alias']); |
|
70 | + ], $join, ['join', 'alias']); |
|
71 | 71 | |
72 | 72 | $joinObjects[] = new Join($join['join'], $join['alias'], $join['type']); |
73 | 73 | } |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | if ($diff = array_diff($required, array_keys($values))) { |
120 | 120 | throw new \InvalidArgumentException(sprintf( |
121 | 121 | 'Keys "%s" are required for "%s"', |
122 | - implode('", "', $diff), json_encode($values) |
|
122 | + implode('", "', $diff), json_encode($values) |
|
123 | 123 | )); |
124 | 124 | } |
125 | 125 |
@@ -31,7 +31,7 @@ |
||
31 | 31 | $this->joins = $joins; |
32 | 32 | $this->selects = $selects; |
33 | 33 | |
34 | - array_walk($joins, function (Join $join) { |
|
34 | + array_walk($joins, function(Join $join) { |
|
35 | 35 | }); |
36 | 36 | } |
37 | 37 |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | return $this->walkComposite($expr); |
36 | 36 | } |
37 | 37 | |
38 | - throw new \RuntimeException('Unknown Expression: ' . get_class($expr)); |
|
38 | + throw new \RuntimeException('Unknown Expression: '.get_class($expr)); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | public function getParameters() |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | return $this->expressionFactory->isNotNull($this->getField($field), $this->registerParameter($field, $value)); |
87 | 87 | } |
88 | 88 | |
89 | - throw new \RuntimeException('Unknown comparator: ' . $comparison->getComparator()); |
|
89 | + throw new \RuntimeException('Unknown comparator: '.$comparison->getComparator()); |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | private function walkComposite(Composite $expression) |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | $ormExpressions[] = $this->dispatch($childExpression); |
99 | 99 | } |
100 | 100 | |
101 | - $method = $expression->getType() == Composite::AND ? 'andX' : 'orX'; |
|
101 | + $method = $expression->getType() == Composite::AND? 'andX' : 'orX'; |
|
102 | 102 | |
103 | 103 | return call_user_func_array([$this->expressionFactory, $method], $ormExpressions); |
104 | 104 | } |
@@ -111,14 +111,14 @@ discard block |
||
111 | 111 | } |
112 | 112 | |
113 | 113 | // otherwise use the primary source alias. |
114 | - return $this->sourceAlias . '.' . $field; |
|
114 | + return $this->sourceAlias.'.'.$field; |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | private function registerParameter(string $name, $value) |
118 | 118 | { |
119 | - $name = 'param' . $this->paramIndex++; |
|
119 | + $name = 'param'.$this->paramIndex++; |
|
120 | 120 | $this->parameters[$name] = $value; |
121 | 121 | |
122 | - return ':' . $name; |
|
122 | + return ':'.$name; |
|
123 | 123 | } |
124 | 124 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Psi\Bridge\ObjectAgent\Doctrine\Orm; |
6 | 6 | |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | $idField = reset($idFields); |
104 | 104 | |
105 | 105 | $queryBuilder = $this->entityManager->getRepository($class)->createQueryBuilder('a'); |
106 | - $queryBuilder->where($queryBuilder->expr()->in('a.' . $idField, ':identifiers')); |
|
106 | + $queryBuilder->where($queryBuilder->expr()->in('a.'.$idField, ':identifiers')); |
|
107 | 107 | $queryBuilder->setParameter('identifiers', $identifiers); |
108 | 108 | |
109 | 109 | return $queryBuilder->getQuery()->execute(); |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | // TODO: Make a clone method on the Query, which allows passing an |
206 | 206 | // array of parts to replace in the clone. |
207 | 207 | $query = Query::create($query->getClassFqn(), [ |
208 | - 'selects' => [ 'count(' . self::SOURCE_ALIAS . '.' . $idField . ')' ], |
|
208 | + 'selects' => ['count('.self::SOURCE_ALIAS.'.'.$idField.')'], |
|
209 | 209 | 'joins' => $query->getJoins(), |
210 | 210 | 'criteria' => $query->hasExpression() ? $query->getExpression() : null, |
211 | 211 | ]); |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | |
246 | 246 | $selects = []; |
247 | 247 | foreach ($query->getSelects() as $selectName => $selectAlias) { |
248 | - $select = $selectName . ' ' . $selectAlias; |
|
248 | + $select = $selectName.' '.$selectAlias; |
|
249 | 249 | if (is_int($selectName)) { |
250 | 250 | $select = $selectAlias; |
251 | 251 | } |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | } |
269 | 269 | |
270 | 270 | foreach ($query->getOrderings() as $field => $order) { |
271 | - $queryBuilder->addOrderBy(self::SOURCE_ALIAS . '.' . $field, $order); |
|
271 | + $queryBuilder->addOrderBy(self::SOURCE_ALIAS.'.'.$field, $order); |
|
272 | 272 | } |
273 | 273 | |
274 | 274 | if (null !== $query->getFirstResult()) { |