@@ -62,6 +62,6 @@ |
||
62 | 62 | | |
63 | 63 | */ |
64 | 64 | |
65 | - 'attributes' => [], |
|
65 | + 'attributes' => [ ], |
|
66 | 66 | |
67 | 67 | ]; |
@@ -87,6 +87,6 @@ |
||
87 | 87 | | |
88 | 88 | */ |
89 | 89 | |
90 | - 'attributes' => [], |
|
90 | + 'attributes' => [ ], |
|
91 | 91 | |
92 | 92 | ]; |
@@ -87,6 +87,6 @@ |
||
87 | 87 | | |
88 | 88 | */ |
89 | 89 | |
90 | - 'attributes' => [], |
|
90 | + 'attributes' => [ ], |
|
91 | 91 | |
92 | 92 | ]; |
@@ -87,6 +87,6 @@ |
||
87 | 87 | | |
88 | 88 | */ |
89 | 89 | |
90 | - 'attributes' => [], |
|
90 | + 'attributes' => [ ], |
|
91 | 91 | |
92 | 92 | ]; |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | * @param WysiwygFilterInterface|null $filter |
46 | 46 | * @param array $config |
47 | 47 | */ |
48 | - public function __construct($id, $name = null, WysiwygFilterInterface $filter = null, array $config = []) |
|
48 | + public function __construct($id, $name = null, WysiwygFilterInterface $filter = null, array $config = [ ]) |
|
49 | 49 | { |
50 | 50 | $this->id = $id; |
51 | 51 | $this->name = is_null($name) ? studly_case($id) : $name; |
@@ -140,8 +140,8 @@ discard block |
||
140 | 140 | |
141 | 141 | public function __call($method, $arguments) |
142 | 142 | { |
143 | - if (in_array($method, ['js', 'css'])) { |
|
144 | - call_user_func_array([$this->getPackage(), $method], $arguments); |
|
143 | + if (in_array($method, [ 'js', 'css' ])) { |
|
144 | + call_user_func_array([ $this->getPackage(), $method ], $arguments); |
|
145 | 145 | |
146 | 146 | return $this; |
147 | 147 | } |
@@ -38,8 +38,8 @@ |
||
38 | 38 | $relationName = implode('.', $parts); |
39 | 39 | } |
40 | 40 | |
41 | - if (! is_null($relationName)) { |
|
42 | - $query->whereHas($relationName, function ($q) use ($name, $value) { |
|
41 | + if (!is_null($relationName)) { |
|
42 | + $query->whereHas($relationName, function($q) use ($name, $value) { |
|
43 | 43 | $this->buildQuery($q, $name, $value); |
44 | 44 | }); |
45 | 45 | } 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 |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | { |
44 | 44 | $this->initializeElements(); |
45 | 45 | |
46 | - $activeTabs = $this->getTabs()->filter(function (TabInterface $tab) { |
|
46 | + $activeTabs = $this->getTabs()->filter(function(TabInterface $tab) { |
|
47 | 47 | return $tab->isActive(); |
48 | 48 | })->count(); |
49 | 49 | |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | */ |
58 | 58 | public function setModelClass($class) |
59 | 59 | { |
60 | - $this->getTabs()->each(function (TabInterface $tab) use ($class) { |
|
60 | + $this->getTabs()->each(function(TabInterface $tab) use ($class) { |
|
61 | 61 | if ($tab instanceof DisplayInterface) { |
62 | 62 | $tab->setModelClass($class); |
63 | 63 | } |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | */ |
138 | 138 | public function setAction($action) |
139 | 139 | { |
140 | - $this->getTabs()->each(function (TabInterface $tab) use ($action) { |
|
140 | + $this->getTabs()->each(function(TabInterface $tab) use ($action) { |
|
141 | 141 | if ($tab instanceof FormInterface) { |
142 | 142 | $tab->setAction($action); |
143 | 143 | } |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | */ |
150 | 150 | public function setId($id) |
151 | 151 | { |
152 | - $this->getTabs()->each(function (TabInterface $tab) use ($id) { |
|
152 | + $this->getTabs()->each(function(TabInterface $tab) use ($id) { |
|
153 | 153 | if ($tab instanceof FormInterface) { |
154 | 154 | $tab->setId($id); |
155 | 155 | } |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | foreach ($this->getTabs() as $tab) { |
167 | 167 | if ($tab instanceof FormInterface) { |
168 | 168 | $result = $tab->validateForm($model); |
169 | - if (! is_null($result)) { |
|
169 | + if (!is_null($result)) { |
|
170 | 170 | return $result; |
171 | 171 | } |
172 | 172 | } |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | */ |
179 | 179 | public function saveForm(ModelConfigurationInterface $model) |
180 | 180 | { |
181 | - $this->getTabs()->each(function (TabInterface $tab) use ($model) { |
|
181 | + $this->getTabs()->each(function(TabInterface $tab) use ($model) { |
|
182 | 182 | if ($tab instanceof FormInterface) { |
183 | 183 | $tab->saveForm($model); |
184 | 184 | } |
@@ -17,13 +17,13 @@ discard block |
||
17 | 17 | */ |
18 | 18 | protected static function validate(Validator $validator) |
19 | 19 | { |
20 | - $validator->after(function ($validator) { |
|
20 | + $validator->after(function($validator) { |
|
21 | 21 | /** @var \Illuminate\Http\UploadedFile $file */ |
22 | 22 | $file = array_get($validator->attributes(), 'file'); |
23 | 23 | |
24 | 24 | $size = getimagesize($file->getRealPath()); |
25 | 25 | |
26 | - if (! $size) { |
|
26 | + if (!$size) { |
|
27 | 27 | $validator->errors()->add('file', trans('sleeping_owl::validation.not_image')); |
28 | 28 | } |
29 | 29 | }); |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | $image = \Intervention\Image\Facades\Image::make($file); |
46 | 46 | |
47 | 47 | foreach ($settings as $method => $args) { |
48 | - call_user_func_array([$image, $method], $args); |
|
48 | + call_user_func_array([ $image, $method ], $args); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | return $image->save($path.'/'.$filename); |
@@ -77,5 +77,5 @@ discard block |
||
77 | 77 | /** |
78 | 78 | * @var array |
79 | 79 | */ |
80 | - protected $uploadValidationRules = ['required', 'image']; |
|
80 | + protected $uploadValidationRules = [ 'required', 'image' ]; |
|
81 | 81 | } |