Passed
Push — master ( 65bc60...4839bb )
by noitran
05:19
created
helpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 namespace {
6 6
     use Noitran\RQL\Services\RQLService;
7 7
 
8
-    if (! function_exists('rql')) {
8
+    if (!function_exists('rql')) {
9 9
         /**
10 10
          * Get default RQL service.
11 11
          *
Please login to merge, or discard this patch.
src/Queues/ExprQueue.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
      */
22 22
     public function enqueue($exprClass): self
23 23
     {
24
-        if (! $exprClass instanceof ExprInterface) {
24
+        if (!$exprClass instanceof ExprInterface) {
25 25
             throw new ExpressionException(sprintf(
26 26
                 'The $exprClass variable is not an instance of %s.',
27 27
                 ExprInterface::class
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
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     /**
16 16
      * @var SpecInterface[]
17 17
      */
18
-    protected $applicableSpecs = [];
18
+    protected $applicableSpecs = [ ];
19 19
 
20 20
     /**
21 21
      * {@inheritdoc}
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      */
35 35
     public function register(string $filterStrategy): self
36 36
     {
37
-        $this->applicableSpecs[] = new $filterStrategy();
37
+        $this->applicableSpecs[ ] = new $filterStrategy();
38 38
 
39 39
         return $this;
40 40
     }
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
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
      */
20 20
     public function isSatisfiedBy(ProcessorInterface $processor, ExprInterface $exprClass): bool
21 21
     {
22
-        if (! \in_array($exprClass->getExpression(), ['$in', '$notIn', '$between'], true)) {
22
+        if (!\in_array($exprClass->getExpression(), [ '$in', '$notIn', '$between' ], true)) {
23 23
             return false;
24 24
         }
25 25
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     public function apply(ProcessorInterface $processor, ExprInterface $exprClass): Builder
33 33
     {
34 34
         /** @var EloquentProcessor $processor */
35
-        $method = $processor::getMethodMap()[$exprClass->getExpression()];
35
+        $method = $processor::getMethodMap()[ $exprClass->getExpression() ];
36 36
 
37 37
         return $processor->getBuilder()->{$method}(
38 38
             $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
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
      */
21 21
     public function isSatisfiedBy(ProcessorInterface $processor, ExprInterface $exprClass): bool
22 22
     {
23
-        if (! $exprClass instanceof OrExpr) {
23
+        if (!$exprClass instanceof OrExpr) {
24 24
             return false;
25 25
         }
26 26
 
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     public function apply(ProcessorInterface $processor, ExprInterface $exprClass): Builder
34 34
     {
35 35
         /* @var EloquentProcessor $processor */
36
-        return $processor->getBuilder()->where(function (Builder $builder) use ($exprClass) {
36
+        return $processor->getBuilder()->where(function(Builder $builder) use ($exprClass) {
37 37
             $values = $exprClass->getValue();
38 38
 
39 39
             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
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     public function isSatisfiedBy(ProcessorInterface $processor, ExprInterface $exprClass): bool
21 21
     {
22 22
         /** @var EloquentProcessor $processor */
23
-        if (! \in_array($exprClass->getExpression(), $processor::getComparisonMethods(), false)) {
23
+        if (!\in_array($exprClass->getExpression(), $processor::getComparisonMethods(), false)) {
24 24
             return false;
25 25
         }
26 26
 
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     public function apply(ProcessorInterface $processor, ExprInterface $exprClass): Builder
34 34
     {
35 35
         /** @var EloquentProcessor $processor */
36
-        $method = $processor::getMethodMap()[$exprClass->getExpression()];
36
+        $method = $processor::getMethodMap()[ $exprClass->getExpression() ];
37 37
 
38 38
         return $processor->getBuilder()->{$method}(
39 39
             $exprClass->getColumn(),
Please login to merge, or discard this patch.
src/ServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
             $publishPath = base_path('config/rql.php');
46 46
         }
47 47
 
48
-        $this->publishes([$configPath => $publishPath], 'config');
48
+        $this->publishes([ $configPath => $publishPath ], 'config');
49 49
     }
50 50
 
51 51
     protected function registerConfig(): void
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      */
69 69
     protected function bindProcessor(): void
70 70
     {
71
-        $this->app->bind(ProcessorInterface::class, function () {
71
+        $this->app->bind(ProcessorInterface::class, function() {
72 72
             return rql()->getProcessor();
73 73
         });
74 74
     }
Please login to merge, or discard this patch.
src/Parsers/Request/Illuminate/RequestParser.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
      */
129 129
     protected function parseExpression($filterValue): string
130 130
     {
131
-        if (! \is_array($filterValue)) {
131
+        if (!\is_array($filterValue)) {
132 132
             return config('repositories.filtering.default_expression', '$eq');
133 133
         }
134 134
 
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 
152 152
             $parsedDataType = substr($value, 0, $lastColonPosition);
153 153
 
154
-            if (! $this->isValidDataType($parsedDataType)) {
154
+            if (!$this->isValidDataType($parsedDataType)) {
155 155
                 return config('repositories.filtering.default_data_type', '$string');
156 156
             }
157 157
 
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
     {
171 171
         $value = $this->extractValue($filterValue);
172 172
 
173
-        if (Str::startsWith($value, ['$']) && false !== strpos($value, ':')) {
173
+        if (Str::startsWith($value, [ '$' ]) && false !== strpos($value, ':')) {
174 174
             $lastColonPosition = strpos($value, ':');
175 175
 
176 176
             return substr($value, $lastColonPosition + 1);
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
      */
187 187
     private function extractValue($filterValue): string
188 188
     {
189
-        if (! \is_array($filterValue)) {
189
+        if (!\is_array($filterValue)) {
190 190
             return $filterValue;
191 191
         }
192 192
 
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
      */
204 204
     private function isValidDataType($dataType, $strict = false): bool
205 205
     {
206
-        if (! \in_array($dataType, config('repositories.filtering.allowed_data_types', '$string'), true)) {
206
+        if (!\in_array($dataType, config('repositories.filtering.allowed_data_types', '$string'), true)) {
207 207
             if ($strict) {
208 208
                 throw new RuntimeException('Invalid/Unallowed data type passed.');
209 209
             }
Please login to merge, or discard this patch.