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
Pull Request — main (#5596)
by Pedro
43:45 queued 28:51
created
src/app/Library/CrudPanel/Traits/Search.php 1 patch
Spacing   +9 added lines, -9 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
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
                 case 'select':
86 86
                 case 'select_multiple':
87
-                    $query->orWhereHas($column['entity'], function ($q) use ($column, $searchTerm, $searchOperator) {
87
+                    $query->orWhereHas($column['entity'], function($q) use ($column, $searchTerm, $searchOperator) {
88 88
                         $q->where($this->getColumnWithTableNamePrefixed($q, $column['attribute']), $searchOperator, '%'.$searchTerm.'%');
89 89
                     });
90 90
                     break;
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
                 $column_direction = (strtolower((string) $order['dir']) == 'asc' ? 'ASC' : 'DESC');
109 109
                 $column = $this->findColumnById($column_number);
110 110
 
111
-                if ($column['tableColumn'] && ! isset($column['orderLogic'])) {
111
+                if ($column['tableColumn'] && !isset($column['orderLogic'])) {
112 112
                     if (method_exists($this->model, 'translationEnabled') &&
113 113
                         $this->model->translationEnabled() &&
114 114
                         $this->model->isTranslatableAttribute($column['name']) &&
@@ -135,12 +135,12 @@  discard block
 block discarded – undo
135 135
         $table = $this->model->getTable();
136 136
         $key = $this->model->getKeyName();
137 137
 
138
-        $hasOrderByPrimaryKey = collect($orderBy)->some(function ($item) use ($key, $table) {
138
+        $hasOrderByPrimaryKey = collect($orderBy)->some(function($item) use ($key, $table) {
139 139
             return (isset($item['column']) && $item['column'] === $key)
140 140
                 || (isset($item['sql']) && str_contains($item['sql'], "$table.$key"));
141 141
         });
142 142
 
143
-        if (! $hasOrderByPrimaryKey) {
143
+        if (!$hasOrderByPrimaryKey) {
144 144
             $this->orderByWithPrefix($key, 'DESC');
145 145
         }
146 146
     }
@@ -319,13 +319,13 @@  discard block
 block discarded – undo
319 319
         if (isset($column['type'])) {
320 320
             // create a list of paths to column blade views
321 321
             // including the configured view_namespaces
322
-            $columnPaths = array_map(function ($item) use ($column) {
322
+            $columnPaths = array_map(function($item) use ($column) {
323 323
                 return $item.'.'.$column['type'];
324 324
             }, ViewNamespaces::getFor('columns'));
325 325
 
326 326
             // but always fall back to the stock 'text' column
327 327
             // if a view doesn't exist
328
-            if (! in_array('crud::columns.text', $columnPaths)) {
328
+            if (!in_array('crud::columns.text', $columnPaths)) {
329 329
                 $columnPaths[] = 'crud::columns.text';
330 330
             }
331 331
 
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
      */
365 365
     private function renderCellView($view, $column, $entry, $rowNumber = false)
366 366
     {
367
-        if (! view()->exists($view)) {
367
+        if (!view()->exists($view)) {
368 368
             $view = 'crud::columns.text'; // fallback to text column
369 369
         }
370 370
 
Please login to merge, or discard this patch.
tests/Unit/CrudPanel/CrudPanelSearchTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         $this->crudPanel->addColumn([
91 91
             'name' => 'test',
92 92
             'type' => 'my_custom_type',
93
-            'searchLogic' => function ($query, $column, $searchTerm) {
93
+            'searchLogic' => function($query, $column, $searchTerm) {
94 94
                 $query->where($column['name'], 'like', "%{$searchTerm}%");
95 95
             },
96 96
             'tableColumn' => true,
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
             'name' => 'name',
226 226
             'type' => 'text',
227 227
             'tableColumn' => true,
228
-            'orderLogic' => function ($query, $column, $searchTerm) {
228
+            'orderLogic' => function($query, $column, $searchTerm) {
229 229
                 $query->orderBy('name', 'asc');
230 230
             },
231 231
         ]);
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
             'name' => 'name',
245 245
             'type' => 'text',
246 246
             'tableColumn' => true,
247
-            'orderLogic' => function ($query, $column, $searchTerm) {
247
+            'orderLogic' => function($query, $column, $searchTerm) {
248 248
                 $query->orderBy('id', 'asc');
249 249
             },
250 250
         ]);
Please login to merge, or discard this patch.