We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -128,7 +128,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -58,8 +58,7 @@ discard block |
||
58 | 58 | if (property_exists($model, 'translatable')) |
59 | 59 | { |
60 | 60 | $this->data['entries'] = $model::where('translation_lang', \Lang::locale())->get(); |
61 | - } |
|
62 | - else |
|
61 | + } else |
|
63 | 62 | { |
64 | 63 | $this->data['entries'] = $model::all(); |
65 | 64 | } |
@@ -286,8 +285,7 @@ discard block |
||
286 | 285 | $this->data['entries'] = $model::where('translation_lang', $lang)->get(); |
287 | 286 | $this->data['languages'] = \Backpack\LangFileManager\app\Models\Language::all(); |
288 | 287 | $this->data['active_language'] = $lang; |
289 | - } |
|
290 | - else |
|
288 | + } else |
|
291 | 289 | { |
292 | 290 | $this->data['entries'] = $model::all(); |
293 | 291 | } |
@@ -330,8 +328,7 @@ discard block |
||
330 | 328 | $count++; |
331 | 329 | } |
332 | 330 | } |
333 | - } |
|
334 | - else |
|
331 | + } else |
|
335 | 332 | { |
336 | 333 | return false; |
337 | 334 | } |
@@ -388,8 +385,7 @@ discard block |
||
388 | 385 | if ($existing_translation) |
389 | 386 | { |
390 | 387 | $new_entry = $existing_translation; |
391 | - } |
|
392 | - else |
|
388 | + } else |
|
393 | 389 | { |
394 | 390 | // get the info for that entry |
395 | 391 | $new_entry_attributes = $this->data['entry']->getAttributes(); |
@@ -437,8 +433,7 @@ discard block |
||
437 | 433 | if(!in_array($this->crud['fields'][$k]['store_in'], $fake_field_columns_to_encode, true)){ |
438 | 434 | array_push($fake_field_columns_to_encode, $this->crud['fields'][$k]['store_in']); |
439 | 435 | } |
440 | - } |
|
441 | - else //otherwise in the one defined in the $crud variable |
|
436 | + } else //otherwise in the one defined in the $crud variable |
|
442 | 437 | { |
443 | 438 | $request['extras'][$this->crud['fields'][$k]['name']] = $request[$this->crud['fields'][$k]['name']]; |
444 | 439 | |
@@ -482,8 +477,7 @@ discard block |
||
482 | 477 | if(!in_array($this->crud['fields'][$k]['store_in'], $fake_field_columns_to_encode, true)){ |
483 | 478 | array_push($fake_field_columns_to_encode, $this->crud['fields'][$k]['store_in']); |
484 | 479 | } |
485 | - } |
|
486 | - else //otherwise in the one defined in the $crud variable |
|
480 | + } else //otherwise in the one defined in the $crud variable |
|
487 | 481 | { |
488 | 482 | if(!in_array('extras', $fake_field_columns_to_encode, true)){ |
489 | 483 | array_push($fake_field_columns_to_encode, 'extras'); |
@@ -543,8 +537,7 @@ discard block |
||
543 | 537 | if (isset($this->crud['create_fields'])) |
544 | 538 | { |
545 | 539 | $this->crud['fields'] = $this->crud['create_fields']; |
546 | - } |
|
547 | - elseif (isset($this->crud['update_fields'])) |
|
540 | + } elseif (isset($this->crud['update_fields'])) |
|
548 | 541 | { |
549 | 542 | $this->crud['fields'] = $this->crud['update_fields']; |
550 | 543 | } |
@@ -576,8 +569,9 @@ discard block |
||
576 | 569 | |
577 | 570 | // if no field type is defined, assume the "text" field type |
578 | 571 | foreach ($this->crud['fields'] as $k => $field) { |
579 | - if (!isset($this->crud['fields'][$k]['type'])) |
|
580 | - $this->crud['fields'][$k]['type'] = 'text'; |
|
572 | + if (!isset($this->crud['fields'][$k]['type'])) { |
|
573 | + $this->crud['fields'][$k]['type'] = 'text'; |
|
574 | + } |
|
581 | 575 | } |
582 | 576 | |
583 | 577 | // if an entry was passed, we're preparing for the update form, not create |
@@ -32,11 +32,11 @@ discard block |
||
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 |
||
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 | } |
@@ -14,7 +14,7 @@ discard block |
||
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 |
||
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: { |
@@ -17,7 +17,7 @@ discard block |
||
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 |
||
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: { |
@@ -21,7 +21,7 @@ discard block |
||
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 |
||
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: { |
@@ -10,28 +10,28 @@ |
||
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: { |
@@ -17,7 +17,7 @@ discard block |
||
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 |
||
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: { |
@@ -41,7 +41,7 @@ discard block |
||
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 |
||
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 |
||
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" |
@@ -71,8 +71,7 @@ |
||
71 | 71 | if ($results && $results->count()) { |
72 | 72 | $results_array = $results->lists($column['attribute'], 'id'); |
73 | 73 | echo implode(', ', $results_array->toArray()); |
74 | - } |
|
75 | - else |
|
74 | + } else |
|
76 | 75 | { |
77 | 76 | echo '-'; |
78 | 77 | } |