@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Psi\Bridge\ObjectAgent\Doctrine\PhpcrOdm; |
6 | 6 |
@@ -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\Tests\Functional; |
6 | 6 | |
@@ -15,19 +15,19 @@ discard block |
||
15 | 15 | public function getDefaultConfig() |
16 | 16 | { |
17 | 17 | return [ |
18 | - 'db_path' => __DIR__ . '/../../../../cache/test.sqlite', |
|
18 | + 'db_path' => __DIR__.'/../../../../cache/test.sqlite', |
|
19 | 19 | ]; |
20 | 20 | } |
21 | 21 | |
22 | 22 | public function load(Container $container) |
23 | 23 | { |
24 | - $container->register('entity_manager', function (Container $container) { |
|
24 | + $container->register('entity_manager', function(Container $container) { |
|
25 | 25 | $dbParams = [ |
26 | 26 | 'driver' => 'pdo_sqlite', |
27 | 27 | 'path' => $container->getParameter('db_path'), |
28 | 28 | ]; |
29 | 29 | $paths = [ |
30 | - __DIR__ . '/mappings', |
|
30 | + __DIR__.'/mappings', |
|
31 | 31 | ]; |
32 | 32 | $config = Setup::createXMLMetadataConfiguration($paths, true); |
33 | 33 | $manager = EntityManager::create($dbParams, $config); |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | return $manager; |
36 | 36 | }); |
37 | 37 | |
38 | - $container->register('psi_object_agent.doctrine_orm', function (Container $container) { |
|
38 | + $container->register('psi_object_agent.doctrine_orm', function(Container $container) { |
|
39 | 39 | return new OrmAgent($container->get('entity_manager')); |
40 | 40 | }); |
41 | 41 | } |
@@ -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\Tests\Functional; |
6 | 6 | |
@@ -96,21 +96,21 @@ discard block |
||
96 | 96 | [ |
97 | 97 | 'null', |
98 | 98 | null, |
99 | - function ($expr) { |
|
99 | + function($expr) { |
|
100 | 100 | $this->assertEquals('a.title IS NULL', $expr); |
101 | 101 | }, |
102 | 102 | ], |
103 | 103 | [ |
104 | 104 | 'not_null', |
105 | 105 | null, |
106 | - function ($expr) { |
|
106 | + function($expr) { |
|
107 | 107 | $this->assertEquals('a.title IS NOT NULL', $expr); |
108 | 108 | }, |
109 | 109 | ], |
110 | 110 | [ |
111 | 111 | 'in', |
112 | 112 | [1, 2, 3], |
113 | - function ($expr) { |
|
113 | + function($expr) { |
|
114 | 114 | $this->assertInstanceOf(Func::class, $expr); |
115 | 115 | $this->assertEquals('a.title IN', $expr->getName()); |
116 | 116 | }, |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | [ |
119 | 119 | 'nin', |
120 | 120 | [1, 2, 3], |
121 | - function ($expr) { |
|
121 | + function($expr) { |
|
122 | 122 | $this->assertInstanceOf(Func::class, $expr); |
123 | 123 | $this->assertEquals('a.title NOT IN', $expr->getName()); |
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 | |
@@ -37,7 +37,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Psi\Bridge\ObjectAgent\Doctrine\PhpcrOdm; |
6 | 6 |
@@ -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 | |
@@ -101,7 +101,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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()) { |