@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | $instance = new CategoryHandler(); |
194 | 194 | |
195 | 195 | $collection = m::mock('Illuminate\Database\Eloquent\Collection'); |
196 | - $collection->shouldReceive('filter')->once()->with(m::on(function () { return true; }))->andReturnSelf(); |
|
196 | + $collection->shouldReceive('filter')->once()->with(m::on(function() { return true; }))->andReturnSelf(); |
|
197 | 197 | |
198 | 198 | $mockParent = m::mock('Xpressengine\Category\Models\CategoryItem'); |
199 | 199 | $mockParent->shouldReceive('getChildren')->andReturn($collection); |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | $mockItem->shouldReceive('setAttribute')->once()->with('ordering', 1)->andReturnNull(); |
216 | 216 | $mockItem->shouldReceive('save')->once()->andReturnNull(); |
217 | 217 | |
218 | - $collection->shouldReceive('each')->once()->with(m::on(function ($closure) use ($mockItem, $mockSibling) { |
|
218 | + $collection->shouldReceive('each')->once()->with(m::on(function($closure) use ($mockItem, $mockSibling) { |
|
219 | 219 | $arr = [$mockSibling, $mockItem]; |
220 | 220 | |
221 | 221 | foreach ($arr as $idx => $model) { |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | return true; |
226 | 226 | }))->andReturnSelf(); |
227 | 227 | |
228 | - $invoke = function (&$object, $methodName, array $parameters = array()) { |
|
228 | + $invoke = function(&$object, $methodName, array $parameters = array()) { |
|
229 | 229 | $reflection = new \ReflectionClass(get_class($object)); |
230 | 230 | $method = $reflection->getMethod($methodName); |
231 | 231 | $method->setAccessible(true); |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | $mockTag->shouldReceive('getKey')->andReturn(1); |
100 | 100 | |
101 | 101 | $mockConn->shouldReceive('table')->with('taggable')->andReturnSelf(); |
102 | - $mockConn->shouldReceive('insert')->once()->with(m::on(function ($args) { |
|
102 | + $mockConn->shouldReceive('insert')->once()->with(m::on(function($args) { |
|
103 | 103 | return $args['tagId'] === 1 |
104 | 104 | && $args['taggableId'] === 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' |
105 | 105 | && $args['position'] === 0; |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | $mockTag->shouldReceive('getKey')->andReturn(1); |
125 | 125 | |
126 | 126 | $mockConn->shouldReceive('table')->with('taggable')->andReturnSelf(); |
127 | - $mockConn->shouldReceive('insert')->once()->with(m::on(function ($args) { |
|
127 | + $mockConn->shouldReceive('insert')->once()->with(m::on(function($args) { |
|
128 | 128 | return $args['tagId'] === 1 |
129 | 129 | && $args['taggableId'] === 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' |
130 | 130 | && $args['position'] === 0; |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | ->shouldAllowMockingProtectedMethods(); |
70 | 70 | |
71 | 71 | $instance->shouldReceive('find')->once()->with('plugin.dummy', 'default')->andReturnNull(); |
72 | - $instance->shouldReceive('setAncestor')->once()->with(m::on(function ($permission) { |
|
72 | + $instance->shouldReceive('setAncestor')->once()->with(m::on(function($permission) { |
|
73 | 73 | return $permission instanceof Permission; |
74 | 74 | })); |
75 | 75 | |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | |
96 | 96 | $repo->shouldReceive('findByName')->once()->with('default', 'plugin.dummy')->andReturnNull(); |
97 | 97 | $repo->shouldReceive('fetchAncestor')->once()->andReturn([$mockParent]); |
98 | - $repo->shouldReceive('insert')->once()->with(m::on(function ($value) { |
|
98 | + $repo->shouldReceive('insert')->once()->with(m::on(function($value) { |
|
99 | 99 | return $value instanceof Permission; |
100 | 100 | }))->andReturn($mockPermission); |
101 | 101 |
@@ -92,7 +92,7 @@ |
||
92 | 92 | */ |
93 | 93 | public static function setDefaultProfileImage($img) |
94 | 94 | { |
95 | - self::$profileImage= $img; |
|
95 | + self::$profileImage = $img; |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | /** |
@@ -97,7 +97,7 @@ |
||
97 | 97 | $this->mailer->send( |
98 | 98 | $this->view, |
99 | 99 | compact('mail'), |
100 | - function ($m) use ($mail, $callback) { |
|
100 | + function($m) use ($mail, $callback) { |
|
101 | 101 | $m->to($mail->getAddress()); |
102 | 102 | |
103 | 103 | if (!is_null($callback)) { |
@@ -74,7 +74,7 @@ |
||
74 | 74 | */ |
75 | 75 | public function register() |
76 | 76 | { |
77 | - $this->app->singleton([MenuHandler::class => 'xe.menu'], function ($app) { |
|
77 | + $this->app->singleton([MenuHandler::class => 'xe.menu'], function($app) { |
|
78 | 78 | return new MenuHandler( |
79 | 79 | $app['xe.keygen'], |
80 | 80 | $app['xe.config'], |
@@ -36,7 +36,7 @@ |
||
36 | 36 | { |
37 | 37 | $this->app->singleton( |
38 | 38 | 'xe.uiobject', |
39 | - function ($app) { |
|
39 | + function($app) { |
|
40 | 40 | |
41 | 41 | $aliases = $app['config']->get('xe.uiobject.aliases'); |
42 | 42 |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | { |
45 | 45 | if ($this->app['config']->get('app.debug') === true) { |
46 | 46 | |
47 | - \DB::listen(function ($query, $bindings, $time) { |
|
47 | + \DB::listen(function($query, $bindings, $time) { |
|
48 | 48 | $logFile = storage_path('logs/query.log'); |
49 | 49 | $monoLog = new Logger('log'); |
50 | 50 | $monoLog->pushHandler(new StreamHandler($logFile, Logger::INFO)); |
@@ -65,11 +65,11 @@ discard block |
||
65 | 65 | { |
66 | 66 | DynamicModel::clearBootedModels(); |
67 | 67 | |
68 | - $this->app->singleton('xe.db.proxy', function ($app) { |
|
68 | + $this->app->singleton('xe.db.proxy', function($app) { |
|
69 | 69 | return ProxyManager::instance($app['xe.register']); |
70 | 70 | }); |
71 | 71 | |
72 | - $this->app->singleton('xe.db', function ($app) { |
|
72 | + $this->app->singleton('xe.db', function($app) { |
|
73 | 73 | |
74 | 74 | $coupler = DatabaseCoupler::instance( |
75 | 75 | $app['db'], |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | { |
97 | 97 | $this->app->singleton( |
98 | 98 | 'xe.auth', |
99 | - function ($app) { |
|
99 | + function($app) { |
|
100 | 100 | $proxyClass = $app['xe.interception']->proxy(Guard::class, 'Auth'); |
101 | 101 | return new $proxyClass( |
102 | 102 | new UserProvider($app['hash'], User::class), $app['session.store'], $app['request'] |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | { |
116 | 116 | $this->app->singleton( |
117 | 117 | 'auth.password', |
118 | - function ($app) { |
|
118 | + function($app) { |
|
119 | 119 | // The password token repository is responsible for storing the email addresses |
120 | 120 | // and password reset tokens. It will be used to verify the tokens are valid |
121 | 121 | // for the given e-mail addresses. We will resolve an implementation here. |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | |
133 | 133 | // register validator for password |
134 | 134 | $broker->validator( |
135 | - function ($credentials) { |
|
135 | + function($credentials) { |
|
136 | 136 | try { |
137 | 137 | return app('xe.user')->validatePassword($credentials['password']); |
138 | 138 | } catch (\Exception $e) { |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | { |
156 | 156 | $this->app->singleton( |
157 | 157 | 'xe.auth.email', |
158 | - function ($app) { |
|
158 | + function($app) { |
|
159 | 159 | $view = $app['config']['auth.confirm.email']; |
160 | 160 | |
161 | 161 | // The password broker uses a token repository to validate tokens and send user |
@@ -170,12 +170,12 @@ discard block |
||
170 | 170 | { |
171 | 171 | $this->app->singleton( |
172 | 172 | 'xe.user.image', |
173 | - function ($app) { |
|
173 | + function($app) { |
|
174 | 174 | |
175 | 175 | $profileImgConfig = config('xe.user.profileImage'); |
176 | 176 | |
177 | 177 | return new UserImageHandler( |
178 | - $app['xe.storage'], $app['xe.media'], function () { |
|
178 | + $app['xe.storage'], $app['xe.media'], function() { |
|
179 | 179 | return Thumbnailer::getManager(); |
180 | 180 | }, $profileImgConfig |
181 | 181 | ); |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | { |
193 | 193 | $this->app->singleton( |
194 | 194 | 'auth.password.tokens', |
195 | - function ($app) { |
|
195 | + function($app) { |
|
196 | 196 | $connection = $app['db']->connection(); |
197 | 197 | |
198 | 198 | // The database token repository is an implementation of the token repository |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | { |
260 | 260 | $this->app->singleton( |
261 | 261 | 'xe.user', |
262 | - function ($app) { |
|
262 | + function($app) { |
|
263 | 263 | $proxyClass = $app['xe.interception']->proxy(UserHandler::class, 'XeUser'); |
264 | 264 | |
265 | 265 | $userHandler = new $proxyClass( |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | { |
299 | 299 | $this->app->singleton( |
300 | 300 | 'xe.users', |
301 | - function ($app) { |
|
301 | + function($app) { |
|
302 | 302 | return new UserRepository(User::class); |
303 | 303 | } |
304 | 304 | ); |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | { |
315 | 315 | $this->app->singleton( |
316 | 316 | 'xe.user.accounts', |
317 | - function ($app) { |
|
317 | + function($app) { |
|
318 | 318 | return new UserAccountRepository(UserAccount::class); |
319 | 319 | } |
320 | 320 | ); |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | { |
331 | 331 | $this->app->singleton( |
332 | 332 | 'xe.user.groups', |
333 | - function ($app) { |
|
333 | + function($app) { |
|
334 | 334 | return new UserGroupRepository(UserGroup::class); |
335 | 335 | } |
336 | 336 | ); |
@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | { |
347 | 347 | $this->app->singleton( |
348 | 348 | 'xe.user.virtualGroups', |
349 | - function ($app) { |
|
349 | + function($app) { |
|
350 | 350 | /** @var Closure $vGroups */ |
351 | 351 | $vGroups = $app['config']->get('xe.group.virtualGroup.all'); |
352 | 352 | /** @var Closure $getter */ |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | { |
362 | 362 | $this->app->singleton( |
363 | 363 | 'xe.user.emails', |
364 | - function ($app) { |
|
364 | + function($app) { |
|
365 | 365 | return new UserEmailRepository(UserEmail::class); |
366 | 366 | } |
367 | 367 | ); |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | |
370 | 370 | $this->app->singleton( |
371 | 371 | 'xe.user.pendingEmails', |
372 | - function ($app) { |
|
372 | + function($app) { |
|
373 | 373 | return new PendingEmailRepository(PendingEmail::class); |
374 | 374 | } |
375 | 375 | ); |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | { |
408 | 408 | $this->app['auth']->extend( |
409 | 409 | 'xe', |
410 | - function ($app) { |
|
410 | + function($app) { |
|
411 | 411 | return $app['xe.auth']; |
412 | 412 | } |
413 | 413 | ); |
@@ -426,7 +426,7 @@ discard block |
||
426 | 426 | // 도메인이 생략된 이메일 validation 추가 |
427 | 427 | $validator->extend( |
428 | 428 | 'email_prefix', |
429 | - function ($attribute, $value, $parameters) { |
|
429 | + function($attribute, $value, $parameters) { |
|
430 | 430 | if (!str_contains($value, '@')) { |
431 | 431 | $value .= '@test.com'; |
432 | 432 | } |
@@ -439,7 +439,7 @@ discard block |
||
439 | 439 | $displayNameValidate = app('config')->get('xe.user.displayName.validate'); |
440 | 440 | $validator->extend( |
441 | 441 | 'display_name', |
442 | - function ($attribute, $value, $parameters) use ($displayNameValidate) { |
|
442 | + function($attribute, $value, $parameters) use ($displayNameValidate) { |
|
443 | 443 | return $displayNameValidate($value); |
444 | 444 | } |
445 | 445 | ); |
@@ -451,7 +451,7 @@ discard block |
||
451 | 451 | |
452 | 452 | $validator->extend( |
453 | 453 | 'password', |
454 | - function ($attribute, $value, $parameters) use ($validate) { |
|
454 | + function($attribute, $value, $parameters) use ($validate) { |
|
455 | 455 | return $validate($value); |
456 | 456 | }, |
457 | 457 | $level['description'] |
@@ -499,9 +499,9 @@ discard block |
||
499 | 499 | $storage = $this->app['xe.storage']; |
500 | 500 | $media = $this->app['xe.media']; |
501 | 501 | User::setProfileImageResolver( |
502 | - function ($imageId) use ($default, $storage, $media) { |
|
502 | + function($imageId) use ($default, $storage, $media) { |
|
503 | 503 | try { |
504 | - if($imageId !== null) { |
|
504 | + if ($imageId !== null) { |
|
505 | 505 | /** @var Storage $storage */ |
506 | 506 | $file = File::find($imageId); |
507 | 507 | |
@@ -511,7 +511,7 @@ discard block |
||
511 | 511 | return asset($mediaFile->url()); |
512 | 512 | } |
513 | 513 | } |
514 | - } catch(\Exception $e) { |
|
514 | + } catch (\Exception $e) { |
|
515 | 515 | } |
516 | 516 | |
517 | 517 | return asset($default); |