@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | { |
14 | 14 | $value = $this->getValue(); |
15 | 15 | |
16 | - if (! $this->isAllowedEmptyValue() and $this->getModel()->exists() and empty($value)) { |
|
16 | + if (!$this->isAllowedEmptyValue() and $this->getModel()->exists() and empty($value)) { |
|
17 | 17 | return; |
18 | 18 | } |
19 | 19 | |
@@ -27,11 +27,11 @@ discard block |
||
27 | 27 | { |
28 | 28 | $data = parent::getValidationRules(); |
29 | 29 | |
30 | - if (! $this->isAllowedEmptyValue() and $this->getModel()->exists()) { |
|
30 | + if (!$this->isAllowedEmptyValue() and $this->getModel()->exists()) { |
|
31 | 31 | foreach ($data as $field => $rules) { |
32 | 32 | foreach ($rules as $i => $rule) { |
33 | 33 | if ($rule == 'required') { |
34 | - unset($data[$field][$i]); |
|
34 | + unset($data[ $field ][ $i ]); |
|
35 | 35 | } |
36 | 36 | } |
37 | 37 | } |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | /** |
20 | 20 | * @var array |
21 | 21 | */ |
22 | - protected $parameters = []; |
|
22 | + protected $parameters = [ ]; |
|
23 | 23 | |
24 | 24 | /** |
25 | 25 | * @var bool |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | */ |
89 | 89 | public function setHeight($height) |
90 | 90 | { |
91 | - $this->parameters['height'] = (int) $height; |
|
91 | + $this->parameters[ 'height' ] = (int) $height; |
|
92 | 92 | |
93 | 93 | return $this; |
94 | 94 | } |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | $filteredValue = $value; |
153 | 153 | } |
154 | 154 | |
155 | - if (! empty($this->filteredFieldKey)) { |
|
155 | + if (!empty($this->filteredFieldKey)) { |
|
156 | 156 | parent::setValue($model, $attribute, $value); |
157 | 157 | parent::setValue($model, $this->filteredFieldKey, $filteredValue); |
158 | 158 | } else { |
@@ -24,7 +24,7 @@ |
||
24 | 24 | */ |
25 | 25 | public function __construct(Closure $callback = null) |
26 | 26 | { |
27 | - if (! is_null($callback)) { |
|
27 | + if (!is_null($callback)) { |
|
28 | 28 | $this->setCallback($callback); |
29 | 29 | } |
30 | 30 |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | $value = null; |
54 | 54 | } |
55 | 55 | |
56 | - if (! is_null($value)) { |
|
56 | + if (!is_null($value)) { |
|
57 | 57 | try { |
58 | 58 | $time = Carbon::parse($value); |
59 | 59 | } catch (Exception $e) { |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | */ |
94 | 94 | public function setValue(Model $model, $attribute, $value) |
95 | 95 | { |
96 | - if (! is_null($value)) { |
|
96 | + if (!is_null($value)) { |
|
97 | 97 | $value = Carbon::createFromFormat($this->getFormat(), $value); |
98 | 98 | } |
99 | 99 |
@@ -14,13 +14,13 @@ |
||
14 | 14 | */ |
15 | 15 | protected static function validate(\Illuminate\Validation\Validator $validator) |
16 | 16 | { |
17 | - $validator->after(function ($validator) { |
|
17 | + $validator->after(function($validator) { |
|
18 | 18 | /** @var \Illuminate\Http\UploadedFile $file */ |
19 | 19 | $file = array_get($validator->attributes(), 'file'); |
20 | 20 | |
21 | 21 | $size = getimagesize($file->getRealPath()); |
22 | 22 | |
23 | - if (! $size) { |
|
23 | + if (!$size) { |
|
24 | 24 | $validator->errors()->add('file', trans('sleeping_owl::validation.not_image')); |
25 | 25 | } |
26 | 26 | }); |
@@ -31,7 +31,7 @@ |
||
31 | 31 | |
32 | 32 | if (Request::input($this->getPath().'_remove')) { |
33 | 33 | $this->setValue($this->getModel(), $this->getAttribute(), null); |
34 | - } elseif (! is_null($value)) { |
|
34 | + } elseif (!is_null($value)) { |
|
35 | 35 | $this->setValue($this->getModel(), $this->getAttribute(), $value); |
36 | 36 | } |
37 | 37 | } |
@@ -11,13 +11,13 @@ discard block |
||
11 | 11 | $name = $this->getName(); |
12 | 12 | $value = Request::input($name, ''); |
13 | 13 | |
14 | - if (! empty($value)) { |
|
14 | + if (!empty($value)) { |
|
15 | 15 | $value = explode(',', $value); |
16 | 16 | } else { |
17 | - $value = []; |
|
17 | + $value = [ ]; |
|
18 | 18 | } |
19 | 19 | |
20 | - Request::merge([$name => $value]); |
|
20 | + Request::merge([ $name => $value ]); |
|
21 | 21 | parent::save(); |
22 | 22 | } |
23 | 23 | |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | { |
29 | 29 | $value = parent::getValue(); |
30 | 30 | if (is_null($value)) { |
31 | - $value = []; |
|
31 | + $value = [ ]; |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | if (is_string($value)) { |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | */ |
32 | 32 | public function getModelConfiguration() |
33 | 33 | { |
34 | - if (! $this->hasModel()) { |
|
34 | + if (!$this->hasModel()) { |
|
35 | 35 | return; |
36 | 36 | } |
37 | 37 | |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | */ |
44 | 44 | public function hasModel() |
45 | 45 | { |
46 | - return ! is_null($this->model) and class_exists($this->model); |
|
46 | + return !is_null($this->model) and class_exists($this->model); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | /** |
@@ -83,9 +83,9 @@ discard block |
||
83 | 83 | */ |
84 | 84 | public function getAccessLogic() |
85 | 85 | { |
86 | - if (! is_callable($this->accessLogic)) { |
|
86 | + if (!is_callable($this->accessLogic)) { |
|
87 | 87 | if ($this->hasModel()) { |
88 | - return function () { |
|
88 | + return function() { |
|
89 | 89 | return $this->getModelConfiguration()->isDisplayable(); |
90 | 90 | }; |
91 | 91 | } |
@@ -102,9 +102,9 @@ discard block |
||
102 | 102 | public function render($view = null) |
103 | 103 | { |
104 | 104 | $data = $this->toArray(); |
105 | - $data['pages'] = $this->getPages(); |
|
105 | + $data[ 'pages' ] = $this->getPages(); |
|
106 | 106 | |
107 | - if (! is_null($view)) { |
|
107 | + if (!is_null($view)) { |
|
108 | 108 | return view($view, $data)->render(); |
109 | 109 | } |
110 | 110 |
@@ -9,7 +9,7 @@ |
||
9 | 9 | /** |
10 | 10 | * @var array |
11 | 11 | */ |
12 | - protected $sections = []; |
|
12 | + protected $sections = [ ]; |
|
13 | 13 | |
14 | 14 | /** |
15 | 15 | * Register the service provider. |