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 (#1935)
by Cristian
06:00 queued 03:19
created
src/CrudUsageStats.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
      * Check if the application is running in normal conditions
11 11
      * (production env, not in console, not in unit tests).
12 12
      *
13
-     * @return void
13
+     * @return boolean
14 14
      */
15 15
     private function runningInProduction()
16 16
     {
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
      * @param  string $method  HTTP Method to use for the request.
87 87
      * @param  string $url     URL to point the request at.
88 88
      * @param  array $payload  The data you want sent to the URL.
89
-     * @return void
89
+     * @return boolean
90 90
      */
91 91
     private function makeCurlRequest($method, $url, $payload)
92 92
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
     private function sendUsageStats()
39 39
     {
40 40
         // only send usage stats in production
41
-        if (! $this->runningInProduction()) {
41
+        if (!$this->runningInProduction()) {
42 42
             return;
43 43
         }
44 44
 
Please login to merge, or discard this patch.
src/PanelTraits/Search.php 4 patches
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,6 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
     /**
37 37
      * Apply the search logic for each CRUD column.
38
+     * @param string $searchTerm
38 39
      */
39 40
     public function applySearchLogicForColumn($query, $column, $searchTerm)
40 41
     {
@@ -230,7 +231,7 @@  discard block
 block discarded – undo
230 231
      *
231 232
      * @param string   $view
232 233
      * @param array    $column
233
-     * @param object   $entry
234
+     * @param \Illuminate\Database\Eloquent\Model   $entry
234 235
      * @param bool|int $rowNumber The number shown to the user as row number (index)
235 236
      *
236 237
      * @return string
Please login to merge, or discard this patch.
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 namespace Backpack\CRUD\PanelTraits;
4 4
 
5
-use Validator;
6 5
 use Carbon\Carbon;
6
+use Validator;
7 7
 
8 8
 trait Search
9 9
 {
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -210,10 +210,10 @@
 block discarded – undo
210 210
         // add the details_row button to the first column
211 211
         if ($this->getOperationSetting('detailsRow')) {
212 212
             $details_row_button = \View::make('crud::columns.details_row_button')
213
-                                           ->with('crud', $this)
214
-                                           ->with('entry', $entry)
215
-                                           ->with('row_number', $rowNumber)
216
-                                           ->render();
213
+                                            ->with('crud', $this)
214
+                                            ->with('entry', $entry)
215
+                                            ->with('row_number', $rowNumber)
216
+                                            ->render();
217 217
             $row_items[0] = $details_row_button.$row_items[0];
218 218
         }
219 219
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,9 +22,9 @@  discard block
 block discarded – undo
22 22
      */
23 23
     public function applySearchTerm($searchTerm)
24 24
     {
25
-        return $this->query->where(function ($query) use ($searchTerm) {
25
+        return $this->query->where(function($query) use ($searchTerm) {
26 26
             foreach ($this->columns() as $column) {
27
-                if (! isset($column['type'])) {
27
+                if (!isset($column['type'])) {
28 28
                     abort(400, 'Missing column type when trying to apply search term.');
29 29
                 }
30 30
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
                 case 'select':
84 84
                 case 'select_multiple':
85
-                    $query->orWhereHas($column['entity'], function ($q) use ($column, $searchTerm) {
85
+                    $query->orWhereHas($column['entity'], function($q) use ($column, $searchTerm) {
86 86
                         $q->where($column['attribute'], 'like', '%'.$searchTerm.'%');
87 87
                     });
88 88
                     break;
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
      */
275 275
     private function renderCellView($view, $column, $entry, $rowNumber = false)
276 276
     {
277
-        if (! view()->exists($view)) {
277
+        if (!view()->exists($view)) {
278 278
             $view = 'crud::columns.text'; // fallback to text column
279 279
         }
280 280
 
Please login to merge, or discard this patch.
tests/Unit/CrudPanel/CrudPanelTabsTest.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 namespace Backpack\CRUD\Tests\Unit\CrudPanel;
4 4
 
5
-use Illuminate\Support\Facades\DB;
6 5
 use Backpack\CRUD\Tests\Unit\Models\Article;
6
+use Illuminate\Support\Facades\DB;
7 7
 
8 8
 class CrudPanelTabsTest extends BaseDBCrudPanelTest
9 9
 {
Please login to merge, or discard this patch.
src/resources/views/fields/select2_nested.blade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 <div @include('crud::inc.field_wrapper_attributes') >
3 3
     <label>{!! $field['label'] !!}</label>
4 4
     @include('crud::inc.field_translatable_icon')
5
-    <?php $entity_model = $crud->getRelationModel($field['entity'],  - 1); ?>
5
+    <?php $entity_model = $crud->getRelationModel($field['entity'], - 1); ?>
6 6
     <select
7 7
         name="{{ $field['name'] }}"
8 8
         style="width: 100%"
Please login to merge, or discard this patch.
src/resources/views/fields/video.blade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
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/Query.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
      * Order results of the query in a custom way.
63 63
      *
64 64
      * @param  array $column           Column array with all attributes
65
-     * @param  string $column_direction ASC or DESC
65
+     * @param  string $columnDirection ASC or DESC
66 66
      *
67 67
      * @return \Illuminate\Database\Eloquent\Builder
68 68
      */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
      */
69 69
     public function customOrderBy($column, $columnDirection = 'asc')
70 70
     {
71
-        if (! isset($column['orderLogic'])) {
71
+        if (!isset($column['orderLogic'])) {
72 72
             return $this->query;
73 73
         }
74 74
 
Please login to merge, or discard this patch.
src/resources/views/columns/array_count.blade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 
6 6
 <span>
7 7
     <?php
8
-    $suffix = isset($column['suffix'])?$column['suffix']:'items';
8
+    $suffix = isset($column['suffix']) ? $column['suffix'] : 'items';
9 9
 
10 10
     // the value should be an array wether or not attribute casting is used
11 11
     if (!is_array($array)) {
Please login to merge, or discard this patch.
src/helpers.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
-if (! function_exists('square_brackets_to_dots')) {
3
+if (!function_exists('square_brackets_to_dots')) {
4 4
     /**
5 5
      * Turns a string from bracket-type array to dot-notation array.
6 6
      * Ex: array[0][property] turns into array.0.property.
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     }
18 18
 }
19 19
 
20
-if (! function_exists('is_countable')) {
20
+if (!function_exists('is_countable')) {
21 21
     /**
22 22
      * We need this because is_countable was only introduced in PHP 7.3,
23 23
      * and in PHP 7.2 you should check if count() argument is really countable.
Please login to merge, or discard this patch.
src/resources/views/columns/select_from_array.blade.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -5,24 +5,24 @@
 block discarded – undo
5 5
 
6 6
 <span>
7 7
 	<?php
8
-		if ($values !== null) {
9
-			if (is_array($values)) {
10
-				$array_of_values = [];
8
+        if ($values !== null) {
9
+            if (is_array($values)) {
10
+                $array_of_values = [];
11 11
 
12
-				foreach ($values as $key => $value) {
13
-					$array_of_values[] = $column['options'][$value];
14
-				}
12
+                foreach ($values as $key => $value) {
13
+                    $array_of_values[] = $column['options'][$value];
14
+                }
15 15
 
16
-				if (count($array_of_values) > 1) {
17
-					echo implode(', ', $array_of_values);
18
-				} else {
19
-					echo $array_of_values;
20
-				}
21
-			} else {
22
-				echo $column['options'][$values];
23
-			}
24
-	    } else {
25
-	    	echo "-";
26
-	    }
27
-	?>
16
+                if (count($array_of_values) > 1) {
17
+                    echo implode(', ', $array_of_values);
18
+                } else {
19
+                    echo $array_of_values;
20
+                }
21
+            } else {
22
+                echo $column['options'][$values];
23
+            }
24
+        } else {
25
+            echo "-";
26
+        }
27
+    ?>
28 28
 </span>
29 29
\ No newline at end of file
Please login to merge, or discard this patch.