Completed
Push — master ( 2e598e...56ae87 )
by Daniel
03:34
created
bridge/doctrine-phpcr-odm/tests/Functional/ExpressionVisitorTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
             ],
Please login to merge, or discard this patch.
bridge/doctrine-phpcr-odm/tests/Functional/PhpcrOdmAgentTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
bridge/doctrine-orm/tests/Functional/OrmExtension.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
lib/Query/Query.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
         $this->joins = $joins;
34 34
         $this->selects = $selects;
35 35
 
36
-        array_walk($joins, function (Join $join) {
36
+        array_walk($joins, function(Join $join) {
37 37
         });
38 38
     }
39 39
 
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -60,6 +60,9 @@
 block discarded – undo
60 60
         return new self($classFqn, $query['selects'], $query['joins'], $query['criteria'], $query['orderings'], $query['firstResult'], $query['maxResults']);
61 61
     }
62 62
 
63
+    /**
64
+     * @param string $value1
65
+     */
63 66
     public static function comparison(string $comparator, $value1, $value2 = null): Comparison
64 67
     {
65 68
         return new Comparison($comparator, $value1, $value2);
Please login to merge, or discard this patch.
bridge/doctrine-orm/lib/PsiToOrmQueryBuilderConverter.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 namespace Psi\Bridge\ObjectAgent\Doctrine\Orm;
6 6
 
7 7
 use Doctrine\ORM\EntityManagerInterface;
8
-use Doctrine\ORM\Query\Expr;
9 8
 use Doctrine\ORM\QueryBuilder;
10 9
 use Psi\Component\ObjectAgent\Query\Comparison;
11 10
 use Psi\Component\ObjectAgent\Query\Composite;
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
173 173
                 return $expressionFactory->isNotNull($this->getField($field));
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
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
lib/Capabilities.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
lib/Event/ObjectEvent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Psi\Component\ObjectAgent\Event;
6 6
 
Please login to merge, or discard this patch.
lib/Exception/AgentNotFoundException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Psi\Component\ObjectAgent\Exception;
6 6
 
Please login to merge, or discard this patch.
lib/Exception/ObjectNotFoundException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Psi\Component\ObjectAgent\Exception;
6 6
 
Please login to merge, or discard this patch.