@@ -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\Component\ObjectAgent\Query; |
| 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\Component\ObjectAgent; |
| 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,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)) { |
@@ -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; |
| 6 | 6 | |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | public function addCollection($classFqn, array $collection) |
| 21 | 21 | { |
| 22 | - array_map(function ($object) use ($classFqn) { |
|
| 22 | + array_map(function($object) use ($classFqn) { |
|
| 23 | 23 | if (get_class($object) !== $classFqn) { |
| 24 | 24 | throw new \InvalidArgumentException(sprintf( |
| 25 | 25 | 'All objects in collection must be of class "%s", got "%s"', |
@@ -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 | |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | $orderBy = $queryBuilder->orderBy(); |
| 134 | 134 | foreach ($query->getOrderings() as $field => $order) { |
| 135 | 135 | $order = strtolower($order); |
| 136 | - $orderBy->{$order}()->field($sourceAlias . '.' . $field); |
|
| 136 | + $orderBy->{$order}()->field($sourceAlias.'.'.$field); |
|
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 | if (null !== $query->getFirstResult()) { |
@@ -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 @@ 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 | } |