Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Passed
Push — upload-validation ( 199e68...d8ff11 )
by Pedro
11:25
created
src/app/Library/Uploaders/Validation/ValidBackpackUpload.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
     public static function make(): self
31 31
     {
32
-        $instance =  new static();
32
+        $instance = new static();
33 33
         $entry = CrudPanelFacade::getCurrentEntry();
34 34
         $instance->entry = $entry !== false ? $entry : null;
35 35
         return $instance;
@@ -76,13 +76,13 @@  discard block
 block discarded – undo
76 76
     /**
77 77
      * Set the rules that apply to the "array" aka the field, if it's required, min, max etc.
78 78
      */
79
-    public function arrayRules(string|array|File $rules): self
79
+    public function arrayRules(string | array | File $rules): self
80 80
     {
81 81
         if (is_string($rules)) {
82 82
             $rules = explode('|', $rules);
83 83
         }
84 84
 
85
-        if (! in_array('array', $rules)) {
85
+        if (!in_array('array', $rules)) {
86 86
             $rules[] = 'array';
87 87
         }
88 88
 
@@ -94,12 +94,12 @@  discard block
 block discarded – undo
94 94
     /**
95 95
      * Set the rules that apply to the files beeing uploaded.
96 96
      */
97
-    public function fileRules(string|array|File $rules): self
97
+    public function fileRules(string | array | File $rules): self
98 98
     {
99 99
         if (is_string($rules)) {
100 100
             $rules = explode('|', $rules);
101 101
         }
102
-        if (! is_array($rules)) {
102
+        if (!is_array($rules)) {
103 103
             $rules = [$rules];
104 104
         }
105 105
         $this->fileRules = $rules;
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
     protected function validateFiles($attribute, $files, $fail)
119 119
     {
120 120
         foreach ($files as $file) {
121
-            if(!is_file($file)) {
121
+            if (!is_file($file)) {
122 122
                 continue;
123 123
             }
124 124
             $validator = Validator::make([$attribute => $file], [
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
             ], $this->validator->customMessages, $this->validator->customAttributes);
127 127
 
128 128
             if ($validator->fails()) {
129
-                foreach($validator->errors()->messages()[$attribute] as $message) {
129
+                foreach ($validator->errors()->messages()[$attribute] as $message) {
130 130
                     $fail($message);
131 131
                 };
132 132
             }
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
         ], $this->validator->customMessages, $this->validator->customAttributes);
151 151
 
152 152
         if ($validator->fails()) {
153
-            foreach($validator->errors()->messages()[$attribute] as $message) {
153
+            foreach ($validator->errors()->messages()[$attribute] as $message) {
154 154
                 $fail($message);
155 155
             };
156 156
         }
Please login to merge, or discard this patch.
src/app/Library/Uploaders/Validation/ValidUploadMultiple.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,10 +17,10 @@  discard block
 block discarded – undo
17 17
      */
18 18
     public function validate(string $attribute, mixed $value, Closure $fail): void
19 19
     {
20
-        if (! is_array($value)) {
20
+        if (!is_array($value)) {
21 21
             try {
22 22
                 $value = json_decode($value, true);
23
-            } catch(\Exception $e) {
23
+            } catch (\Exception $e) {
24 24
                 $fail('Unable to determine the value type');
25 25
 
26 26
                 return;
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
         $value = array_merge($previousValues, $value);
43 43
 
44 44
         // if user uploaded something add it to the data beeing validated.
45
-        if(!empty($value)) {
45
+        if (!empty($value)) {
46 46
             $this->data[$attribute] = $value;
47 47
         }
48 48
        
Please login to merge, or discard this patch.