@@ -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 @@ |
||
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 |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | namespace Psi\Bridge\ObjectAgent\Doctrine\Orm; |
6 | 6 | |
7 | -use Doctrine\ORM\Query\Expr; |
|
8 | 7 | use Psi\Component\ObjectAgent\Query\Comparison; |
9 | 8 | use Psi\Component\ObjectAgent\Query\Composite; |
10 | 9 | use Psi\Component\ObjectAgent\Query\Expression; |
@@ -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 | |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | { |
52 | 52 | $selects = []; |
53 | 53 | foreach ($query->getSelects() as $selectName => $selectAlias) { |
54 | - $select = $selectName . ' ' . $selectAlias; |
|
54 | + $select = $selectName.' '.$selectAlias; |
|
55 | 55 | |
56 | 56 | // if the "index" is numeric, then assume that the value is the |
57 | 57 | // name and that no alias is being used. |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | return $expressionFactory->isNotNull($this->getField($field), $this->registerParameter($queryBuilder, $value)); |
174 | 174 | } |
175 | 175 | |
176 | - throw new \RuntimeException('Unknown comparator: ' . $comparison->getComparator()); |
|
176 | + throw new \RuntimeException('Unknown comparator: '.$comparison->getComparator()); |
|
177 | 177 | } |
178 | 178 | |
179 | 179 | private function walkComposite(QueryBuilder $queryBuilder, Composite $expression) |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | $ormExpressions[] = $this->walkExpression($queryBuilder, $childExpression); |
186 | 186 | } |
187 | 187 | |
188 | - $method = $expression->getType() == Composite::AND ? 'andX' : 'orX'; |
|
188 | + $method = $expression->getType() == Composite::AND? 'andX' : 'orX'; |
|
189 | 189 | |
190 | 190 | return call_user_func_array([$queryBuilder->expr(), $method], $ormExpressions); |
191 | 191 | } |
@@ -198,14 +198,14 @@ discard block |
||
198 | 198 | } |
199 | 199 | |
200 | 200 | // otherwise use the primary source alias. |
201 | - return self::FROM_ALIAS . '.' . $field; |
|
201 | + return self::FROM_ALIAS.'.'.$field; |
|
202 | 202 | } |
203 | 203 | |
204 | 204 | private function registerParameter(QueryBuilder $queryBuilder, $value) |
205 | 205 | { |
206 | - $name = 'param' . $this->paramIndex++; |
|
206 | + $name = 'param'.$this->paramIndex++; |
|
207 | 207 | $queryBuilder->setParameter($name, $value); |
208 | 208 | |
209 | - return ':' . $name; |
|
209 | + return ':'.$name; |
|
210 | 210 | } |
211 | 211 | } |
@@ -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 | |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | $idField = reset($idFields); |
107 | 107 | |
108 | 108 | $queryBuilder = $this->entityManager->getRepository($class)->createQueryBuilder('a'); |
109 | - $queryBuilder->where($queryBuilder->expr()->in('a.' . $idField, ':identifiers')); |
|
109 | + $queryBuilder->where($queryBuilder->expr()->in('a.'.$idField, ':identifiers')); |
|
110 | 110 | $queryBuilder->setParameter('identifiers', $identifiers); |
111 | 111 | |
112 | 112 | return $queryBuilder->getQuery()->execute(); |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | $idField = reset($identifierFields); |
207 | 207 | |
208 | 208 | $query = $query->cloneWith([ |
209 | - 'selects' => ['count(' . PsiToOrmQueryBuilderConverter::FROM_ALIAS . '.' . $idField . ')'], |
|
209 | + 'selects' => ['count('.PsiToOrmQueryBuilderConverter::FROM_ALIAS.'.'.$idField.')'], |
|
210 | 210 | 'firstResult' => null, |
211 | 211 | 'maxResults' => null, |
212 | 212 | ]); |
@@ -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 |