@@ -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\Collections\Tests\Functional; |
| 6 | 6 | |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | [ |
| 109 | 109 | 'null', |
| 110 | 110 | null, |
| 111 | - function ($expr) { |
|
| 111 | + function($expr) { |
|
| 112 | 112 | $this->assertEquals('=', $expr->getOperator()); |
| 113 | 113 | $this->assertNull($expr->getValue()->getValue()); |
| 114 | 114 | }, |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | [ |
| 117 | 117 | 'in', |
| 118 | 118 | [1, 2, 3], |
| 119 | - function ($expr) { |
|
| 119 | + function($expr) { |
|
| 120 | 120 | $this->assertEquals('IN', $expr->getOperator()); |
| 121 | 121 | $this->assertEquals([1, 2, 3], $expr->getValue()->getValue()); |
| 122 | 122 | }, |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | [ |
| 125 | 125 | 'nin', |
| 126 | 126 | [1, 2, 3], |
| 127 | - function ($expr) { |
|
| 127 | + function($expr) { |
|
| 128 | 128 | $this->assertEquals('NIN', $expr->getOperator()); |
| 129 | 129 | $this->assertEquals([1, 2, 3], $expr->getValue()->getValue()); |
| 130 | 130 | }, |
@@ -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\PhpcrOdm; |
| 6 | 6 | |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | return $this->walkComposite($expr, $parentNode); |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | - throw new \RuntimeException('Unknown Expression: ' . get_class($expr)); |
|
| 47 | + throw new \RuntimeException('Unknown Expression: '.get_class($expr)); |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | /** |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | return $parentNode->fieldIsset($this->getField($field)); |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | - throw new \RuntimeException('Unknown comparator: ' . $comparison->getComparator()); |
|
| 99 | + throw new \RuntimeException('Unknown comparator: '.$comparison->getComparator()); |
|
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | /** |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | */ |
| 105 | 105 | private function walkComposite(Composite $expression, AbstractNode $parentNode) |
| 106 | 106 | { |
| 107 | - $node = $expression->getType() === Composite::AND ? $parentNode->andX() : $parentNode->orX(); |
|
| 107 | + $node = $expression->getType() === Composite::AND? $parentNode->andX() : $parentNode->orX(); |
|
| 108 | 108 | |
| 109 | 109 | $expressions = $expression->getExpressions(); |
| 110 | 110 | |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | */ |
| 136 | 136 | private function getField($field): string |
| 137 | 137 | { |
| 138 | - return $this->sourceAlias . '.' . $field; |
|
| 138 | + return $this->sourceAlias.'.'.$field; |
|
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | /** |
@@ -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\Bridge\ObjectAgent\Doctrine\PhpcrOdm\Tests\Functional; |
| 6 | 6 | |
@@ -24,13 +24,13 @@ discard block |
||
| 24 | 24 | public function getDefaultConfig() |
| 25 | 25 | { |
| 26 | 26 | return [ |
| 27 | - 'db_path' => __DIR__ . '/../../../../cache/test.sqlite', |
|
| 27 | + 'db_path' => __DIR__.'/../../../../cache/test.sqlite', |
|
| 28 | 28 | ]; |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | public function load(Container $container) |
| 32 | 32 | { |
| 33 | - $container->register('phpcr_odm', function (Container $container) { |
|
| 33 | + $container->register('phpcr_odm', function(Container $container) { |
|
| 34 | 34 | $dbPath = $container->getParameter('db_path'); |
| 35 | 35 | $registerNodeTypes = false; |
| 36 | 36 | |
@@ -64,9 +64,9 @@ discard block |
||
| 64 | 64 | $typeRegistrator->registerNodeTypes($session); |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | - $xmlDriver = new XmlDriver([__DIR__ . '/mappings']); |
|
| 67 | + $xmlDriver = new XmlDriver([__DIR__.'/mappings']); |
|
| 68 | 68 | $annotationDriver = new AnnotationDriver(new AnnotationReader(), [ |
| 69 | - __DIR__ . '/../../../vendor/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/Document', |
|
| 69 | + __DIR__.'/../../../vendor/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/Document', |
|
| 70 | 70 | ]); |
| 71 | 71 | $chain = new MappingDriverChain(); |
| 72 | 72 | $chain->addDriver($xmlDriver, 'Psi\Component\ObjectAgent\Tests\Functional\Model'); |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | return DocumentManager::create($session, $config); |
| 80 | 80 | }); |
| 81 | 81 | |
| 82 | - $container->register('psi_object_agent.phpcr_odm', function (Container $container) { |
|
| 82 | + $container->register('psi_object_agent.phpcr_odm', function(Container $container) { |
|
| 83 | 83 | return new PhpcrOdmAgent($container->get('phpcr_odm')); |
| 84 | 84 | }); |
| 85 | 85 | } |
@@ -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\PhpcrOdm\Tests\Functional; |
| 6 | 6 | |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | [ |
| 96 | 96 | 'in', |
| 97 | 97 | [10, 20, 30], |
| 98 | - function ($nodes) { |
|
| 98 | + function($nodes) { |
|
| 99 | 99 | $this->assertInstanceOf(ConstraintOrx::class, $nodes[0]); |
| 100 | 100 | $nodes = $nodes[0]->getChildrenOfType(AbstractNode::NT_CONSTRAINT); |
| 101 | 101 | $this->assertInstanceOf(ConstraintComparison::class, $nodes[0]); |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | [ |
| 109 | 109 | 'nin', |
| 110 | 110 | [10, 20, 30], |
| 111 | - function ($nodes) { |
|
| 111 | + function($nodes) { |
|
| 112 | 112 | $this->assertInstanceOf(ConstraintNot::class, $nodes[0]); |
| 113 | 113 | $nodes = $nodes[0]->getChildrenOfType(AbstractNode::NT_CONSTRAINT); |
| 114 | 114 | $this->assertInstanceOf(ConstraintOrx::class, $nodes[0]); |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | [ |
| 121 | 121 | 'not_contains', |
| 122 | 122 | 'hello', |
| 123 | - function ($nodes) { |
|
| 123 | + function($nodes) { |
|
| 124 | 124 | $this->assertInstanceOf(ConstraintNot::class, $nodes[0]); |
| 125 | 125 | $nodes = $nodes[0]->getChildrenOfType(AbstractNode::NT_CONSTRAINT); |
| 126 | 126 | $this->assertEquals('jcr.operator.like', $nodes[0]->getOperator()); |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | [ |
| 130 | 130 | 'null', |
| 131 | 131 | null, |
| 132 | - function ($nodes) { |
|
| 132 | + function($nodes) { |
|
| 133 | 133 | $this->assertInstanceOf(ConstraintNot::class, $nodes[0]); |
| 134 | 134 | $nodes = $nodes[0]->getChildrenOfType(AbstractNode::NT_CONSTRAINT); |
| 135 | 135 | $this->assertInstanceOf(ConstraintFieldIsset::class, $nodes[0]); |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | [ |
| 139 | 139 | 'not_null', |
| 140 | 140 | null, |
| 141 | - function ($nodes) { |
|
| 141 | + function($nodes) { |
|
| 142 | 142 | $this->assertInstanceOf(ConstraintFieldIsset::class, $nodes[0]); |
| 143 | 143 | }, |
| 144 | 144 | ], |
@@ -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\PhpcrOdm\Tests\Functional; |
| 6 | 6 | |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | |
| 60 | 60 | $page = new Page(); |
| 61 | 61 | $page->title = $title; |
| 62 | - $page->path = '/test/page-' . $id++; |
|
| 62 | + $page->path = '/test/page-'.$id++; |
|
| 63 | 63 | $this->documentManager->persist($page); |
| 64 | 64 | $this->documentManager->flush(); |
| 65 | 65 | |
@@ -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 | |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | return $this->walkComposite($expr); |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | - throw new \RuntimeException('Unknown Expression: ' . get_class($expr)); |
|
| 39 | + throw new \RuntimeException('Unknown Expression: '.get_class($expr)); |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | public function getParameters() |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | return $this->expressionFactory->isNotNull($this->getField($field), $this->registerParameter($field, $value)); |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | - throw new \RuntimeException('Unknown comparator: ' . $comparison->getComparator()); |
|
| 90 | + throw new \RuntimeException('Unknown comparator: '.$comparison->getComparator()); |
|
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | private function walkComposite(Composite $expression) |
@@ -99,20 +99,20 @@ discard block |
||
| 99 | 99 | $ormExpressions[] = $this->dispatch($childExpression); |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | - $method = $expression->getType() == Composite::AND ? 'andX' : 'orX'; |
|
| 102 | + $method = $expression->getType() == Composite::AND? 'andX' : 'orX'; |
|
| 103 | 103 | |
| 104 | 104 | return call_user_func_array([$this->expressionFactory, $method], $ormExpressions); |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | private function getField($field): string |
| 108 | 108 | { |
| 109 | - return $this->sourceAlias . '.' . $field; |
|
| 109 | + return $this->sourceAlias.'.'.$field; |
|
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | private function registerParameter(string $name, $value) |
| 113 | 113 | { |
| 114 | 114 | $this->parameters[$name] = $value; |
| 115 | 115 | |
| 116 | - return ':' . $name; |
|
| 116 | + return ':'.$name; |
|
| 117 | 117 | } |
| 118 | 118 | } |