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 — remove-bcrypt()-calls-use-Hash ( f87947 )
by Pedro
10:52
created
src/app/Library/Auth/ResetsPasswords.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
         // will update the password on an actual user model and persist it to the
46 46
         // database. Otherwise we will parse the error and return the response.
47 47
         $response = $this->broker()->reset(
48
-            $this->credentials($request), function ($user, $password) {
48
+            $this->credentials($request), function($user, $password) {
49 49
                 $this->resetPassword($user, $password);
50 50
             }
51 51
         );
Please login to merge, or discard this patch.
src/app/Library/Auth/VerifiesEmails.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,11 +34,11 @@
 block discarded – undo
34 34
      */
35 35
     public function verify(Request $request)
36 36
     {
37
-        if (! hash_equals((string) $request->route('id'), (string) $request->user()->getKey())) {
37
+        if (!hash_equals((string) $request->route('id'), (string) $request->user()->getKey())) {
38 38
             throw new AuthorizationException;
39 39
         }
40 40
 
41
-        if (! hash_equals((string) $request->route('hash'), sha1($request->user()->getEmailForVerification()))) {
41
+        if (!hash_equals((string) $request->route('hash'), sha1($request->user()->getEmailForVerification()))) {
42 42
             throw new AuthorizationException;
43 43
         }
44 44
 
Please login to merge, or discard this patch.
src/app/Models/Traits/HasFakeFields.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     public function addFakes($columns = ['extras'])
21 21
     {
22 22
         foreach ($columns as $key => $column) {
23
-            if (! isset($this->attributes[$column])) {
23
+            if (!isset($this->attributes[$column])) {
24 24
                 continue;
25 25
             }
26 26
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      */
70 70
     public function shouldDecodeFake($column)
71 71
     {
72
-        return ! in_array($column, array_keys($this->casts));
72
+        return !in_array($column, array_keys($this->casts));
73 73
     }
74 74
 
75 75
     /**
@@ -81,6 +81,6 @@  discard block
 block discarded – undo
81 81
      */
82 82
     public function shouldEncodeFake($column)
83 83
     {
84
-        return ! in_array($column, array_keys($this->casts));
84
+        return !in_array($column, array_keys($this->casts));
85 85
     }
86 86
 }
Please login to merge, or discard this patch.
src/app/Library/CrudPanel/Traits/Settings.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
      */
58 58
     public function settings()
59 59
     {
60
-        return Arr::sort($this->settings, function ($value, $key) {
60
+        return Arr::sort($this->settings, function($value, $key) {
61 61
             return $key;
62 62
         });
63 63
     }
Please login to merge, or discard this patch.
src/app/Library/CrudPanel/Traits/Search.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -224,10 +224,10 @@
 block discarded – undo
224 224
         // add the details_row button to the first column
225 225
         if ($this->getOperationSetting('detailsRow')) {
226 226
             $details_row_button = \View::make('crud::columns.inc.details_row_button')
227
-                                           ->with('crud', $this)
228
-                                           ->with('entry', $entry)
229
-                                           ->with('row_number', $rowNumber)
230
-                                           ->render();
227
+                                            ->with('crud', $this)
228
+                                            ->with('entry', $entry)
229
+                                            ->with('row_number', $rowNumber)
230
+                                            ->render();
231 231
             $row_items[0] = $details_row_button.$row_items[0];
232 232
         }
233 233
 
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -23,9 +23,9 @@  discard block
 block discarded – undo
23 23
      */
24 24
     public function applySearchTerm($searchTerm)
25 25
     {
26
-        return $this->query->where(function ($query) use ($searchTerm) {
26
+        return $this->query->where(function($query) use ($searchTerm) {
27 27
             foreach ($this->columns() as $column) {
28
-                if (! isset($column['type'])) {
28
+                if (!isset($column['type'])) {
29 29
                     abort(400, 'Missing column type when trying to apply search term.');
30 30
                 }
31 31
 
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 
86 86
                 case 'select':
87 87
                 case 'select_multiple':
88
-                    $query->orWhereHas($column['entity'], function ($q) use ($column, $searchTerm, $searchOperator) {
88
+                    $query->orWhereHas($column['entity'], function($q) use ($column, $searchTerm, $searchOperator) {
89 89
                         $q->where($this->getColumnWithTableNamePrefixed($q, $column['attribute']), $searchOperator, '%'.$searchTerm.'%');
90 90
                     });
91 91
                     break;
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
                 $column_number = (int) $order['column'];
110 110
                 $column_direction = (strtolower((string) $order['dir']) == 'asc' ? 'ASC' : 'DESC');
111 111
                 $column = $this->findColumnById($column_number);
112
-                if ($column['tableColumn'] && ! isset($column['orderLogic'])) {
112
+                if ($column['tableColumn'] && !isset($column['orderLogic'])) {
113 113
                     if (method_exists($this->model, 'translationEnabled') &&
114 114
                         $this->model->translationEnabled() &&
115 115
                         $this->model->isTranslatableAttribute($column['name']) &&
@@ -136,12 +136,12 @@  discard block
 block discarded – undo
136 136
         $table = $this->model->getTable();
137 137
         $key = $this->model->getKeyName();
138 138
 
139
-        $hasOrderByPrimaryKey = collect($orderBy)->some(function ($item) use ($key, $table) {
139
+        $hasOrderByPrimaryKey = collect($orderBy)->some(function($item) use ($key, $table) {
140 140
             return (isset($item['column']) && $item['column'] === $key)
141 141
                 || (isset($item['sql']) && str_contains($item['sql'], "$table.$key"));
142 142
         });
143 143
 
144
-        if (! $hasOrderByPrimaryKey) {
144
+        if (!$hasOrderByPrimaryKey) {
145 145
             $this->orderByWithPrefix($key, 'DESC');
146 146
         }
147 147
     }
@@ -320,13 +320,13 @@  discard block
 block discarded – undo
320 320
         if (isset($column['type'])) {
321 321
             // create a list of paths to column blade views
322 322
             // including the configured view_namespaces
323
-            $columnPaths = array_map(function ($item) use ($column) {
323
+            $columnPaths = array_map(function($item) use ($column) {
324 324
                 return $item.'.'.$column['type'];
325 325
             }, ViewNamespaces::getFor('columns'));
326 326
 
327 327
             // but always fall back to the stock 'text' column
328 328
             // if a view doesn't exist
329
-            if (! in_array('crud::columns.text', $columnPaths)) {
329
+            if (!in_array('crud::columns.text', $columnPaths)) {
330 330
                 $columnPaths[] = 'crud::columns.text';
331 331
             }
332 332
 
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
      */
366 366
     private function renderCellView($view, $column, $entry, $rowNumber = false)
367 367
     {
368
-        if (! view()->exists($view)) {
368
+        if (!view()->exists($view)) {
369 369
             $view = 'crud::columns.text'; // fallback to text column
370 370
         }
371 371
 
Please login to merge, or discard this patch.
src/app/Library/CrudPanel/CrudFilter.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -389,10 +389,12 @@
 block discarded – undo
389 389
         return $this->fallbackLogic($value);
390 390
     }
391 391
 
392
-    public function else($value)
392
+    public function else {
393
+        ($value)
393 394
     {
394 395
         return $this->fallbackLogic($value);
395 396
     }
397
+    }
396 398
 
397 399
     // ---------------
398 400
     // PRIVATE METHODS
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 
27 27
     public function __construct($options, $values, $logic, $fallbackLogic)
28 28
     {
29
-        if (! backpack_pro()) {
29
+        if (!backpack_pro()) {
30 30
             throw new BackpackProRequiredException('Filter');
31 31
         }
32 32
         // if filter exists
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      */
90 90
     public function wasNotApplied()
91 91
     {
92
-        return ! $this->applied;
92
+        return !$this->applied;
93 93
     }
94 94
 
95 95
     /**
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 
111 111
         $input = $input ?? new ParameterBag($this->crud()->getRequest()->all());
112 112
 
113
-        if (! $input->has($this->name)) {
113
+        if (!$input->has($this->name)) {
114 114
             // if fallback logic was supplied and is a closure
115 115
             if (is_callable($this->fallbackLogic)) {
116 116
                 return ($this->fallbackLogic)();
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
             $namespaces = array_merge([$this->viewNamespace], $namespaces);
153 153
         }
154 154
 
155
-        return array_map(function ($item) use ($type) {
155
+        return array_map(function($item) use ($type) {
156 156
             return $item.'.'.$type;
157 157
         }, $namespaces);
158 158
     }
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
      */
315 315
     public function values($value)
316 316
     {
317
-        $this->values = (! is_string($value) && is_callable($value)) ? $value() : $value;
317
+        $this->values = (!is_string($value) && is_callable($value)) ? $value() : $value;
318 318
 
319 319
         return $this->save();
320 320
     }
Please login to merge, or discard this patch.
src/app/Library/CrudPanel/Traits/Filters.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         $this->enableFilters();
73 73
 
74 74
         // check if another filter with the same name exists
75
-        if (! isset($options['name'])) {
75
+        if (!isset($options['name'])) {
76 76
             abort(500, 'All your filters need names.');
77 77
         }
78 78
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
     {
121 121
         $unappliedFilters = $this->filters()->where('applied', false);
122 122
         if ($unappliedFilters->count()) {
123
-            $unappliedFilters->each(function ($filter) {
123
+            $unappliedFilters->each(function($filter) {
124 124
                 $filter->apply();
125 125
             });
126 126
         }
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
     {
171 171
         $filter = $this->filters()->firstWhere('name', $name);
172 172
 
173
-        if (! $filter) {
173
+        if (!$filter) {
174 174
             abort(500, 'CRUD Filter "'.$name.'" not found. Please check the filter exists before you modify it.');
175 175
         }
176 176
 
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 
186 186
     public function replaceFilter($name, $newFilter)
187 187
     {
188
-        $newFilters = $this->filters()->map(function ($filter, $key) use ($name, $newFilter) {
188
+        $newFilters = $this->filters()->map(function($filter, $key) use ($name, $newFilter) {
189 189
             if ($filter->name != $name) {
190 190
                 return $filter;
191 191
             }
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 
199 199
     public function removeFilter($name)
200 200
     {
201
-        $strippedCollection = $this->filters()->reject(function ($filter) use ($name) {
201
+        $strippedCollection = $this->filters()->reject(function($filter) use ($name) {
202 202
             return $filter->name == $name;
203 203
         });
204 204
 
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
      */
242 242
     public function makeFirstFilter()
243 243
     {
244
-        if (! $this->filters()) {
244
+        if (!$this->filters()) {
245 245
             return false;
246 246
         }
247 247
 
@@ -271,15 +271,15 @@  discard block
 block discarded – undo
271 271
         $destinationFilter = $this->firstFilterWhere('name', $destination);
272 272
         $destinationKey = $this->getFilterKey($destination);
273 273
         $newDestinationKey = ($where == 'before' ? $destinationKey : $destinationKey + 1);
274
-        $newFilters = $this->filters()->filter(function ($value, $key) use ($target) {
274
+        $newFilters = $this->filters()->filter(function($value, $key) use ($target) {
275 275
             return $value->name != $target;
276 276
         });
277 277
 
278
-        if (! $targetFilter) {
278
+        if (!$targetFilter) {
279 279
             return;
280 280
         }
281 281
 
282
-        if (! $destinationFilter) {
282
+        if (!$destinationFilter) {
283 283
             return;
284 284
         }
285 285
 
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
         $lastSlice = $newFilters->slice($newDestinationKey, null);
288 288
 
289 289
         $newFilters = $firstSlice->push($targetFilter);
290
-        $lastSlice->each(function ($item, $key) use ($newFilters) {
290
+        $lastSlice->each(function($item, $key) use ($newFilters) {
291 291
             $newFilters->push($item);
292 292
         });
293 293
 
Please login to merge, or discard this patch.
config/database/migrations/2017_09_08_000001_create_addresses_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('addresses', function (Blueprint $table) {
16
+        Schema::create('addresses', function(Blueprint $table) {
17 17
             $table->increments('id');
18 18
             $table->integer('account_details_id')->unsigned();
19 19
             $table->string('city')->nullable();
Please login to merge, or discard this patch.
src/app/Http/Controllers/Operations/ShowOperation.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -30,25 +30,25 @@
 block discarded – undo
30 30
         $this->crud->allowAccess('show');
31 31
         $this->crud->setOperationSetting('setFromDb', true);
32 32
 
33
-        $this->crud->operation('show', function () {
33
+        $this->crud->operation('show', function() {
34 34
             $this->crud->loadDefaultOperationSettingsFromConfig();
35 35
 
36
-            if (! method_exists($this, 'setupShowOperation')) {
36
+            if (!method_exists($this, 'setupShowOperation')) {
37 37
                 $this->autoSetupShowOperation();
38 38
             }
39 39
         });
40 40
 
41
-        $this->crud->operation('list', function () {
41
+        $this->crud->operation('list', function() {
42 42
             $this->crud->addButton('line', 'show', 'view', 'crud::buttons.show', 'beginning');
43 43
         });
44 44
 
45
-        $this->crud->operation(['create', 'update'], function () {
45
+        $this->crud->operation(['create', 'update'], function() {
46 46
             $this->crud->addSaveAction([
47 47
                 'name' => 'save_and_preview',
48
-                'visible' => function ($crud) {
48
+                'visible' => function($crud) {
49 49
                     return $crud->hasAccess('show');
50 50
                 },
51
-                'redirect' => function ($crud, $request, $itemId = null) {
51
+                'redirect' => function($crud, $request, $itemId = null) {
52 52
                     $itemId = $itemId ?: $request->input('id');
53 53
                     $redirectUrl = $crud->route.'/'.$itemId.'/show';
54 54
                     if ($request->has('_locale')) {
Please login to merge, or discard this patch.