We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | return; |
29 | 29 | } |
30 | 30 | |
31 | - if (! $this->validCode(config('backpack.base.license_code'))) { |
|
31 | + if (!$this->validCode(config('backpack.base.license_code'))) { |
|
32 | 32 | \Alert::add('warning', "<strong>You're using unlicensed software.</strong> Please ask your web developer to <a target='_blank' class='alert-link text-white' href='http://backpackforlaravel.com'>purchase a license code</a> to hide this message."); |
33 | 33 | } |
34 | 34 | } |
@@ -46,6 +46,6 @@ discard block |
||
46 | 46 | */ |
47 | 47 | private function validCode($j) |
48 | 48 | { |
49 | - $k = str_replace('-', '', $j); $s = substr($k, 0, 8); $c = substr($k, 8, 2); $a = substr($k, 10, 2); $l = substr($k, 12, 2); $p = substr($k, 14, 2); $n = substr($k, 16, 2); $m = substr($k, 18, 2); $z = substr($k, 20, 24); $w = 'ADEFHKLMVWXYZ146'; $x = $s; for ($i = 0; $i < strlen($w); $i++) { $r = $w[$i]; $x = str_replace($r, '-', $x); } $x = str_replace('-', '', $x); if ($x != '') { return false; } if (substr_count($j, '-') != 5) { return false; } $e = substr(hexdec(hash('crc32b', substr($k, 0, 20))), -4); if ($z !== $e) { return false; } $o = strrev(substr(preg_replace('/[0-9]+/', '', strtoupper(sha1($a.'sand('.$s.')'.$n.'tos()'))), 2, 2)); if ($m !== $o) { return false; } $o2 = substr(((int)preg_replace('/[^0-9]/','', $s.$c)==0 ? 8310 : (int)preg_replace('/[^0-9]/','', $s.$c) )*9971, -2);if ($a !== $o2) {return false;} return true; |
|
49 | + $k = str_replace('-', '', $j); $s = substr($k, 0, 8); $c = substr($k, 8, 2); $a = substr($k, 10, 2); $l = substr($k, 12, 2); $p = substr($k, 14, 2); $n = substr($k, 16, 2); $m = substr($k, 18, 2); $z = substr($k, 20, 24); $w = 'ADEFHKLMVWXYZ146'; $x = $s; for ($i = 0; $i < strlen($w); $i++) { $r = $w[$i]; $x = str_replace($r, '-', $x); } $x = str_replace('-', '', $x); if ($x != '') { return false; } if (substr_count($j, '-') != 5) { return false; } $e = substr(hexdec(hash('crc32b', substr($k, 0, 20))), -4); if ($z !== $e) { return false; } $o = strrev(substr(preg_replace('/[0-9]+/', '', strtoupper(sha1($a.'sand('.$s.')'.$n.'tos()'))), 2, 2)); if ($m !== $o) { return false; } $o2 = substr(((int) preg_replace('/[^0-9]/', '', $s.$c) == 0 ? 8310 : (int) preg_replace('/[^0-9]/', '', $s.$c)) * 9971, -2); if ($a !== $o2) {return false; } return true; |
|
50 | 50 | } |
51 | 51 | } |
@@ -13,5 +13,5 @@ |
||
13 | 13 | (array) config('backpack.base.middleware_key', 'admin') |
14 | 14 | ), |
15 | 15 | 'namespace' => 'App\Http\Controllers\Admin', |
16 | -], function () { // custom admin routes |
|
16 | +], function() { // custom admin routes |
|
17 | 17 | }); // this should be the absolute last line of this file |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | */ |
85 | 85 | public function wasNotApplied() |
86 | 86 | { |
87 | - return ! $this->applied; |
|
87 | + return !$this->applied; |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | /** |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | |
106 | 106 | $input = $input ?? new ParameterBag($this->crud()->getRequest()->all()); |
107 | 107 | |
108 | - if (! $input->has($this->name)) { |
|
108 | + if (!$input->has($this->name)) { |
|
109 | 109 | // if fallback logic was supplied and is a closure |
110 | 110 | if (is_callable($this->fallbackLogic)) { |
111 | 111 | return ($this->fallbackLogic)(); |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | */ |
286 | 286 | public function values($value) |
287 | 287 | { |
288 | - $this->values = (! is_string($value) && is_callable($value)) ? $value() : $value; |
|
288 | + $this->values = (!is_string($value) && is_callable($value)) ? $value() : $value; |
|
289 | 289 | |
290 | 290 | return $this->save(); |
291 | 291 | } |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('addresses', function (Blueprint $table) { |
|
16 | + Schema::create('addresses', function(Blueprint $table) { |
|
17 | 17 | $table->increments('id'); |
18 | 18 | $table->integer('account_details_id')->unsigned(); |
19 | 19 | $table->string('city')->nullable(); |
@@ -26,7 +26,7 @@ |
||
26 | 26 | |
27 | 27 | $app['router']->get('admin/users', "$controller@index")->name('admin.users.index'); |
28 | 28 | |
29 | - $app->singleton('crud', function ($app) { |
|
29 | + $app->singleton('crud', function($app) { |
|
30 | 30 | return new CrudPanel($app); |
31 | 31 | }); |
32 | 32 |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $table = $instance->getTableWithPrefix(); |
73 | 73 | |
74 | 74 | // MongoDB columns are alway nullable |
75 | - if (! in_array($conn->getConfig()['driver'], CRUD::getSqlDriverList())) { |
|
75 | + if (!in_array($conn->getConfig()['driver'], CRUD::getSqlDriverList())) { |
|
76 | 76 | return true; |
77 | 77 | } |
78 | 78 | |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | // check for NOT NULL |
83 | 83 | $notNull = $column->getNotnull(); |
84 | 84 | // return the value of nullable (aka the inverse of NOT NULL) |
85 | - return ! $notNull; |
|
85 | + return !$notNull; |
|
86 | 86 | } catch (\Exception $e) { |
87 | 87 | return true; |
88 | 88 | } |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | { |
42 | 42 | $this->crud->allowAccess('list'); |
43 | 43 | |
44 | - $this->crud->operation('list', function () { |
|
44 | + $this->crud->operation('list', function() { |
|
45 | 45 | $this->crud->loadDefaultOperationSettingsFromConfig(); |
46 | 46 | }); |
47 | 47 | } |
@@ -116,12 +116,12 @@ discard block |
||
116 | 116 | $table = $this->crud->model->getTable(); |
117 | 117 | $key = $this->crud->model->getKeyName(); |
118 | 118 | |
119 | - $hasOrderByPrimaryKey = collect($orderBy)->some(function ($item) use ($key, $table) { |
|
119 | + $hasOrderByPrimaryKey = collect($orderBy)->some(function($item) use ($key, $table) { |
|
120 | 120 | return (isset($item['column']) && $item['column'] === $key) |
121 | 121 | || (isset($item['sql']) && str_contains($item['sql'], "$table.$key")); |
122 | 122 | }); |
123 | 123 | |
124 | - if (! $hasOrderByPrimaryKey) { |
|
124 | + if (!$hasOrderByPrimaryKey) { |
|
125 | 125 | $this->crud->orderByWithPrefix($this->crud->model->getKeyName(), 'DESC'); |
126 | 126 | } |
127 | 127 |
@@ -22,9 +22,9 @@ discard block |
||
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 |
||
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($this->getColumnWithTableNamePrefixed($q, $column['attribute']), 'like', '%'.$searchTerm.'%'); |
87 | 87 | }); |
88 | 88 | break; |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | */ |
289 | 289 | private function renderCellView($view, $column, $entry, $rowNumber = false) |
290 | 290 | { |
291 | - if (! view()->exists($view)) { |
|
291 | + if (!view()->exists($view)) { |
|
292 | 292 | $view = 'crud::columns.text'; // fallback to text column |
293 | 293 | } |
294 | 294 |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | */ |
115 | 115 | public function makeFirstColumn() |
116 | 116 | { |
117 | - if (! $this->columns()) { |
|
117 | + if (!$this->columns()) { |
|
118 | 118 | return false; |
119 | 119 | } |
120 | 120 | |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | */ |
160 | 160 | public function removeColumns($columns) |
161 | 161 | { |
162 | - if (! empty($columns)) { |
|
162 | + if (!empty($columns)) { |
|
163 | 163 | foreach ($columns as $columnKey) { |
164 | 164 | $this->removeColumn($columnKey); |
165 | 165 | } |
@@ -252,8 +252,8 @@ discard block |
||
252 | 252 | { |
253 | 253 | $columns = $this->columns(); |
254 | 254 | |
255 | - return collect($columns)->pluck('entity')->reject(function ($value, $key) { |
|
256 | - return ! $value; |
|
255 | + return collect($columns)->pluck('entity')->reject(function($value, $key) { |
|
256 | + return !$value; |
|
257 | 257 | })->toArray(); |
258 | 258 | } |
259 | 259 | |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | */ |
330 | 330 | public function hasColumnWhere($attribute, $value) |
331 | 331 | { |
332 | - $match = Arr::first($this->columns(), function ($column, $columnKey) use ($attribute, $value) { |
|
332 | + $match = Arr::first($this->columns(), function($column, $columnKey) use ($attribute, $value) { |
|
333 | 333 | return isset($column[$attribute]) && $column[$attribute] == $value; |
334 | 334 | }); |
335 | 335 | |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | */ |
346 | 346 | public function firstColumnWhere($attribute, $value) |
347 | 347 | { |
348 | - return Arr::first($this->columns(), function ($column, $columnKey) use ($attribute, $value) { |
|
348 | + return Arr::first($this->columns(), function($column, $columnKey) use ($attribute, $value) { |
|
349 | 349 | return isset($column[$attribute]) && $column[$attribute] == $value; |
350 | 350 | }); |
351 | 351 | } |
@@ -395,8 +395,8 @@ discard block |
||
395 | 395 | */ |
396 | 396 | public function countColumnsWithoutActions() |
397 | 397 | { |
398 | - return collect($this->columns())->filter(function ($column, $key) { |
|
399 | - return ! isset($column['hasActions']) || $column['hasActions'] == false; |
|
398 | + return collect($this->columns())->filter(function($column, $key) { |
|
399 | + return !isset($column['hasActions']) || $column['hasActions'] == false; |
|
400 | 400 | })->count(); |
401 | 401 | } |
402 | 402 |