Completed
Push — ft/remove-vendor ( 825fc6...4801b9 )
by Philippe
56:00 queued 47:37
created
src/HealthMonitor/Monitor.php 1 patch
Spacing   +4 added lines, -4 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\HealthMonitor;
6 6
 
@@ -17,14 +17,14 @@  discard block
 block discarded – undo
17 17
 
18 18
     public static function check()
19 19
     {
20
-        foreach(static::$checks as $check => $notifier)
20
+        foreach (static::$checks as $check => $notifier)
21 21
         {
22 22
             $checkInstance = app($check);
23 23
 
24
-            if(!$checkInstance->check()) {
24
+            if (!$checkInstance->check()) {
25 25
                 app($notifier)->onFailure($checkInstance);
26 26
                 return;
27
-            } else {
27
+            }else {
28 28
                 app($notifier)->onSuccess($checkInstance);
29 29
             }
30 30
         }
Please login to merge, or discard this patch.
src/Settings/Homepage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
     {
13 13
         $homepageValue = chiefSetting(Setting::HOMEPAGE, $locale);
14 14
 
15
-        if(!$homepageValue || !is_object($model) || !$model instanceof ProvidesFlatReference) {
15
+        if (!$homepageValue || !is_object($model) || !$model instanceof ProvidesFlatReference) {
16 16
             return false;
17 17
         }
18 18
 
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 
22 22
     public static function url($locale = null): string
23 23
     {
24
-        if($id = chiefSetting(Setting::HOMEPAGE, $locale))
24
+        if ($id = chiefSetting(Setting::HOMEPAGE, $locale))
25 25
         {
26 26
             return FlatReferenceFactory::fromString($id)->instance()->url($locale);
27 27
         }
Please login to merge, or discard this patch.
src/Fields/Types/Field.php 2 patches
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,10 +51,14 @@
 block discarded – undo
51 51
 
52 52
     public function required(): bool
53 53
     {
54
-        if(!$this->hasValidation()) return false;
54
+        if(!$this->hasValidation()) {
55
+            return false;
56
+        }
55 57
 
56 58
         foreach($this->values['validation'] as $rule){
57
-            if(false !== strpos($rule, 'required')) return true;
59
+            if(false !== strpos($rule, 'required')) {
60
+                return true;
61
+            }
58 62
         };
59 63
 
60 64
         return false;
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 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
 
@@ -51,10 +51,10 @@  discard block
 block discarded – undo
51 51
 
52 52
     public function required(): bool
53 53
     {
54
-        if(!$this->hasValidation()) return false;
54
+        if (!$this->hasValidation()) return false;
55 55
 
56
-        foreach($this->values['validation'] as $rule){
57
-            if(false !== strpos($rule, 'required')) return true;
56
+        foreach ($this->values['validation'] as $rule) {
57
+            if (false !== strpos($rule, 'required')) return true;
58 58
         };
59 59
 
60 60
         return false;
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
     public function optional(): bool 
64 64
     {
65
-        return ! $this->required();
65
+        return !$this->required();
66 66
     }
67 67
 
68 68
     public function name(string $name = null)
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
         }
192 192
 
193 193
         if (!in_array($name, ['label', 'key', 'description', 'column', 'name', 'prepend', 'append'])) {
194
-            throw new \InvalidArgumentException('Cannot set value by ['. $name .'].');
194
+            throw new \InvalidArgumentException('Cannot set value by ['.$name.'].');
195 195
         }
196 196
 
197 197
         $this->values[$name] = $arguments[0];
Please login to merge, or discard this patch.
src/HealthMonitor/Checks/HomepageAccessibleCheck.php 2 patches
Spacing   +3 added lines, -3 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\HealthMonitor\Checks;
6 6
 
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
     }
15 15
 
16 16
     private function get_http_response_code(string $url) {
17
-        if($url =='') return false;
17
+        if ($url == '') return false;
18 18
 
19 19
         // Avoid ssl errors: SSL operation failed with code 1
20 20
         stream_context_set_default([
@@ -30,6 +30,6 @@  discard block
 block discarded – undo
30 30
 
31 31
     public function message(): string
32 32
     {
33
-        return 'Het lijkt erop dat de homepagina niet meer bereikbaar is. <a href="'. route('chief.back.settings.edit') .'" class="text-secondary-800 underline hover:text-white">Kies een nieuwe</a>.';
33
+        return 'Het lijkt erop dat de homepagina niet meer bereikbaar is. <a href="'.route('chief.back.settings.edit').'" class="text-secondary-800 underline hover:text-white">Kies een nieuwe</a>.';
34 34
     }
35 35
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,9 @@
 block discarded – undo
14 14
     }
15 15
 
16 16
     private function get_http_response_code(string $url) {
17
-        if($url =='') return false;
17
+        if($url =='') {
18
+            return false;
19
+        }
18 20
 
19 21
         // Avoid ssl errors: SSL operation failed with code 1
20 22
         stream_context_set_default([
Please login to merge, or discard this patch.
src/Fields/Types/FieldType.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -6,18 +6,18 @@  discard block
 block discarded – undo
6 6
 
7 7
 class FieldType
8 8
 {
9
-    const INPUT = 'input';   // oneliner text (input)
10
-    const TEXT = 'text';    // Plain text (textarea)
9
+    const INPUT = 'input'; // oneliner text (input)
10
+    const TEXT = 'text'; // Plain text (textarea)
11 11
     const NUMBER = 'number'; // number
12 12
     const RANGE = 'range'; // range slider
13
-    const DATE = 'date';    // Timestamp input
14
-    const PHONENUMBER = 'phonenumber';    // Timestamp input
15
-    const HTML = 'html';    // Html text (wysiwyg)
16
-    const SELECT = 'select';  // Select options
17
-    const MEDIA = 'media';  // media file (slim uploader)
18
-    const DOCUMENT = 'document';  // documents
19
-    const RADIO = 'radio';  // media file (slim uploader)
20
-    const PAGEBUILDER = 'pagebuilder';  // the most special field there is...
13
+    const DATE = 'date'; // Timestamp input
14
+    const PHONENUMBER = 'phonenumber'; // Timestamp input
15
+    const HTML = 'html'; // Html text (wysiwyg)
16
+    const SELECT = 'select'; // Select options
17
+    const MEDIA = 'media'; // media file (slim uploader)
18
+    const DOCUMENT = 'document'; // documents
19
+    const RADIO = 'radio'; // media file (slim uploader)
20
+    const PAGEBUILDER = 'pagebuilder'; // the most special field there is...
21 21
 
22 22
     /**
23 23
      * @var string
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
             static::RADIO,
41 41
             static::PAGEBUILDER,
42 42
         ])) {
43
-            throw new \Exception('Invalid type identifier given [' . $type . '].');
43
+            throw new \Exception('Invalid type identifier given ['.$type.'].');
44 44
         }
45 45
 
46 46
         $this->type = $type;
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
     public static function fromString(string $type)
50 50
     {
51
-        $class = 'Thinktomorrow\Chief\Fields\Types\\' . ucfirst($type . 'Field');
51
+        $class = 'Thinktomorrow\Chief\Fields\Types\\'.ucfirst($type.'Field');
52 52
 
53 53
         return new $class(new static($type));
54 54
     }
Please login to merge, or discard this patch.
src/Fields/Types/PhoneNumberField.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/RangeField.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/NumberField.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.