@@ -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 @@ |
||
| 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\Component\ObjectAgent; |
| 6 | 6 | |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | |
| 11 | 11 | public function __construct(array $agents) |
| 12 | 12 | { |
| 13 | - array_map(function (AgentInterface $agent) { |
|
| 13 | + array_map(function(AgentInterface $agent) { |
|
| 14 | 14 | }, $agents); |
| 15 | 15 | $this->agents = $agents; |
| 16 | 16 | } |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | } |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | - $classes = array_map(function ($element) { |
|
| 26 | + $classes = array_map(function($element) { |
|
| 27 | 27 | return get_class($element); |
| 28 | 28 | }, $this->agents); |
| 29 | 29 | |
@@ -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 | |
@@ -23,13 +23,13 @@ discard block |
||
| 23 | 23 | public function getDefaultConfig() |
| 24 | 24 | { |
| 25 | 25 | return [ |
| 26 | - 'db_path' => __DIR__ . '/../../../../cache/test.sqlite', |
|
| 26 | + 'db_path' => __DIR__.'/../../../../cache/test.sqlite', |
|
| 27 | 27 | ]; |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | public function load(Container $container) |
| 31 | 31 | { |
| 32 | - $container->register('phpcr_odm', function (Container $container) { |
|
| 32 | + $container->register('phpcr_odm', function(Container $container) { |
|
| 33 | 33 | $dbPath = $container->getParameter('db_path'); |
| 34 | 34 | $registerNodeTypes = false; |
| 35 | 35 | |
@@ -63,9 +63,9 @@ discard block |
||
| 63 | 63 | $typeRegistrator->registerNodeTypes($session); |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | - $xmlDriver = new XmlDriver([__DIR__ . '/mappings']); |
|
| 66 | + $xmlDriver = new XmlDriver([__DIR__.'/mappings']); |
|
| 67 | 67 | $annotationDriver = new AnnotationDriver(new AnnotationReader(), [ |
| 68 | - __DIR__ . '/../../../vendor/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/Document', |
|
| 68 | + __DIR__.'/../../../vendor/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/Document', |
|
| 69 | 69 | ]); |
| 70 | 70 | $chain = new MappingDriverChain(); |
| 71 | 71 | $chain->addDriver($xmlDriver, 'Psi\Bridge\ObjectAgent\Doctrine\PhpcrOdm\Tests\Functional\Model'); |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | return DocumentManager::create($session, $config); |
| 78 | 78 | }); |
| 79 | 79 | |
| 80 | - $container->register('psi_object_agent.phpcr_odm', function (Container $container) { |
|
| 80 | + $container->register('psi_object_agent.phpcr_odm', function(Container $container) { |
|
| 81 | 81 | return new PhpcrOdmAgent($container->get('phpcr_odm')); |
| 82 | 82 | }); |
| 83 | 83 | } |
@@ -1,13 +1,13 @@ discard block |
||
| 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 | |
| 7 | 7 | class Composite implements Expression |
| 8 | 8 | { |
| 9 | - const AND = 'and'; |
|
| 10 | - const OR = 'or'; |
|
| 9 | + constAND= 'and'; |
|
| 10 | + constOR= 'or'; |
|
| 11 | 11 | |
| 12 | 12 | private static $validTypes = [ |
| 13 | 13 | self::AND, |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | public function __construct(string $type, array $expressions) |
| 21 | 21 | { |
| 22 | 22 | // ensure types |
| 23 | - array_map(function (Expression $expr) { |
|
| 23 | + array_map(function(Expression $expr) { |
|
| 24 | 24 | }, $expressions); |
| 25 | 25 | |
| 26 | 26 | if (!in_array($type, self::$validTypes)) { |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | return $this->walkComposite($expr, $parentNode); |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | - throw new \RuntimeException('Unknown Expression: ' . get_class($expr)); |
|
| 49 | + throw new \RuntimeException('Unknown Expression: '.get_class($expr)); |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | /** |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | return $parentNode->gte()->field($this->getField($field))->literal($value)->end(); |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | - throw new \RuntimeException('Unknown comparator: ' . $comparison->getComparator()); |
|
| 80 | + throw new \RuntimeException('Unknown comparator: '.$comparison->getComparator()); |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | /** |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | */ |
| 86 | 86 | private function walkComposite(Composite $expression, AbstractNode $parentNode) |
| 87 | 87 | { |
| 88 | - $node = $expression->getType() === Composite::AND ? $parentNode->andX() : $parentNode->orX(); |
|
| 88 | + $node = $expression->getType() === Composite::AND? $parentNode->andX() : $parentNode->orX(); |
|
| 89 | 89 | |
| 90 | 90 | $expressions = $expression->getExpressions(); |
| 91 | 91 | $leftExpression = array_shift($expressions); |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | */ |
| 112 | 112 | private function getField($field): string |
| 113 | 113 | { |
| 114 | - return $this->sourceAlias . '.' . $field; |
|
| 114 | + return $this->sourceAlias.'.'.$field; |
|
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | /** |