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
Branch master (f5b2f7)
by Cristian
04:05
created
src/app/Http/Controllers/CrudController.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 		// if it's a relationship with a pivot table, also sync that
129 129
 		$this->prepareFields();
130 130
 		foreach ($this->crud['fields'] as $k => $field) {
131
-			if (isset($field['pivot']) && $field['pivot']==true && \Request::has($field['name']))
131
+			if (isset($field['pivot']) && $field['pivot'] == true && \Request::has($field['name']))
132 132
 			{
133 133
 				$model::find($item->id)->$field['name']()->attach(\Request::input($field['name']));
134 134
 			}
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 
206 206
 		// if it's a relationship with a pivot table, also sync that
207 207
 		foreach ($this->crud['fields'] as $k => $field) {
208
-			if (isset($field['pivot']) && $field['pivot']==true && \Request::has($field['name']))
208
+			if (isset($field['pivot']) && $field['pivot'] == true && \Request::has($field['name']))
209 209
 			{
210 210
 				$model::find(\Request::input('id'))->$field['name']()->sync(\Request::input($field['name']));
211 211
 			}
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
 			$this->data['languages'] = \Backpack\LangFileManager\app\Models\Language::all();
366 366
 			$this->data['languages_already_translated_in'] = $this->data['entry']->translationLanguages();
367 367
 			$this->data['languages_to_translate_in'] = $this->data['languages']->diff($this->data['languages_already_translated_in']);
368
-			$this->data['languages_to_translate_in'] = $this->data['languages_to_translate_in']->reject(function ($item) {
368
+			$this->data['languages_to_translate_in'] = $this->data['languages_to_translate_in']->reject(function($item) {
369 369
 			    return $item->abbr == \Lang::locale();
370 370
 			});
371 371
 		}
@@ -428,13 +428,13 @@  discard block
 block discarded – undo
428 428
 		// go through each defined field
429 429
 		foreach ($this->crud['fields'] as $k => $field) {
430 430
 			// if it's a fake field
431
-			if (isset($this->crud['fields'][$k]['fake']) && $this->crud['fields'][$k]['fake']==true) {
431
+			if (isset($this->crud['fields'][$k]['fake']) && $this->crud['fields'][$k]['fake'] == true) {
432 432
 				// add it to the request in its appropriate variable - the one defined, if defined
433 433
 				if (isset($this->crud['fields'][$k]['store_in'])) {
434 434
 					$request[$this->crud['fields'][$k]['store_in']][$this->crud['fields'][$k]['name']] = $request[$this->crud['fields'][$k]['name']];
435 435
 
436 436
 					$remove_fake_field = array_pull($request, $this->crud['fields'][$k]['name']);
437
-					if(!in_array($this->crud['fields'][$k]['store_in'], $fake_field_columns_to_encode, true)){
437
+					if (!in_array($this->crud['fields'][$k]['store_in'], $fake_field_columns_to_encode, true)) {
438 438
 				        array_push($fake_field_columns_to_encode, $this->crud['fields'][$k]['store_in']);
439 439
 				    }
440 440
 				}
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
 					$request['extras'][$this->crud['fields'][$k]['name']] = $request[$this->crud['fields'][$k]['name']];
444 444
 
445 445
 					$remove_fake_field = array_pull($request, $this->crud['fields'][$k]['name']);
446
-					if(!in_array('extras', $fake_field_columns_to_encode, true)){
446
+					if (!in_array('extras', $fake_field_columns_to_encode, true)) {
447 447
 				        array_push($fake_field_columns_to_encode, 'extras');
448 448
 				    }
449 449
 				}
@@ -476,16 +476,16 @@  discard block
 block discarded – undo
476 476
 
477 477
 		foreach ($this->crud['fields'] as $k => $field) {
478 478
 			// if it's a fake field
479
-			if (isset($this->crud['fields'][$k]['fake']) && $this->crud['fields'][$k]['fake']==true) {
479
+			if (isset($this->crud['fields'][$k]['fake']) && $this->crud['fields'][$k]['fake'] == true) {
480 480
 				// add it to the request in its appropriate variable - the one defined, if defined
481 481
 				if (isset($this->crud['fields'][$k]['store_in'])) {
482
-					if(!in_array($this->crud['fields'][$k]['store_in'], $fake_field_columns_to_encode, true)){
482
+					if (!in_array($this->crud['fields'][$k]['store_in'], $fake_field_columns_to_encode, true)) {
483 483
 				        array_push($fake_field_columns_to_encode, $this->crud['fields'][$k]['store_in']);
484 484
 				    }
485 485
 				}
486 486
 				else //otherwise in the one defined in the $crud variable
487 487
 				{
488
-					if(!in_array('extras', $fake_field_columns_to_encode, true)){
488
+					if (!in_array('extras', $fake_field_columns_to_encode, true)) {
489 489
 				        array_push($fake_field_columns_to_encode, 'extras');
490 490
 				    }
491 491
 				}
Please login to merge, or discard this patch.
src/CrudServiceProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,11 +32,11 @@  discard block
 block discarded – undo
32 32
 
33 33
         // PUBLISH FILES
34 34
         // publish lang files
35
-        $this->publishes([ __DIR__.'/resources/lang' => resource_path('lang/vendor/backpack'), ], 'lang');
35
+        $this->publishes([__DIR__.'/resources/lang' => resource_path('lang/vendor/backpack'), ], 'lang');
36 36
         // publish views
37
-        $this->publishes([ __DIR__.'/resources/views' => resource_path('views/vendor/backpack/crud'), ], 'views');
37
+        $this->publishes([__DIR__.'/resources/views' => resource_path('views/vendor/backpack/crud'), ], 'views');
38 38
         // publish public Backpack CRUD assets
39
-        $this->publishes([ __DIR__.'/public' => public_path('vendor/backpack'), ], 'public');
39
+        $this->publishes([__DIR__.'/public' => public_path('vendor/backpack'), ], 'public');
40 40
         // publish custom files for elFinder
41 41
         $this->publishes([
42 42
                             __DIR__.'/config/elfinder.php' => config_path('elfinder.php'),
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
     private function registerCRUD()
75 75
     {
76
-        $this->app->bind('CRUD',function($app){
76
+        $this->app->bind('CRUD', function($app) {
77 77
             return new CRUD($app);
78 78
         });
79 79
     }
Please login to merge, or discard this patch.
src/resources/views-elfinder/elfinder.blade.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
     <!-- elFinder JS (REQUIRED) -->
15 15
     <script src="<?= asset($dir.'/js/elfinder.min.js') ?>"></script>
16 16
 
17
-    <?php if($locale){ ?>
17
+    <?php if ($locale) { ?>
18 18
     <!-- elFinder translation (OPTIONAL) -->
19 19
     <script src="<?= asset($dir."/js/i18n/elfinder.$locale.js") ?>"></script>
20 20
     <?php } ?>
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
         $().ready(function() {
27 27
             $('#elfinder').elfinder({
28 28
                 // set your elFinder options here
29
-                <?php if($locale){ ?>
29
+                <?php if ($locale) { ?>
30 30
                     lang: '<?= $locale ?>', // locale
31 31
                 <?php } ?>
32 32
                 customData: {
Please login to merge, or discard this patch.
src/resources/views-elfinder/ckeditor4.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     <!-- elFinder JS (REQUIRED) -->
18 18
     <script src="<?= asset($dir.'/js/elfinder.min.js') ?>"></script>
19 19
 
20
-    <?php if($locale){ ?>
20
+    <?php if ($locale) { ?>
21 21
         <!-- elFinder translation (OPTIONAL) -->
22 22
         <script src="<?= asset($dir."/js/i18n/elfinder.$locale.js") ?>"></script>
23 23
     <?php } ?>
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
             var elf = $('#elfinder').elfinder({
39 39
                 // set your elFinder options here
40
-                <?php if($locale){ ?>
40
+                <?php if ($locale) { ?>
41 41
                     lang: '<?= $locale ?>', // locale
42 42
                 <?php } ?>
43 43
                 customData: {
Please login to merge, or discard this patch.
src/resources/views-elfinder/tinymce.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     <!-- TinyMCE Popup class (REQUIRED) -->
22 22
     <script type="text/javascript" src="<?= asset($dir.'/js/tiny_mce_popup.js') ?>"></script>
23 23
 
24
-    <?php if($locale){ ?>
24
+    <?php if ($locale) { ?>
25 25
         <!-- elFinder translation (OPTIONAL) -->
26 26
         <script src="<?= asset($dir."/js/i18n/elfinder.$locale.js") ?>"></script>
27 27
     <?php } ?>
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
         $().ready(function() {
61 61
             var elf = $('#elfinder').elfinder({
62 62
                 // set your elFinder options here
63
-                <?php if($locale){ ?>
63
+                <?php if ($locale) { ?>
64 64
                     lang: '<?= $locale ?>', // locale
65 65
                 <?php } ?>
66 66
                 customData: {
Please login to merge, or discard this patch.
src/resources/views-elfinder/filepicker.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -10,28 +10,28 @@
 block discarded – undo
10 10
     <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
11 11
 
12 12
     <!-- elFinder CSS (REQUIRED) -->
13
-    <link rel="stylesheet" type="text/css" href="<?= asset($dir . '/css/elfinder.min.css') ?>">
13
+    <link rel="stylesheet" type="text/css" href="<?= asset($dir.'/css/elfinder.min.css') ?>">
14 14
     <!-- <link rel="stylesheet" type="text/css" href="<?= asset($dir.'/css/theme.css') ?>"> -->
15 15
     <link rel="stylesheet" type="text/css" href="<?= asset('vendor/backpack/elfinder/elfinder.backpack.theme.css') ?>">
16 16
 
17 17
     <!-- elFinder JS (REQUIRED) -->
18
-    <script src="<?= asset($dir . '/js/elfinder.min.js') ?>"></script>
18
+    <script src="<?= asset($dir.'/js/elfinder.min.js') ?>"></script>
19 19
 
20 20
     <?php if ($locale) { ?>
21 21
         <!-- elFinder translation (OPTIONAL) -->
22
-        <script src="<?= asset($dir . "/js/i18n/elfinder.$locale.js") ?>"></script>
22
+        <script src="<?= asset($dir."/js/i18n/elfinder.$locale.js") ?>"></script>
23 23
     <?php } ?>
24 24
     <!-- Include jQuery, jQuery UI, elFinder (REQUIRED) -->
25 25
 
26 26
     <?php
27
-    $mimeTypes = implode(',',array_map(function($t){return "'".$t."'";}, explode(',',$type)));
27
+    $mimeTypes = implode(',', array_map(function($t) {return "'".$t."'"; }, explode(',', $type)));
28 28
     ?>
29 29
 
30 30
     <script type="text/javascript">
31 31
         $().ready(function () {
32 32
             var elf = $('#elfinder').elfinder({
33 33
                 // set your elFinder options here
34
-                <?php if($locale){ ?>
34
+                <?php if ($locale) { ?>
35 35
                     lang: '<?= $locale ?>', // locale
36 36
                 <?php } ?>
37 37
                 customData: {
Please login to merge, or discard this patch.
src/resources/views-elfinder/tinymce4.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     <!-- elFinder JS (REQUIRED) -->
18 18
     <script src="<?= asset($dir.'/js/elfinder.min.js') ?>"></script>
19 19
 
20
-    <?php if($locale){ ?>
20
+    <?php if ($locale) { ?>
21 21
         <!-- elFinder translation (OPTIONAL) -->
22 22
         <script src="<?= asset($dir."/js/i18n/elfinder.$locale.js") ?>"></script>
23 23
     <?php } ?>
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         $().ready(function() {
41 41
             var elf = $('#elfinder').elfinder({
42 42
                 // set your elFinder options here
43
-                <?php if($locale){ ?>
43
+                <?php if ($locale) { ?>
44 44
                     lang: '<?= $locale ?>', // locale
45 45
                 <?php } ?>
46 46
                 customData: {
Please login to merge, or discard this patch.
src/resources/views/fields/page_or_link.blade.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     </div>
42 42
     <div class="col-sm-9">
43 43
         <!-- external link input -->
44
-          <div class="page_or_link_value <?php if (!isset($entry) || $entry->type!='external_link') { echo 'hidden'; } ?>" id="page_or_link_external_link">
44
+          <div class="page_or_link_value <?php if (!isset($entry) || $entry->type != 'external_link') { echo 'hidden'; } ?>" id="page_or_link_external_link">
45 45
             <input
46 46
                 type="url"
47 47
                 class="form-control"
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
                 >
59 59
           </div>
60 60
           <!-- internal link input -->
61
-          <div class="page_or_link_value <?php if (!isset($entry) || $entry->type!='internal_link') { echo 'hidden'; } ?>" id="page_or_link_internal_link">
61
+          <div class="page_or_link_value <?php if (!isset($entry) || $entry->type != 'internal_link') { echo 'hidden'; } ?>" id="page_or_link_internal_link">
62 62
             <input
63 63
                 type="text"
64 64
                 class="form-control"
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
                 >
76 76
           </div>
77 77
           <!-- page slug input -->
78
-          <div class="page_or_link_value <?php if (isset($entry) && $entry->type!='page_link') { echo 'hidden'; } ?>" id="page_or_link_page">
78
+          <div class="page_or_link_value <?php if (isset($entry) && $entry->type != 'page_link') { echo 'hidden'; } ?>" id="page_or_link_page">
79 79
             <select
80 80
                 class="form-control"
81 81
                 name="page_id"
Please login to merge, or discard this patch.
src/CrudTrait.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -12,14 +12,14 @@  discard block
 block discarded – undo
12 12
     |--------------------------------------------------------------------------
13 13
     */
14 14
 
15
-	public static function getPossibleEnumValues($field_name){
15
+	public static function getPossibleEnumValues($field_name) {
16 16
         $instance = new static; // create an instance of the model to be able to get the table name
17
-        $type = DB::select( DB::raw('SHOW COLUMNS FROM '.$instance->getTable().' WHERE Field = "'.$field_name.'"') )[0]->Type;
17
+        $type = DB::select(DB::raw('SHOW COLUMNS FROM '.$instance->getTable().' WHERE Field = "'.$field_name.'"'))[0]->Type;
18 18
         preg_match('/^enum\((.*)\)$/', $type, $matches);
19 19
         $enum = array();
20 20
         $exploded = explode(',', $matches[1]);
21
-        foreach($exploded as $value){
22
-            $v = trim( $value, "'" );
21
+        foreach ($exploded as $value) {
22
+            $v = trim($value, "'");
23 23
             $enum[] = $v;
24 24
         }
25 25
         return $enum;
@@ -27,9 +27,9 @@  discard block
 block discarded – undo
27 27
 
28 28
     public static function isColumnNullable($column_name) {
29 29
         $instance = new static; // create an instance of the model to be able to get the table name
30
-        $answer = DB::select( DB::raw("SELECT IS_NULLABLE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='".$instance->getTable()."' AND COLUMN_NAME='".$column_name."' AND table_schema='".env('DB_DATABASE')."'") )[0];
30
+        $answer = DB::select(DB::raw("SELECT IS_NULLABLE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='".$instance->getTable()."' AND COLUMN_NAME='".$column_name."' AND table_schema='".env('DB_DATABASE')."'"))[0];
31 31
 
32
-        return ($answer->IS_NULLABLE == 'YES'?true:false);
32
+        return ($answer->IS_NULLABLE == 'YES' ? true : false);
33 33
     }
34 34
 
35 35
 
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 
130 130
     public function translation($translation_lang = false)
131 131
     {
132
-        if ($translation_lang==false) {
132
+        if ($translation_lang == false) {
133 133
             $translation_lang = Lang::locale();
134 134
         }
135 135
 
Please login to merge, or discard this patch.