@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | $all = $fields->toArray(); |
| 71 | 71 | |
| 72 | 72 | foreach ($this->form->rows as $row) { |
| 73 | - $rowFields = array_map(function ($field) { |
|
| 73 | + $rowFields = array_map(function($field) { |
|
| 74 | 74 | return $field['element']; |
| 75 | 75 | }, $row->getFields()); |
| 76 | 76 | |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | |
| 79 | 79 | foreach ($rowFields as $field) { |
| 80 | 80 | if (($index = array_search($field, $all)) !== false) { |
| 81 | - if (! $match) { |
|
| 81 | + if (!$match) { |
|
| 82 | 82 | $fields->put($index, $row); |
| 83 | 83 | } else { |
| 84 | 84 | $fields->pull($index); |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | public function getTabs() |
| 105 | 105 | { |
| 106 | 106 | // If there is no active tab, then active the first. |
| 107 | - if ($this->tabs->filter(function ($tab) { |
|
| 107 | + if ($this->tabs->filter(function($tab) { |
|
| 108 | 108 | return $tab['active']; |
| 109 | 109 | })->isEmpty()) { |
| 110 | 110 | $first = $this->tabs->first(); |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | |
| 83 | 83 | $rules = $attributes = []; |
| 84 | 84 | |
| 85 | - if (! $fieldRules = $this->getRules()) { |
|
| 85 | + if (!$fieldRules = $this->getRules()) { |
|
| 86 | 86 | return false; |
| 87 | 87 | } |
| 88 | 88 | |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | |
| 124 | 124 | $path = null; |
| 125 | 125 | |
| 126 | - if (! is_null($this->storagePermission)) { |
|
| 126 | + if (!is_null($this->storagePermission)) { |
|
| 127 | 127 | $path = $this->storage->putFileAs($this->getDirectory(), $file, $this->name, $this->storagePermission); |
| 128 | 128 | } else { |
| 129 | 129 | $path = $this->storage->putFileAs($this->getDirectory(), $file, $this->name); |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | |
| 235 | 235 | $this->setupDefaultOptions(); |
| 236 | 236 | |
| 237 | - if (! empty($this->value)) { |
|
| 237 | + if (!empty($this->value)) { |
|
| 238 | 238 | $this->attribute('data-initial-preview', $this->preview()); |
| 239 | 239 | $this->attribute('data-initial-caption', $this->initialCaption($this->value)); |
| 240 | 240 | |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | */ |
| 78 | 78 | public function pluck($visibleColumn, $key) |
| 79 | 79 | { |
| 80 | - if (! empty($visibleColumn) && ! empty($key)) { |
|
| 80 | + if (!empty($visibleColumn) && !empty($key)) { |
|
| 81 | 81 | $this->keyAsValue = true; |
| 82 | 82 | } |
| 83 | 83 | |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | */ |
| 97 | 97 | public function options($options = []) |
| 98 | 98 | { |
| 99 | - if (! $this->keyAsValue) { |
|
| 99 | + if (!$this->keyAsValue) { |
|
| 100 | 100 | return parent::options($options); |
| 101 | 101 | } |
| 102 | 102 | |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | return is_null($this->saveAction) ? $value : ($this->saveAction)($value); |
| 139 | 139 | } |
| 140 | 140 | |
| 141 | - if (is_array($value) && ! Arr::isAssoc($value)) { |
|
| 141 | + if (is_array($value) && !Arr::isAssoc($value)) { |
|
| 142 | 142 | $value = implode(',', $value); |
| 143 | 143 | } |
| 144 | 144 | |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | |
| 13 | 13 | public function __construct($column, $arguments = []) |
| 14 | 14 | { |
| 15 | - if (! class_exists(\Mews\Captcha\Captcha::class)) { |
|
| 15 | + if (!class_exists(\Mews\Captcha\Captcha::class)) { |
|
| 16 | 16 | throw new \Exception('To use captcha field, please install [mews/captcha] first.'); |
| 17 | 17 | } |
| 18 | 18 | |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | $this->value = explode(',', $relations); |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | - if (! is_array($relations)) { |
|
| 61 | + if (!is_array($relations)) { |
|
| 62 | 62 | return; |
| 63 | 63 | } |
| 64 | 64 | |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | $this->original = explode(',', $relations); |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | - if (! is_array($relations)) { |
|
| 93 | + if (!is_array($relations)) { |
|
| 94 | 94 | return; |
| 95 | 95 | } |
| 96 | 96 | |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | public function value($value = null) |
| 43 | 43 | { |
| 44 | 44 | if (is_null($value)) { |
| 45 | - if (! is_null($this->value) && is_null($this->value['start']) && is_null($this->value['end'])) { |
|
| 45 | + if (!is_null($this->value) && is_null($this->value['start']) && is_null($this->value['end'])) { |
|
| 46 | 46 | return $this->getDefault(); |
| 47 | 47 | } |
| 48 | 48 | |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | */ |
| 54 | 54 | public function getValidator(array $input) |
| 55 | 55 | { |
| 56 | - if (! array_key_exists($this->column, $input)) { |
|
| 56 | + if (!array_key_exists($this->column, $input)) { |
|
| 57 | 57 | return false; |
| 58 | 58 | } |
| 59 | 59 | |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | |
| 64 | 64 | /** @var Field $field */ |
| 65 | 65 | foreach ($this->buildEmbeddedForm()->fields() as $field) { |
| 66 | - if (! $fieldRules = $field->getRules()) { |
|
| 66 | + if (!$fieldRules = $field->getRules()) { |
|
| 67 | 67 | continue; |
| 68 | 68 | } |
| 69 | 69 | |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | $column = array_flip($column); |
| 181 | 181 | |
| 182 | 182 | foreach ($input[$this->column] as $key => $value) { |
| 183 | - if (! array_key_exists($key, $column)) { |
|
| 183 | + if (!array_key_exists($key, $column)) { |
|
| 184 | 184 | continue; |
| 185 | 185 | } |
| 186 | 186 | |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | try { |
| 243 | 243 | $this->storage = Storage::disk($disk); |
| 244 | 244 | } catch (\Exception $exception) { |
| 245 | - if (! array_key_exists($disk, config('filesystems.disks'))) { |
|
| 245 | + if (!array_key_exists($disk, config('filesystems.disks'))) { |
|
| 246 | 246 | admin_error( |
| 247 | 247 | 'Config error.', |
| 248 | 248 | "Disk [$disk] not configured, please add a disk config in `config/filesystems.php`." |
@@ -383,7 +383,7 @@ discard block |
||
| 383 | 383 | { |
| 384 | 384 | $this->renameIfExists($file); |
| 385 | 385 | |
| 386 | - if (! is_null($this->storagePermission)) { |
|
| 386 | + if (!is_null($this->storagePermission)) { |
|
| 387 | 387 | return $this->storage->putFileAs($this->getDirectory(), $file, $this->name, $this->storagePermission); |
| 388 | 388 | } |
| 389 | 389 | |
@@ -38,17 +38,17 @@ |
||
| 38 | 38 | return $this->validator->call($this, $input); |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | - if (! is_string($this->column)) { |
|
| 41 | + if (!is_string($this->column)) { |
|
| 42 | 42 | return false; |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | $rules = $attributes = []; |
| 46 | 46 | |
| 47 | - if (! $fieldRules = $this->getRules()) { |
|
| 47 | + if (!$fieldRules = $this->getRules()) { |
|
| 48 | 48 | return false; |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | - if (! Arr::has($input, $this->column)) { |
|
| 51 | + if (!Arr::has($input, $this->column)) { |
|
| 52 | 52 | return false; |
| 53 | 53 | } |
| 54 | 54 | |