Completed
Pull Request — master (#1)
by Daniel
27:00 queued 13:32
created
bridge/doctrine-phpcr-odm/tests/Functional/PhpcrOdmExtension.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -23,13 +23,13 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
lib/Query/Composite.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@  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
 
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
 block discarded – undo
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)) {
Please login to merge, or discard this patch.
bridge/doctrine-phpcr-odm/lib/ExpressionVisitor.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.