Passed
Pull Request — master (#136)
by Zing
05:52
created
src/Enums/CastType.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
     /**
20 20
      * @var string
21 21
      */
22
-    public const ARRAY = 'array';
22
+    public const array = 'array';
23 23
 
24 24
     /**
25 25
      * @var string
Please login to merge, or discard this patch.
src/Filters/BetweenFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
      */
16 16
     protected function withPropertyConstraint(Builder $query, $value, $property): Builder
17 17
     {
18
-        if (! is_array($value) || count($value) !== 2) {
18
+        if (!is_array($value) || count($value) !== 2) {
19 19
             throw ParameterException::tooFewElementsForBetweenExpression();
20 20
         }
21 21
 
Please login to merge, or discard this patch.
src/Filters/ExactFilter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
     protected function isRelationProperty(Builder $query, string $property): bool
53 53
     {
54
-        if (! Str::contains($property, '.')) {
54
+        if (!Str::contains($property, '.')) {
55 55
             return false;
56 56
         }
57 57
 
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
             return false;
60 60
         }
61 61
 
62
-        return ! Str::startsWith($property, $query->getModel()->getTable() . '.');
62
+        return !Str::startsWith($property, $query->getModel()->getTable() . '.');
63 63
     }
64 64
 
65 65
     /**
Please login to merge, or discard this patch.
src/Filter.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@
 block discarded – undo
126 126
             return filter_var($value, FILTER_VALIDATE_INT);
127 127
         }
128 128
 
129
-        if ($cast === CastType::ARRAY) {
129
+        if ($cast === CastType::array) {
130 130
             return explode($this->delimiter, $value);
131 131
         }
132 132
 
Please login to merge, or discard this patch.
src/QueryBuilderServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,11 +14,11 @@
 block discarded – undo
14 14
     {
15 15
         QueryConfiguration::setPerPage((int) config('query-builder.per_page.default'));
16 16
         QueryConfiguration::setPageName((string) config('query-builder.per_page.key'));
17
-        if (! $this->app->runningInConsole()) {
17
+        if (!$this->app->runningInConsole()) {
18 18
             return;
19 19
         }
20 20
 
21
-        if (! $this->app instanceof Laravel) {
21
+        if (!$this->app instanceof Laravel) {
22 22
             return;
23 23
         }
24 24
 
Please login to merge, or discard this patch.
src/Concerns/WithSearchable.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
             function (Builder $query) use ($search, $searchable): void {
48 48
                 collect($searchable)->each(
49 49
                     function ($value, $key) use ($query, $search): void {
50
-                        if ($value instanceof Filter){
51
-                            $query->orWhere(function ($query)use ($value,$search){
50
+                        if ($value instanceof Filter) {
51
+                            $query->orWhere(function ($query)use ($value, $search){
52 52
                                 $value->filter($query, $search);
53 53
                             });
54 54
                             return;
@@ -97,8 +97,8 @@  discard block
 block discarded – undo
97 97
     {
98 98
         $results = [];
99 99
         foreach ($searchable as $singleSearchable) {
100
-            if ($singleSearchable instanceof Filter){
101
-                if ($singleSearchable->getDefault()!==null){
100
+            if ($singleSearchable instanceof Filter) {
101
+                if ($singleSearchable->getDefault() !== null) {
102 102
                     throw ParameterException::unsupportedFilterWithDefaultValueForSearch();
103 103
                 }
104 104
                 $results[] = $singleSearchable;
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -102,8 +102,7 @@
 block discarded – undo
102 102
                     throw ParameterException::unsupportedFilterWithDefaultValueForSearch();
103 103
                 }
104 104
                 $results[] = $singleSearchable;
105
-            }
106
-            elseif (Str::contains($singleSearchable, '.')) {
105
+            } elseif (Str::contains($singleSearchable, '.')) {
107 106
                 [$relation, $property] = $this->resolveNestedRelation($singleSearchable);
108 107
 
109 108
                 $results[$relation][] = $property;
Please login to merge, or discard this patch.