Completed
Push — master ( f1592e...b3630f )
by Daniel
03:25 queued 01:30
created
lib/Query/Query.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -60,6 +60,9 @@
 block discarded – undo
60 60
         return new self($classFqn, $query['selects'], $query['joins'], $query['criteria'], $query['orderings'], $query['firstResult'], $query['maxResults']);
61 61
     }
62 62
 
63
+    /**
64
+     * @param string $value1
65
+     */
63 66
     public static function comparison(string $comparator, $value1, $value2): Comparison
64 67
     {
65 68
         return new Comparison($comparator, $value1, $value2);
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Psi\Component\ObjectAgent\Query;
6 6
 
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
         $this->joins = $joins;
34 34
         $this->selects = $selects;
35 35
 
36
-        array_walk($joins, function (Join $join) {
36
+        array_walk($joins, function(Join $join) {
37 37
         });
38 38
     }
39 39
 
Please login to merge, or discard this patch.
bridge/doctrine-orm/lib/ExpressionVisitor.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
                 return $this->walkComposite($expr);
38 38
         }
39 39
 
40
-        throw new \RuntimeException('Unknown Expression: ' . get_class($expr));
40
+        throw new \RuntimeException('Unknown Expression: '.get_class($expr));
41 41
     }
42 42
 
43 43
     public function getParameters()
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
                 return $this->expressionFactory->isNotNull($this->getField($field), $this->registerParameter($field, $value));
89 89
         }
90 90
 
91
-        throw new \RuntimeException('Unknown comparator: ' . $comparison->getComparator());
91
+        throw new \RuntimeException('Unknown comparator: '.$comparison->getComparator());
92 92
     }
93 93
 
94 94
     private function walkComposite(Composite $expression)
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
             $ormExpressions[] = $this->dispatch($childExpression);
101 101
         }
102 102
 
103
-        $method = $expression->getType() == Composite::AND ? 'andX' : 'orX';
103
+        $method = $expression->getType() == Composite::AND? 'andX' : 'orX';
104 104
 
105 105
         return call_user_func_array([$this->expressionFactory, $method], $ormExpressions);
106 106
     }
@@ -113,14 +113,14 @@  discard block
 block discarded – undo
113 113
         }
114 114
 
115 115
         // otherwise use the primary source alias.
116
-        return $this->sourceAlias . '.' . $field;
116
+        return $this->sourceAlias.'.'.$field;
117 117
     }
118 118
 
119 119
     private function registerParameter(string $name, $value)
120 120
     {
121
-        $name = 'param' . $this->paramIndex++;
121
+        $name = 'param'.$this->paramIndex++;
122 122
         $this->parameters[$name] = $value;
123 123
 
124
-        return ':' . $name;
124
+        return ':'.$name;
125 125
     }
126 126
 }
Please login to merge, or discard this patch.
bridge/doctrine-orm/lib/OrmAgent.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         $idField = reset($idFields);
102 102
 
103 103
         $queryBuilder = $this->entityManager->getRepository($class)->createQueryBuilder('a');
104
-        $queryBuilder->where($queryBuilder->expr()->in('a.' . $idField, ':identifiers'));
104
+        $queryBuilder->where($queryBuilder->expr()->in('a.'.$idField, ':identifiers'));
105 105
         $queryBuilder->setParameter('identifiers', $identifiers);
106 106
 
107 107
         return $queryBuilder->getQuery()->execute();
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
         // TODO: Make a clone method on the Query, which allows passing an
204 204
         //       array of parts to replace in the clone.
205 205
         $query = Query::create($query->getClassFqn(), [
206
-            'selects' => ['count(' . self::SOURCE_ALIAS . '.' . $idField . ')'],
206
+            'selects' => ['count('.self::SOURCE_ALIAS.'.'.$idField.')'],
207 207
             'joins' => $query->getJoins(),
208 208
             'criteria' => $query->hasExpression() ? $query->getExpression() : null,
209 209
         ]);
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 
244 244
         $selects = [];
245 245
         foreach ($query->getSelects() as $selectName => $selectAlias) {
246
-            $select = $selectName . ' ' . $selectAlias;
246
+            $select = $selectName.' '.$selectAlias;
247 247
             if (is_int($selectName)) {
248 248
                 $select = $selectAlias;
249 249
             }
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
         }
267 267
 
268 268
         foreach ($query->getOrderings() as $field => $order) {
269
-            $queryBuilder->addOrderBy(self::SOURCE_ALIAS . '.' . $field, $order);
269
+            $queryBuilder->addOrderBy(self::SOURCE_ALIAS.'.'.$field, $order);
270 270
         }
271 271
 
272 272
         if (null !== $query->getFirstResult()) {
Please login to merge, or discard this patch.