Passed
Push — master ( 0b9717...65bc60 )
by noitran
05:28
created
src/Services/RQLService.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      */
39 39
     public function getProcessor(): ProcessorInterface
40 40
     {
41
-        if (! $this->processor) {
41
+        if (!$this->processor) {
42 42
             $this->processor = $this->createProcessor();
43 43
         }
44 44
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         $name = $this->config->get('rql.default_processor', 'eloquent');
54 54
         $class = config("rql.processors.{$name}.class");
55 55
 
56
-        if (! class_exists($class)) {
56
+        if (!class_exists($class)) {
57 57
             throw new RuntimeException('Processor class "' . $class . '" does not exist!');
58 58
         }
59 59
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     protected function createFilterSpecResolver(array $config): ResolverInterface
71 71
     {
72 72
         return (new FilterSpecResolver())
73
-            ->registerAll($config['filter_specs']);
73
+            ->registerAll($config[ 'filter_specs' ]);
74 74
     }
75 75
 
76 76
     /**
@@ -86,6 +86,6 @@  discard block
 block discarded – undo
86 86
             throw new RuntimeException('RQL config does not exist.');
87 87
         }
88 88
 
89
-        return $config['processors'][$processorName];
89
+        return $config[ 'processors' ][ $processorName ];
90 90
     }
91 91
 }
Please login to merge, or discard this patch.
src/Processors/FilterSpecResolver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
     /**
14 14
      * @var SpecInterface[]
15 15
      */
16
-    protected $applicableSpecs = [];
16
+    protected $applicableSpecs = [ ];
17 17
 
18 18
     /**
19 19
      * @inheritdoc
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      */
33 33
     public function register(string $filterStrategy): self
34 34
     {
35
-        $this->applicableSpecs[] = new $filterStrategy();
35
+        $this->applicableSpecs[ ] = new $filterStrategy();
36 36
 
37 37
         return $this;
38 38
     }
Please login to merge, or discard this patch.
src/Processors/Eloquent/ApplyIfArray.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
      */
18 18
     public function isSatisfiedBy(ProcessorInterface $processor, ExprInterface $exprClass): bool
19 19
     {
20
-        if (! in_array($exprClass->getExpression(), ['$in', '$notIn', '$between'], true)) {
20
+        if (!in_array($exprClass->getExpression(), [ '$in', '$notIn', '$between' ], true)) {
21 21
             return false;
22 22
         }
23 23
 
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     public function apply(ProcessorInterface $processor, ExprInterface $exprClass): Builder
31 31
     {
32 32
         /** @var EloquentProcessor $processor */
33
-        $method = $processor::getMethodMap()[$exprClass->getExpression()];
33
+        $method = $processor::getMethodMap()[ $exprClass->getExpression() ];
34 34
 
35 35
         return $processor->getBuilder()->{$method}(
36 36
             $exprClass->getColumn(),
Please login to merge, or discard this patch.
src/Processors/Eloquent/ApplyOr.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
      */
19 19
     public function isSatisfiedBy(ProcessorInterface $processor, ExprInterface $exprClass): bool
20 20
     {
21
-        if (! $exprClass instanceof OrExpr) {
21
+        if (!$exprClass instanceof OrExpr) {
22 22
             return false;
23 23
         }
24 24
 
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     public function apply(ProcessorInterface $processor, ExprInterface $exprClass): Builder
32 32
     {
33 33
         /** @var EloquentProcessor $processor */
34
-        return $processor->getBuilder()->where(function (Builder $builder) use ($exprClass) {
34
+        return $processor->getBuilder()->where(function(Builder $builder) use ($exprClass) {
35 35
             $values = $exprClass->getValue();
36 36
 
37 37
             foreach ($values as $value) {
Please login to merge, or discard this patch.
src/Processors/Eloquent/ApplyComparison.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     public function isSatisfiedBy(ProcessorInterface $processor, ExprInterface $exprClass): bool
19 19
     {
20 20
         /** @var EloquentProcessor $processor */
21
-        if (! in_array($exprClass->getExpression(), $processor::getComparisonMethods(), false)) {
21
+        if (!in_array($exprClass->getExpression(), $processor::getComparisonMethods(), false)) {
22 22
             return false;
23 23
         }
24 24
 
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     public function apply(ProcessorInterface $processor, ExprInterface $exprClass): Builder
32 32
     {
33 33
         /** @var EloquentProcessor $processor */
34
-        $method = $processor::getMethodMap()[$exprClass->getExpression()];
34
+        $method = $processor::getMethodMap()[ $exprClass->getExpression() ];
35 35
 
36 36
         return $processor->getBuilder()->{$method}(
37 37
             $exprClass->getColumn(),
Please login to merge, or discard this patch.
src/Processors/Eloquent/ApplyBetween.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
      */
19 19
     public function isSatisfiedBy(ProcessorInterface $processor, ExprInterface $exprClass): bool
20 20
     {
21
-        if (! $exprClass instanceof BetweenExpr) {
21
+        if (!$exprClass instanceof BetweenExpr) {
22 22
             return false;
23 23
         }
24 24
 
Please login to merge, or discard this patch.