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 (#136)
by Owen
02:46
created
src/app/Http/Controllers/CrudController.php 2 patches
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -356,38 +356,38 @@
 block discarded – undo
356 356
         return $dataTable->make();
357 357
     }
358 358
 
359
-     /**
360
-      * Checks if the given string is unique, and return existing entity.
361
-      * @return JSON containing success, message and data.
362
-      */
363
-     public function unicity()
364
-     {
365
-         $response = ['success' => false, 'message' => trans('backpack::crud.unique_error'), 'meta' => ['link' => null, 'snippet' => null, 'entity_key' => null]];
366
-
367
-         $field_name = \Request::input('field_name', null);
368
-         $check_value = \Request::input('check_value', null);
369
-         $display_name = \Request::input('display_name', null);
370
-
371
-         if (empty($field_name)) {
372
-             $response['message'] = trans('backpack::crud.unique_field_name_missing');
373
-         } elseif (empty($check_value) && $check_value !== '0') {
374
-             $response['message'] = trans('backpack::crud.unique_check_value_missing');
375
-         } else {
376
-             $existing_entity = $this->crud->model->where([$field_name => $check_value])->first();
377
-
378
-             if (! $existing_entity) {
379
-                 $response['success'] = true;
380
-                 $response['message'] = null;
381
-             } else {
382
-                 $response['message'] = $this->crud->entity_name.' '.trans('backpack::crud.unique_exists');
383
-                 $response['meta'] = [
359
+        /**
360
+         * Checks if the given string is unique, and return existing entity.
361
+         * @return JSON containing success, message and data.
362
+         */
363
+        public function unicity()
364
+        {
365
+            $response = ['success' => false, 'message' => trans('backpack::crud.unique_error'), 'meta' => ['link' => null, 'snippet' => null, 'entity_key' => null]];
366
+
367
+            $field_name = \Request::input('field_name', null);
368
+            $check_value = \Request::input('check_value', null);
369
+            $display_name = \Request::input('display_name', null);
370
+
371
+            if (empty($field_name)) {
372
+                $response['message'] = trans('backpack::crud.unique_field_name_missing');
373
+            } elseif (empty($check_value) && $check_value !== '0') {
374
+                $response['message'] = trans('backpack::crud.unique_check_value_missing');
375
+            } else {
376
+                $existing_entity = $this->crud->model->where([$field_name => $check_value])->first();
377
+
378
+                if (! $existing_entity) {
379
+                    $response['success'] = true;
380
+                    $response['message'] = null;
381
+                } else {
382
+                    $response['message'] = $this->crud->entity_name.' '.trans('backpack::crud.unique_exists');
383
+                    $response['meta'] = [
384 384
                     'link' => url($this->crud->route.'/'.$existing_entity->getKey().'/edit'),
385 385
                     'snippet' => $display_name ? $existing_entity->{$display_name} : $this->crud->entity_name,
386 386
                     'entity_key' => $existing_entity->getKey(),
387 387
                 ];
388
-             }
389
-         }
388
+                }
389
+            }
390 390
 
391
-         return $response;
392
-     }
391
+            return $response;
392
+        }
393 393
 }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         $this->data['title'] = ucfirst($this->crud->entity_name_plural);
38 38
 
39 39
         // get all entries if AJAX is not enabled
40
-        if (! $this->data['crud']->ajaxTable()) {
40
+        if (!$this->data['crud']->ajaxTable()) {
41 41
             $this->data['entries'] = $this->data['crud']->getEntries();
42 42
         }
43 43
 
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
         // is somewhat superfluous.. however if we are POSTing, it makes sense to actually have data to post.
220 220
         // Perhaps the route shoud be better named to reflect this (e.g. just /model/{id}/revisions) (??)
221 221
         $revisionId = \Request::input('revision_id', false);
222
-        if (! $revisionId) {
222
+        if (!$revisionId) {
223 223
             abort(500, 'Can\'t restore revision without revision_id');
224 224
         } else {
225 225
             $this->crud->restoreRevision($id, $revisionId); // do the update
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
     {
260 260
         $this->crud->hasAccessOrFail('reorder');
261 261
 
262
-        if (! $this->crud->isReorderEnabled()) {
262
+        if (!$this->crud->isReorderEnabled()) {
263 263
             abort(403, 'Reorder is disabled.');
264 264
         }
265 265
 
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
         $dataTable = new DataTable($this->crud->query, $columns);
331 331
 
332 332
         // make the datatable use the column types instead of just echoing the text
333
-        $dataTable->setFormatRowFunction(function ($entry) {
333
+        $dataTable->setFormatRowFunction(function($entry) {
334 334
             // get the actual HTML for each row's cell
335 335
             $row_items = $this->crud->getRowViews($entry, $this->crud);
336 336
 
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
          } else {
376 376
              $existing_entity = $this->crud->model->where([$field_name => $check_value])->first();
377 377
 
378
-             if (! $existing_entity) {
378
+             if (!$existing_entity) {
379 379
                  $response['success'] = true;
380 380
                  $response['message'] = null;
381 381
              } else {
Please login to merge, or discard this patch.