@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | $temporaries = XeTemporary::get(Input::get('key')); |
15 | 15 | |
16 | 16 | if (!empty($temporaries)) { |
17 | - uasort($temporaries, function ($a, $b) { |
|
17 | + uasort($temporaries, function($a, $b) { |
|
18 | 18 | if ($a->createdAt == $b->createdAt) { |
19 | 19 | return 0; |
20 | 20 | } |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | $etc = Input::except(['_token', 'key', 'rep']); |
34 | 34 | $temporary = XeTemporary::set(Input::get('key'), Input::get(Input::get('rep')), $etc); |
35 | 35 | } catch (\Exception $e) { |
36 | - echo $e->getMessage() . '|' . $e->getFile() . '|' . $e->getLine(); |
|
36 | + echo $e->getMessage().'|'.$e->getFile().'|'.$e->getLine(); |
|
37 | 37 | |
38 | 38 | throw $e; |
39 | 39 | } |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | |
16 | 16 | public function boot() |
17 | 17 | { |
18 | - $this->app['validator']->extend('LangRequired', function ($attribute, $value) { |
|
18 | + $this->app['validator']->extend('LangRequired', function($attribute, $value) { |
|
19 | 19 | $fields = $this->app['request']->all(); |
20 | 20 | $protocol = 'xe_lang_preprocessor://'; |
21 | 21 | $prefix = null; |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | } |
30 | 30 | |
31 | 31 | $locale = $this->app['xe.translator']->getLocale(); |
32 | - $name = $prefix . '/locale/' . $locale; |
|
32 | + $name = $prefix.'/locale/'.$locale; |
|
33 | 33 | $validator = null; |
34 | 34 | |
35 | 35 | foreach ($fields as $key => $val) { |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | |
52 | 52 | public function register() |
53 | 53 | { |
54 | - $this->app->singleton('xe.translator', function ($app) { |
|
54 | + $this->app->singleton('xe.translator', function($app) { |
|
55 | 55 | $debug = $app['config']['app.debug']; |
56 | 56 | $keyGen = $app['xe.keygen']; |
57 | 57 | $cache = new TransCache($app['cache']->driver('lang'), $debug); |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | { |
68 | 68 | $this->app->singleton( |
69 | 69 | [RouteRepository::class => 'xe.router'], |
70 | - function ($app) { |
|
70 | + function($app) { |
|
71 | 71 | $repo = new DatabaseRouteRepository($app['config'], InstanceRoute::class); |
72 | 72 | |
73 | 73 | if (env('APP_DEBUG') != true) { |
@@ -130,12 +130,12 @@ discard block |
||
130 | 130 | */ |
131 | 131 | protected function registerSettingsMacro(Router $router) |
132 | 132 | { |
133 | - $manageMacro = function ($key, Closure $callback, $routeOptions = null) { |
|
133 | + $manageMacro = function($key, Closure $callback, $routeOptions = null) { |
|
134 | 134 | |
135 | 135 | $key = str_replace('.', '/', $key); |
136 | 136 | |
137 | 137 | $attributes = [ |
138 | - 'prefix' => config('xe.routing.settingsPrefix') . '/' . $key, |
|
138 | + 'prefix' => config('xe.routing.settingsPrefix').'/'.$key, |
|
139 | 139 | 'middleware' => ['settings'] |
140 | 140 | ]; |
141 | 141 | |
@@ -161,12 +161,12 @@ discard block |
||
161 | 161 | */ |
162 | 162 | protected function registerFixedMacro(Router $router) |
163 | 163 | { |
164 | - $fixedMacro = function ($key, Closure $callback, $routeOptions = null) { |
|
164 | + $fixedMacro = function($key, Closure $callback, $routeOptions = null) { |
|
165 | 165 | |
166 | 166 | $newKey = str_replace('@', '/', $key); |
167 | 167 | |
168 | 168 | $attributes = [ |
169 | - 'prefix' => config('xe.routing.fixedPrefix') . '/' . $newKey |
|
169 | + 'prefix' => config('xe.routing.fixedPrefix').'/'.$newKey |
|
170 | 170 | ]; |
171 | 171 | |
172 | 172 | if ($routeOptions !== null and is_array($routeOptions)) { |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | protected function registerInstanceMacro(Router $router) |
193 | 193 | { |
194 | 194 | static $seq = 1; |
195 | - $instanceMacro = function ($key, Closure $callback, $routeOptions = null) use (&$seq) { |
|
195 | + $instanceMacro = function($key, Closure $callback, $routeOptions = null) use (&$seq) { |
|
196 | 196 | |
197 | 197 | $pattern = '{instanceGroup'.$seq++.'}'; |
198 | 198 | $attributes = [ |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | $attributes = array_merge($attributes, $routeOptions); |
207 | 207 | |
208 | 208 | if (isset($routeOptions['middleware'])) { |
209 | - $attributes['middleware'] .= '|' . $routeOptions['middleware']; |
|
209 | + $attributes['middleware'] .= '|'.$routeOptions['middleware']; |
|
210 | 210 | } |
211 | 211 | } |
212 | 212 |
@@ -10,7 +10,7 @@ |
||
10 | 10 | |
11 | 11 | public function install() |
12 | 12 | { |
13 | - Schema::create('translation', function (Blueprint $table) { |
|
13 | + Schema::create('translation', function(Blueprint $table) { |
|
14 | 14 | $table->engine = "InnoDB"; |
15 | 15 | |
16 | 16 | $table->increments('id'); |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | * XE에서 새로운 request가 생성될 때에는 이 ReqeustFactory는 사용되어 항상 Xpressengine\Http\Request를 생성하도록 한다 |
17 | 17 | */ |
18 | 18 | Request::setFactory( |
19 | - function ( |
|
19 | + function( |
|
20 | 20 | $query, |
21 | 21 | $request, |
22 | 22 | $attributes, |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | |
84 | 84 | $app->bind( |
85 | 85 | 'path.public', |
86 | - function () { |
|
86 | + function() { |
|
87 | 87 | return base_path(); |
88 | 88 | } |
89 | 89 | ); |
@@ -33,11 +33,11 @@ |
||
33 | 33 | Thumbnailer::setManager($manager); |
34 | 34 | $instance = new Thumbnailer(); |
35 | 35 | |
36 | - $imageContent = file_get_contents(__DIR__ . '/sample.png'); |
|
36 | + $imageContent = file_get_contents(__DIR__.'/sample.png'); |
|
37 | 37 | $mockCommand = m::mock('Xpressengine\Media\Commands\CommandInterface'); |
38 | 38 | |
39 | 39 | $mockCommand->shouldReceive('getName')->andReturn('letter'); |
40 | - $mockCommand->shouldReceive('setOriginDimension')->once()->with(m::on(function ($object) { |
|
40 | + $mockCommand->shouldReceive('setOriginDimension')->once()->with(m::on(function($object) { |
|
41 | 41 | return $object instanceof Dimension; |
42 | 42 | })); |
43 | 43 | $mockCommand->shouldReceive('getMethod')->andReturn('resize'); |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $advisorStore = $proxy->getAdvisorCollection(); |
47 | 47 | |
48 | 48 | $advisor1 = new Advisor( |
49 | - 'ad1', 'Xpressengine\Tests\Interception\Document@insertDocument', function ($target, $title, $content) { |
|
49 | + 'ad1', 'Xpressengine\Tests\Interception\Document@insertDocument', function($target, $title, $content) { |
|
50 | 50 | return 'ad1('.$target($title, $content).')'; |
51 | 51 | } |
52 | 52 | ); |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | $advisor2 = new Advisor( |
56 | 56 | 'ad2', |
57 | 57 | ['Xpressengine\Tests\Interception\Document@insertDocument', 'Xpressengine\Tests\Interception\Document@checkInput'], |
58 | - function ($target, $title, $content) { |
|
58 | + function($target, $title, $content) { |
|
59 | 59 | if ($target->invokedMethod == 'insertDocument') { |
60 | 60 | return 'ad2('.$target($title, $content).')'; |
61 | 61 | } |
@@ -66,12 +66,12 @@ discard block |
||
66 | 66 | return [$title, $content]; |
67 | 67 | } |
68 | 68 | ); |
69 | - $advisorStore->put($advisor2, ['before'=>['ad1','ad3']]); |
|
69 | + $advisorStore->put($advisor2, ['before'=>['ad1', 'ad3']]); |
|
70 | 70 | |
71 | 71 | $advisor3 = new Advisor( |
72 | 72 | 'ad3', |
73 | 73 | 'Xpressengine\Tests\Interception\Document@checkInput', |
74 | - function ($target, $title, $content) { |
|
74 | + function($target, $title, $content) { |
|
75 | 75 | return ['modified '.$title.' by ad2', 'modified '.$content.' by ad2']; |
76 | 76 | }, |
77 | 77 | 'ad1' |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | new Advisor( |
94 | 94 | 'ad1', |
95 | 95 | 'Xpressengine\Tests\Interception\Document@add', |
96 | - function ($target, $obj) { |
|
96 | + function($target, $obj) { |
|
97 | 97 | $obj->title = 'modified '.$obj->title; |
98 | 98 | return $target($obj); |
99 | 99 | } |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | |
115 | 115 | $advisor1 = new Advisor( |
116 | 116 | 'ad1', 'Xpressengine\Tests\Interception\Document@magicMethod', |
117 | - function ($target, $title, $content) { |
|
117 | + function($target, $title, $content) { |
|
118 | 118 | return 'ad1('.$target($title, $content).')'; |
119 | 119 | } |
120 | 120 | ); |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | |
123 | 123 | $advisor2 = new Advisor( |
124 | 124 | 'ad2', 'Xpressengine\Tests\Interception\Document@magicMethod', |
125 | - function ($target, $title, $content) { |
|
125 | + function($target, $title, $content) { |
|
126 | 126 | return 'ad2('.$target($title, $content).')'; |
127 | 127 | } |
128 | 128 | ); |
@@ -21,14 +21,14 @@ discard block |
||
21 | 21 | $interceptor->addAdvisor( |
22 | 22 | 'Xpressengine\Tests\Interception\Document@insertDocument', |
23 | 23 | 'ad1', |
24 | - function ($target, $title, $content) { |
|
24 | + function($target, $title, $content) { |
|
25 | 25 | return 'ad1('.$target($title, $content).')'; |
26 | 26 | } |
27 | 27 | ); |
28 | 28 | $interceptor->addAdvisor( |
29 | 29 | ['Xpressengine\Tests\Interception\Document@insertDocument', 'Xpressengine\Tests\Interception\Document@checkInput'], |
30 | 30 | ['ad2' => ['ad1', 'ad3']], |
31 | - function ($target, $title, $content) { |
|
31 | + function($target, $title, $content) { |
|
32 | 32 | if ($target->invokedMethod == 'insertDocument') { |
33 | 33 | return 'ad2('.$target($title, $content).')'; |
34 | 34 | } |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | $interceptor->addAdvisor( |
60 | 60 | ['Xpressengine\Tests\Interception\Document@insertDocument', 'Xpressengine\Tests\Interception\Document@checkInput'], |
61 | 61 | ['ad2' => ['ad3']], |
62 | - function ($target, $title, $content) { |
|
62 | + function($target, $title, $content) { |
|
63 | 63 | if ($target->invokedMethod == 'insertDocument') { |
64 | 64 | return 'ad2('.$target($title, $content).')'; |
65 | 65 | } |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | $interceptor->addAdvisor( |
75 | 75 | 'Xpressengine\Tests\Interception\Document@insertDocument', |
76 | 76 | ['ad1' => ['after' => 'ad2']], |
77 | - function ($target, $title, $content) { |
|
77 | + function($target, $title, $content) { |
|
78 | 78 | return 'ad1('.$target($title, $content).')'; |
79 | 79 | } |
80 | 80 | ); |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | public function testCreate() |
16 | 16 | { |
17 | 17 | $advisor = new Advisor( |
18 | - 'ad1', 'TargetClass@originMethod', function ($target, $args) { |
|
18 | + 'ad1', 'TargetClass@originMethod', function($target, $args) { |
|
19 | 19 | return $target($args); |
20 | 20 | } |
21 | 21 | ); |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | { |
30 | 30 | |
31 | 31 | $advisor = new Advisor( |
32 | - 'ad1', 'TargetClass@originMethod', function ($target, $args) { |
|
32 | + 'ad1', 'TargetClass@originMethod', function($target, $args) { |
|
33 | 33 | return $target($args); |
34 | 34 | } |
35 | 35 | ); |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $this->assertEquals( |
87 | 87 | 'foo', |
88 | 88 | $advice( |
89 | - function ($arg) { |
|
89 | + function($arg) { |
|
90 | 90 | return $arg; |
91 | 91 | }, |
92 | 92 | 'foo' |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | public function testSetAdvice(Advisor $advisor) |
102 | 102 | { |
103 | 103 | $advisor->setAdvice( |
104 | - function ($target, $args) { |
|
104 | + function($target, $args) { |
|
105 | 105 | return $target($args).'bar'; |
106 | 106 | } |
107 | 107 | ); |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | $this->assertEquals( |
112 | 112 | 'foobar', |
113 | 113 | $advice( |
114 | - function ($arg) { |
|
114 | + function($arg) { |
|
115 | 115 | return $arg; |
116 | 116 | }, |
117 | 117 | 'foo' |