We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | | |
| 14 | 14 | */ |
| 15 | 15 | |
| 16 | - return [ |
|
| 16 | + return [ |
|
| 17 | 17 | 'infoFiltered' => '(filtered from _MAX_ total entries)', |
| 18 | 18 | 'thousands' => ',', |
| 19 | 19 | 'admin' => 'المشرف', |
@@ -25,9 +25,9 @@ |
||
| 25 | 25 | </thead> |
| 26 | 26 | <?php |
| 27 | 27 | |
| 28 | -if (! empty($_POST)) { |
|
| 28 | +if (!empty($_POST)) { |
|
| 29 | 29 | foreach ($_POST as $key => $value) { |
| 30 | - if ((! is_string($value) && ! is_numeric($value)) || ! is_string($key)) { |
|
| 30 | + if ((!is_string($value) && !is_numeric($value)) || !is_string($key)) { |
|
| 31 | 31 | continue; |
| 32 | 32 | } |
| 33 | 33 | |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | $this->executeProcess('mkdir -p public/uploads'); |
| 54 | 54 | break; |
| 55 | 55 | case '\\': // windows |
| 56 | - if (! file_exists('public\uploads')) { |
|
| 56 | + if (!file_exists('public\uploads')) { |
|
| 57 | 57 | $this->executeProcess('mkdir public\uploads'); |
| 58 | 58 | } |
| 59 | 59 | break; |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | /** |
| 31 | 31 | * Execute the console command. |
| 32 | 32 | * |
| 33 | - * @return mixed |
|
| 33 | + * @return false|null |
|
| 34 | 34 | */ |
| 35 | 35 | public function handle() |
| 36 | 36 | { |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Backpack\CRUD\app\Console\Commands; |
| 4 | 4 | |
| 5 | -use Illuminate\Console\Command; |
|
| 6 | 5 | use Backpack\Base\app\Console\Commands\Install as BaseInstall; |
| 7 | 6 | |
| 8 | 7 | class Install extends BaseInstall |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | $sourceFile = $this->sourcePath.$file.'.blade.php'; |
| 74 | 74 | $copiedFile = $this->destinationPath.$file.'.blade.php'; |
| 75 | 75 | |
| 76 | - if (! file_exists($sourceFile)) { |
|
| 76 | + if (!file_exists($sourceFile)) { |
|
| 77 | 77 | return $this->error( |
| 78 | 78 | 'Cannot find source view file at ' |
| 79 | 79 | .$sourceFile. |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | if ($canCopy) { |
| 94 | 94 | $path = pathinfo($copiedFile); |
| 95 | 95 | |
| 96 | - if (! file_exists($path['dirname'])) { |
|
| 96 | + if (!file_exists($path['dirname'])) { |
|
| 97 | 97 | mkdir($path['dirname'], 0755, true); |
| 98 | 98 | } |
| 99 | 99 | |
@@ -119,10 +119,10 @@ |
||
| 119 | 119 | // add the details_row button to the first column |
| 120 | 120 | if ($this->details_row) { |
| 121 | 121 | $details_row_button = \View::make('crud::columns.details_row_button') |
| 122 | - ->with('crud', $this) |
|
| 123 | - ->with('entry', $entry) |
|
| 124 | - ->with('row_number', $rowNumber) |
|
| 125 | - ->render(); |
|
| 122 | + ->with('crud', $this) |
|
| 123 | + ->with('entry', $entry) |
|
| 124 | + ->with('row_number', $rowNumber) |
|
| 125 | + ->render(); |
|
| 126 | 126 | $row_items[0] = $details_row_button.$row_items[0]; |
| 127 | 127 | } |
| 128 | 128 | |
@@ -19,9 +19,9 @@ discard block |
||
| 19 | 19 | */ |
| 20 | 20 | public function applySearchTerm($searchTerm) |
| 21 | 21 | { |
| 22 | - return $this->query->where(function ($query) use ($searchTerm) { |
|
| 22 | + return $this->query->where(function($query) use ($searchTerm) { |
|
| 23 | 23 | foreach ($this->getColumns() as $column) { |
| 24 | - if (! isset($column['type'])) { |
|
| 24 | + if (!isset($column['type'])) { |
|
| 25 | 25 | abort(400, 'Missing column type when trying to apply search term.'); |
| 26 | 26 | } |
| 27 | 27 | |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | |
| 61 | 61 | case 'select': |
| 62 | 62 | case 'select_multiple': |
| 63 | - $query->orWhereHas($column['entity'], function ($q) use ($column, $searchTerm) { |
|
| 63 | + $query->orWhereHas($column['entity'], function($q) use ($column, $searchTerm) { |
|
| 64 | 64 | $q->where($column['attribute'], 'like', '%'.$searchTerm.'%'); |
| 65 | 65 | }); |
| 66 | 66 | break; |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | */ |
| 178 | 178 | private function renderCellView($view, $column, $entry, $rowNumber = false) |
| 179 | 179 | { |
| 180 | - if (! view()->exists($view)) { |
|
| 180 | + if (!view()->exists($view)) { |
|
| 181 | 181 | $view = 'crud::columns.text'; // fallback to text column |
| 182 | 182 | } |
| 183 | 183 | |
@@ -35,6 +35,7 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | /** |
| 37 | 37 | * Apply the search logic for each CRUD column. |
| 38 | + * @param string $searchTerm |
|
| 38 | 39 | */ |
| 39 | 40 | public function applySearchLogicForColumn($query, $column, $searchTerm) |
| 40 | 41 | { |
@@ -230,7 +231,7 @@ discard block |
||
| 230 | 231 | * |
| 231 | 232 | * @param string $view |
| 232 | 233 | * @param array $column |
| 233 | - * @param object $entry |
|
| 234 | + * @param \Illuminate\Database\Eloquent\Model $entry |
|
| 234 | 235 | * @param bool|int $rowNumber The number shown to the user as row number (index) |
| 235 | 236 | * |
| 236 | 237 | * @return string |
@@ -2,8 +2,8 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Backpack\CRUD\PanelTraits; |
| 4 | 4 | |
| 5 | -use Validator; |
|
| 6 | 5 | use Carbon\Carbon; |
| 6 | +use Validator; |
|
| 7 | 7 | |
| 8 | 8 | trait Search |
| 9 | 9 | { |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | */ |
| 43 | 43 | public function isRequired($inputName, $operation) |
| 44 | 44 | { |
| 45 | - if (! isset($this->requiredFields[$operation])) { |
|
| 45 | + if (!isset($this->requiredFields[$operation])) { |
|
| 46 | 46 | return false; |
| 47 | 47 | } |
| 48 | 48 | |
@@ -22,11 +22,11 @@ discard block |
||
| 22 | 22 | |
| 23 | 23 | $saveOptions = collect($permissions) |
| 24 | 24 | // Restrict list to allowed actions. |
| 25 | - ->filter(function ($action, $permission) { |
|
| 25 | + ->filter(function($action, $permission) { |
|
| 26 | 26 | return $this->crud->hasAccess($permission); |
| 27 | 27 | }) |
| 28 | 28 | // Generate list of possible actions. |
| 29 | - ->mapWithKeys(function ($action, $permission) { |
|
| 29 | + ->mapWithKeys(function($action, $permission) { |
|
| 30 | 30 | return [$action => $this->getSaveActionButtonName($action)]; |
| 31 | 31 | }) |
| 32 | 32 | ->all(); |
@@ -61,8 +61,7 @@ discard block |
||
| 61 | 61 | */ |
| 62 | 62 | public function setSaveAction($forceSaveAction = null) |
| 63 | 63 | { |
| 64 | - $saveAction = $forceSaveAction ?: |
|
| 65 | - \Request::input('save_action', config('backpack.crud.default_save_action', 'save_and_back')); |
|
| 64 | + $saveAction = $forceSaveAction ?: \Request::input('save_action', config('backpack.crud.default_save_action', 'save_and_back')); |
|
| 66 | 65 | |
| 67 | 66 | if (config('backpack.crud.show_save_action_change', true) && |
| 68 | 67 | session('save_action', 'save_and_back') !== $saveAction) { |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | */ |
| 22 | 22 | public function getTitle($action = false) |
| 23 | 23 | { |
| 24 | - if (! $action) { |
|
| 24 | + if (!$action) { |
|
| 25 | 25 | $action = $this->getActionMethod(); |
| 26 | 26 | } |
| 27 | 27 | |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | */ |
| 39 | 39 | public function setTitle($string, $action = false) |
| 40 | 40 | { |
| 41 | - if (! $action) { |
|
| 41 | + if (!$action) { |
|
| 42 | 42 | $action = $this->getActionMethod(); |
| 43 | 43 | } |
| 44 | 44 | |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | */ |
| 59 | 59 | public function getHeading($action = false) |
| 60 | 60 | { |
| 61 | - if (! $action) { |
|
| 61 | + if (!$action) { |
|
| 62 | 62 | $action = $this->getActionMethod(); |
| 63 | 63 | } |
| 64 | 64 | |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | */ |
| 76 | 76 | public function setHeading($string, $action = false) |
| 77 | 77 | { |
| 78 | - if (! $action) { |
|
| 78 | + if (!$action) { |
|
| 79 | 79 | $action = $this->getActionMethod(); |
| 80 | 80 | } |
| 81 | 81 | |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | */ |
| 96 | 96 | public function getSubheading($action = false) |
| 97 | 97 | { |
| 98 | - if (! $action) { |
|
| 98 | + if (!$action) { |
|
| 99 | 99 | $action = $this->getActionMethod(); |
| 100 | 100 | } |
| 101 | 101 | |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | */ |
| 113 | 113 | public function setSubheading($string, $action = false) |
| 114 | 114 | { |
| 115 | - if (! $action) { |
|
| 115 | + if (!$action) { |
|
| 116 | 116 | $action = $this->getActionMethod(); |
| 117 | 117 | } |
| 118 | 118 | |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | * Check if the application is running in normal conditions |
| 11 | 11 | * (production env, not in console, not in unit tests). |
| 12 | 12 | * |
| 13 | - * @return void |
|
| 13 | + * @return boolean |
|
| 14 | 14 | */ |
| 15 | 15 | private function runningInProduction() |
| 16 | 16 | { |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | * @param string $method HTTP Method to use for the request. |
| 87 | 87 | * @param string $url URL to point the request at. |
| 88 | 88 | * @param array $payload The data you want sent to the URL. |
| 89 | - * @return void |
|
| 89 | + * @return boolean |
|
| 90 | 90 | */ |
| 91 | 91 | private function makeCurlRequest($method, $url, $payload) |
| 92 | 92 | { |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | private function sendUsageStats() |
| 39 | 39 | { |
| 40 | 40 | // only send usage stats in production |
| 41 | - if (! $this->runningInProduction()) { |
|
| 41 | + if (!$this->runningInProduction()) { |
|
| 42 | 42 | return; |
| 43 | 43 | } |
| 44 | 44 | |