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

Completed
Pull Request — master (#1504)
by Thomas
05:18
created
src/CrudTrait.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
      *
70 70
      * @param array $columns - the database columns that contain the JSONs
71 71
      *
72
-     * @return Model
72
+     * @return CrudTrait
73 73
      */
74 74
     public function withFakes($columns = [])
75 75
     {
Please login to merge, or discard this patch.
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,9 +3,9 @@
 block discarded – undo
3 3
 namespace Backpack\CRUD;
4 4
 
5 5
 use DB;
6
-use Traversable;
7
-use Illuminate\Support\Facades\Config;
8 6
 use Illuminate\Database\Eloquent\Model;
7
+use Illuminate\Support\Facades\Config;
8
+use Traversable;
9 9
 
10 10
 trait CrudTrait
11 11
 {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         $conn->getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('json', 'json_array');
58 58
         $conn->getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('jsonb', 'json_array');
59 59
 
60
-        return ! $conn->getDoctrineColumn($table, $column_name)->getNotnull();
60
+        return !$conn->getDoctrineColumn($table, $column_name)->getNotnull();
61 61
     }
62 62
 
63 63
     /*
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         foreach ($columns as $key => $column) {
77 77
             $column_contents = $this->{$column};
78 78
 
79
-            if (! is_object($this->{$column})) {
79
+            if (!is_object($this->{$column})) {
80 80
                 $column_contents = json_decode($this->{$column});
81 81
             }
82 82
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     {
100 100
         $model = '\\'.get_class($this);
101 101
 
102
-        if (! count($columns)) {
102
+        if (!count($columns)) {
103 103
             $columns = (property_exists($model, 'fakeColumns')) ? $this->fakeColumns : ['extras'];
104 104
         }
105 105
 
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      */
117 117
     public function shouldEncodeFake($column)
118 118
     {
119
-        return ! in_array($column, array_keys($this->casts));
119
+        return !in_array($column, array_keys($this->casts));
120 120
     }
121 121
 
122 122
     /*
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
             $attribute_value = (array) $this->{$attribute_name};
200 200
             foreach ($files_to_clear as $key => $filename) {
201 201
                 \Storage::disk($disk)->delete($filename);
202
-                $attribute_value = array_where($attribute_value, function ($value, $key) use ($filename) {
202
+                $attribute_value = array_where($attribute_value, function($value, $key) use ($filename) {
203 203
                     return $value != $filename;
204 204
                 });
205 205
             }
Please login to merge, or discard this patch.
src/resources/views-elfinder/filepicker.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
     <!-- Include jQuery, jQuery UI, elFinder (REQUIRED) -->
27 27
 
28 28
     <?php
29
-    $mimeTypes = implode(',', array_map(function ($t) {
29
+    $mimeTypes = implode(',', array_map(function($t) {
30 30
         return "'".$t."'";
31 31
     }, explode(',', $type)));
32 32
     ?>
Please login to merge, or discard this patch.
src/PanelTraits/ViewsAndRestoresRevisions.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
             $revisionDate = date('Y-m-d', strtotime((string) $history->created_at));
22 22
 
23 23
             // Be sure to instantiate the initial grouping array
24
-            if (! array_key_exists($revisionDate, $revisions)) {
24
+            if (!array_key_exists($revisionDate, $revisions)) {
25 25
                 $revisions[$revisionDate] = [];
26 26
             }
27 27
 
Please login to merge, or discard this patch.
src/app/Http/Controllers/CrudFeatures/Reorder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -174,7 +174,7 @@
 block discarded – undo
174 174
     {
175 175
         $this->crud->hasAccessOrFail('reorder');
176 176
 
177
-        if (! $this->crud->isReorderEnabled()) {
177
+        if (!$this->crud->isReorderEnabled()) {
178 178
             abort(403, 'Reorder is disabled.');
179 179
         }
180 180
 
Please login to merge, or discard this patch.
src/PanelTraits/AutoFocus.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -11,6 +11,9 @@
 block discarded – undo
11 11
         return $this->autoFocusOnFirstField;
12 12
     }
13 13
 
14
+    /**
15
+     * @param boolean $value
16
+     */
14 17
     public function setAutoFocusOnFirstField($value)
15 18
     {
16 19
         return $this->autoFocusOnFirstField = (bool) $value;
Please login to merge, or discard this patch.
src/resources/views/fields/video.blade.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <!-- text input -->
2 2
 <?php
3 3
 
4
-$value = old($field['name']) ? (old($field['name'])) : (isset($field['value']) ? ($field['value']) : (isset($field['default']) ? ($field['default']) : '' ));
4
+$value = old($field['name']) ? (old($field['name'])) : (isset($field['value']) ? ($field['value']) : (isset($field['default']) ? ($field['default']) : ''));
5 5
 
6 6
 // if attribute casting is used, convert to JSON
7 7
 if (is_array($value)) {
8
-    $value = json_encode((object)$value);
8
+    $value = json_encode((object) $value);
9 9
 } elseif (is_object($value)) {
10 10
     $value = json_encode($value);
11 11
 } else {
Please login to merge, or discard this patch.
src/PanelTraits/Filters.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@
 block discarded – undo
124 124
 
125 125
     /**
126 126
      * Determine if the current CRUD action is a list operation (using standard or ajax DataTables).
127
-     * @return bool
127
+     * @return boolean|null
128 128
      */
129 129
     public function doingListOperation()
130 130
     {
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 
9 9
     public function filtersEnabled()
10 10
     {
11
-        return ! is_array($this->filters);
11
+        return !is_array($this->filters);
12 12
     }
13 13
 
14 14
     public function filtersDisabled()
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         $this->enableFilters();
54 54
 
55 55
         // check if another filter with the same name exists
56
-        if (! isset($options['name'])) {
56
+        if (!isset($options['name'])) {
57 57
             abort(500, 'All your filters need names.');
58 58
         }
59 59
         if ($this->filters->contains('name', $options['name'])) {
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 
138 138
     public function removeFilter($name)
139 139
     {
140
-        $this->filters = $this->filters->reject(function ($filter) use ($name) {
140
+        $this->filters = $this->filters->reject(function($filter) use ($name) {
141 141
             return $filter->name == $name;
142 142
         });
143 143
     }
@@ -221,16 +221,16 @@  discard block
 block discarded – undo
221 221
 
222 222
     public function checkOptionsIntegrity($options)
223 223
     {
224
-        if (! isset($options['name'])) {
224
+        if (!isset($options['name'])) {
225 225
             abort(500, 'Please make sure all your filters have names.');
226 226
         }
227
-        if (! isset($options['type'])) {
227
+        if (!isset($options['type'])) {
228 228
             abort(500, 'Please make sure all your filters have types.');
229 229
         }
230
-        if (! \View::exists('crud::filters.'.$options['type'])) {
230
+        if (!\View::exists('crud::filters.'.$options['type'])) {
231 231
             abort(500, 'No filter view named "'.$options['type'].'.blade.php" was found.');
232 232
         }
233
-        if (! isset($options['label'])) {
233
+        if (!isset($options['label'])) {
234 234
             abort(500, 'Please make sure all your filters have labels.');
235 235
         }
236 236
     }
Please login to merge, or discard this patch.
src/resources/views/fields/date.blade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 <?php
4 4
 // if the column has been cast to Carbon or Date (using attribute casting)
5 5
 // get the value as a date string
6
-if (isset($field['value']) && ( $field['value'] instanceof \Carbon\Carbon || $field['value'] instanceof \Jenssegers\Date\Date )) {
6
+if (isset($field['value']) && ($field['value'] instanceof \Carbon\Carbon || $field['value'] instanceof \Jenssegers\Date\Date)) {
7 7
     $field['value'] = $field['value']->toDateString();
8 8
 }
9 9
 ?>
Please login to merge, or discard this patch.
src/resources/views/fields/datetime_picker.blade.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,11 +3,11 @@
 block discarded – undo
3 3
 <?php
4 4
 // if the column has been cast to Carbon or Date (using attribute casting)
5 5
 // get the value as a date string
6
-if (isset($field['value']) && ( $field['value'] instanceof \Carbon\Carbon || $field['value'] instanceof \Jenssegers\Date\Date )) {
6
+if (isset($field['value']) && ($field['value'] instanceof \Carbon\Carbon || $field['value'] instanceof \Jenssegers\Date\Date)) {
7 7
     $field['value'] = $field['value']->format('Y-m-d H:i:s');
8 8
 }
9 9
 
10
-    $field_language = isset($field['datetime_picker_options']['language'])?$field['datetime_picker_options']['language']:\App::getLocale();
10
+    $field_language = isset($field['datetime_picker_options']['language']) ? $field['datetime_picker_options']['language'] : \App::getLocale();
11 11
 ?>
12 12
 
13 13
 <div @include('crud::inc.field_wrapper_attributes') >
Please login to merge, or discard this patch.