Passed
Push — fix/document-upload-locale ( 7c277a...e6fd07 )
by Philippe
21:03 queued 13:44
created
src/Management/Register.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -46,14 +46,14 @@  discard block
 block discarded – undo
46 46
      */
47 47
     public function filter(callable $callback): self
48 48
     {
49
-        if (! is_callable($callback)) {
49
+        if (!is_callable($callback)) {
50 50
             return new static($this->registrations);
51 51
         }
52 52
 
53 53
         $registrations = $this->registrations;
54 54
 
55 55
         foreach ($registrations as $k => $registration) {
56
-            if (!! call_user_func($callback, $registration)) {
56
+            if (!!call_user_func($callback, $registration)) {
57 57
                 unset($registrations[$k]);
58 58
             }
59 59
         }
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     public function filterByTag($tag): self
80 80
     {
81 81
         try {
82
-            return $this->filterBy('tags', (array) $tag);
82
+            return $this->filterBy('tags', (array)$tag);
83 83
         } catch (NonRegisteredManager $e) {
84 84
             return new static();
85 85
         }
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
         foreach ($registrations as $k => $registration) {
108 108
             $containsValue = $registration->has($key, $value);
109 109
 
110
-            if ($type == 'filter' && ! $containsValue) {
110
+            if ($type == 'filter' && !$containsValue) {
111 111
                 unset($registrations[$k]);
112 112
             }
113 113
 
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
     private function registrationMustExistConstraint(string $key, $value, $registrations): void
137 137
     {
138 138
         if (empty($registrations) && count($registrations) != $this->registrations) {
139
-            throw new NonRegisteredManager('No manager found for ' . $key . ' [' . print_r($value, true) . ']. Did you perhaps forgot to register the manager?');
139
+            throw new NonRegisteredManager('No manager found for '.$key.' ['.print_r($value, true).']. Did you perhaps forgot to register the manager?');
140 140
         }
141 141
     }
142 142
 }
Please login to merge, or discard this patch.
src/Fields/Types/SelectField.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 
4 4
 namespace Thinktomorrow\Chief\Fields\Types;
5 5
 
Please login to merge, or discard this patch.
src/Fields/Types/PagebuilderField.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 Thinktomorrow\Chief\Fields\Types;
6 6
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
         $value = parent::__get($key);
51 51
 
52 52
         // Default empty array for these following values
53
-        if (!$value && in_array($key, ['sections','availableModules','availablePages', 'availableSets'])) {
53
+        if (!$value && in_array($key, ['sections', 'availableModules', 'availablePages', 'availableSets'])) {
54 54
             return [];
55 55
         }
56 56
 
Please login to merge, or discard this patch.
src/Fields/Types/HtmlField.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 namespace Thinktomorrow\Chief\Fields\Types;
4 4
 
5 5
 class HtmlField extends Field
Please login to merge, or discard this patch.
src/Fields/Types/DateField.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 namespace Thinktomorrow\Chief\Fields\Types;
4 4
 
5 5
 class DateField extends Field
Please login to merge, or discard this patch.
src/Fields/FieldArrangement.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
 
48 48
     private function validateTabs(array $tabs)
49 49
     {
50
-        array_map(function (FieldsTab $tab) {
50
+        array_map(function(FieldsTab $tab) {
51 51
         }, $tabs);
52 52
     }
53 53
 
Please login to merge, or discard this patch.
src/Concerns/Morphable/GlobalMorphableScope.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 Thinktomorrow\Chief\Concerns\Morphable;
6 6
 
Please login to merge, or discard this patch.
src/Concerns/Morphable/Morphables.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
         }
17 17
 
18 18
         if (!class_exists($class)) {
19
-            throw new NotFoundMorphKey('No class found by morphkey [' . $class . ']. Make sure that the morphkey is a valid class reference.');
19
+            throw new NotFoundMorphKey('No class found by morphkey ['.$class.']. Make sure that the morphkey is a valid class reference.');
20 20
         }
21 21
 
22 22
         return new $class($attributes);
Please login to merge, or discard this patch.
src/Concerns/Morphable/Morphable.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
     public function scopeMorphable($query, string $morphkey = null)
33 33
     {
34 34
         return $query->withoutGlobalScope(static::globalMorphableScope())
35
-                     ->where('morph_key', '=', $morphkey);
35
+                        ->where('morph_key', '=', $morphkey);
36 36
     }
37 37
 
38 38
     /**
Please login to merge, or discard this patch.