@@ -56,14 +56,14 @@ discard block |
||
56 | 56 | { |
57 | 57 | // 라우트 등록 |
58 | 58 | intercept('Plugin@addPluginRoutes', 'route_for_pluginsample', |
59 | - function ($target, &$args) { |
|
59 | + function($target, &$args) { |
|
60 | 60 | $routes = $args[0]; |
61 | 61 | $this->registerAssignedRoute($routes); |
62 | 62 | $target($args); |
63 | 63 | } |
64 | 64 | ); |
65 | 65 | |
66 | - $args::get('/manage', function () { |
|
66 | + $args::get('/manage', function() { |
|
67 | 67 | return 'hihihi'; |
68 | 68 | }); |
69 | 69 | } |
@@ -72,16 +72,16 @@ discard block |
||
72 | 72 | { |
73 | 73 | |
74 | 74 | |
75 | - $routes->{$this->pluginId} = function () { |
|
75 | + $routes->{$this->pluginId} = function() { |
|
76 | 76 | |
77 | 77 | // for static action |
78 | 78 | require_once('board_manager.php'); |
79 | 79 | |
80 | - Route::get('/manage', function () { |
|
80 | + Route::get('/manage', function() { |
|
81 | 81 | $boardManager = BoardManager::getInstance(); |
82 | 82 | return $boardManager->getIndex(); |
83 | 83 | }); |
84 | - Route::get('/manage/list', function () { |
|
84 | + Route::get('/manage/list', function() { |
|
85 | 85 | $boardManager = BoardManager::getInstance(); |
86 | 86 | return $boardManager->getList(); |
87 | 87 | }); |
@@ -89,17 +89,17 @@ discard block |
||
89 | 89 | // for dynamic action(using alias) |
90 | 90 | require_once('board.php'); |
91 | 91 | |
92 | - Route::get('{bid}/list', function ($bid) { |
|
92 | + Route::get('{bid}/list', function($bid) { |
|
93 | 93 | $board = Board::getInstance(); |
94 | 94 | return $board->getList($bid); |
95 | 95 | }); |
96 | 96 | |
97 | - Route::get('{bid}/setting', function ($bid) { |
|
97 | + Route::get('{bid}/setting', function($bid) { |
|
98 | 98 | $board = Board::getInstance(); |
99 | 99 | return $board->getSetting($bid); |
100 | 100 | }); |
101 | 101 | |
102 | - Route::get('{bid}/{act?}', function ($bid, $act = null) { |
|
102 | + Route::get('{bid}/{act?}', function($bid, $act = null) { |
|
103 | 103 | |
104 | 104 | $act = $act ?: \Input::get('act', 'list'); |
105 | 105 | $board = Board::getInstance(); |
@@ -145,14 +145,14 @@ |
||
145 | 145 | */ |
146 | 146 | public function testGetters($entity) |
147 | 147 | { |
148 | - $this->assertEquals('title',$entity->getTitle()); |
|
149 | - $this->assertEquals(__DIR__.'/plugins/plugin_sample',$entity->getPath()); |
|
148 | + $this->assertEquals('title', $entity->getTitle()); |
|
149 | + $this->assertEquals(__DIR__.'/plugins/plugin_sample', $entity->getPath()); |
|
150 | 150 | $this->assertEquals('khongchi plugin.', $entity->getDescription()); |
151 | 151 | $this->assertCount(6, $entity->getSupport()); |
152 | 152 | $this->assertEquals('khongchi/plugin_sample', $entity->getName()); |
153 | 153 | $this->assertEquals(['xpressengine', 'board'], $entity->getKeywords()); |
154 | - $this->assertEquals('khongchi',$entity->getAuthors()[0]['name']); |
|
155 | - $this->assertEquals('LGPL-2.0',$entity->getLicense()); |
|
154 | + $this->assertEquals('khongchi', $entity->getAuthors()[0]['name']); |
|
155 | + $this->assertEquals('LGPL-2.0', $entity->getLicense()); |
|
156 | 156 | } |
157 | 157 | |
158 | 158 | private function getMetaData() |
@@ -163,7 +163,7 @@ |
||
163 | 163 | ]; |
164 | 164 | $pluginRegister->shouldReceive('get')->with(RegisterHandler::FIELD_TYPE)->andReturn($types); |
165 | 165 | $pluginRegister->shouldReceive('get')->with( |
166 | - 'type|' . RegisterHandler::FIELD_TYPE |
|
166 | + 'type|'.RegisterHandler::FIELD_TYPE |
|
167 | 167 | )->andReturn($skins); |
168 | 168 | |
169 | 169 | $result = $handler->getSkins($dfHandler); |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | $mockFile = m::mock('stdClass'); |
20 | 20 | |
21 | 21 | $instance->expects($this->once())->method('createModel')->willReturn($mockFile); |
22 | - $resource = file_get_contents(__DIR__ . '/sample.png'); |
|
22 | + $resource = file_get_contents(__DIR__.'/sample.png'); |
|
23 | 23 | |
24 | 24 | $mockGuest = m::mock('Xpressengine\Member\Entities\Guest'); |
25 | 25 | $mockGuest->shouldReceive('getId')->andReturnNull(); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | $uploaded = m::mock('Symfony\Component\HttpFoundation\File\UploadedFile'); |
29 | 29 | $uploaded->shouldReceive('isValid')->andReturn(true); |
30 | 30 | $uploaded->shouldReceive('getClientOriginalName')->andReturn('foo.jpg'); |
31 | - $uploaded->shouldReceive('getPathname')->andReturn(__DIR__ . '/sample.png'); |
|
31 | + $uploaded->shouldReceive('getPathname')->andReturn(__DIR__.'/sample.png'); |
|
32 | 32 | $uploaded->shouldReceive('getMimeType')->andReturn('image/png'); |
33 | 33 | $uploaded->shouldReceive('getSize')->andReturn(123456); |
34 | 34 | |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | |
39 | 39 | $handler->shouldReceive('store') |
40 | 40 | ->once() |
41 | - ->with($resource, m::on(function () { return true; }), 'local') |
|
41 | + ->with($resource, m::on(function() { return true; }), 'local') |
|
42 | 42 | ->andReturn(true); |
43 | 43 | |
44 | 44 | $mockFile->shouldReceive('save')->andReturn(true); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | list($handler, $auth, $keygen, $distributor, $temps) = $this->getMocks(); |
73 | 73 | $instance = new Storage($handler, $auth, $keygen, $distributor, $temps); |
74 | 74 | |
75 | - $resource = file_get_contents(__DIR__ . '/sample.png'); |
|
75 | + $resource = file_get_contents(__DIR__.'/sample.png'); |
|
76 | 76 | |
77 | 77 | $mockGuest = m::mock('Xpressengine\Member\Entities\Guest'); |
78 | 78 | $mockGuest->shouldReceive('getId')->andReturnNull(); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $uploaded = m::mock('Symfony\Component\HttpFoundation\File\UploadedFile'); |
82 | 82 | $uploaded->shouldReceive('isValid')->andReturn(true); |
83 | 83 | $uploaded->shouldReceive('getClientOriginalName')->andReturn('foo.jpg'); |
84 | - $uploaded->shouldReceive('getPathname')->andReturn(__DIR__ . '/sample.png'); |
|
84 | + $uploaded->shouldReceive('getPathname')->andReturn(__DIR__.'/sample.png'); |
|
85 | 85 | |
86 | 86 | $keygen->shouldReceive('generate')->once()->andReturn('made-key'); |
87 | 87 | |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | |
90 | 90 | $handler->shouldReceive('store') |
91 | 91 | ->once() |
92 | - ->with($resource, m::on(function () { return true; }), 'local') |
|
92 | + ->with($resource, m::on(function() { return true; }), 'local') |
|
93 | 93 | ->andReturn(false); |
94 | 94 | |
95 | 95 | try { |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | $keygen->shouldReceive('generate')->andReturn('made-key'); |
121 | 121 | $temps->shouldReceive('create')->once()->with('file_get_content')->andReturn($mockTempFile); |
122 | 122 | |
123 | - $handler->shouldReceive('store')->once()->with('file_get_content', m::on(function () { |
|
123 | + $handler->shouldReceive('store')->once()->with('file_get_content', m::on(function() { |
|
124 | 124 | return true; |
125 | 125 | }), 'local')->andReturn(true); |
126 | 126 | |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | $mockFile->shouldReceive('getKey')->andReturn('file-id'); |
191 | 191 | |
192 | 192 | $mockConn->shouldReceive('table')->once()->with('fileable_table')->andReturnSelf(); |
193 | - $mockConn->shouldReceive('insert')->once()->with(m::on(function ($args) { |
|
193 | + $mockConn->shouldReceive('insert')->once()->with(m::on(function($args) { |
|
194 | 194 | return $args['fileId'] == 'file-id' && $args['fileableId'] == 'fileable-id'; |
195 | 195 | }))->andReturnSelf(); |
196 | 196 |
@@ -333,6 +333,6 @@ |
||
333 | 333 | */ |
334 | 334 | public function setModel($model) |
335 | 335 | { |
336 | - $this->model = '\\' . ltrim($model, '\\'); |
|
336 | + $this->model = '\\'.ltrim($model, '\\'); |
|
337 | 337 | } |
338 | 338 | } |
@@ -201,7 +201,7 @@ |
||
201 | 201 | protected function makeTitle(SeoUsable $item = null) |
202 | 202 | { |
203 | 203 | if ($item) { |
204 | - return $item->getTitle() . ' - ' . $this->translator->trans($this->setting->get('mainTitle')); |
|
204 | + return $item->getTitle().' - '.$this->translator->trans($this->setting->get('mainTitle')); |
|
205 | 205 | } |
206 | 206 | |
207 | 207 | return implode(' - ', [ |
@@ -90,6 +90,6 @@ |
||
90 | 90 | return; |
91 | 91 | } |
92 | 92 | |
93 | - parent::exec(array_merge($data, ['type' => 'summary', 'username' => '@' . $this->username])); |
|
93 | + parent::exec(array_merge($data, ['type' => 'summary', 'username' => '@'.$this->username])); |
|
94 | 94 | } |
95 | 95 | } |
@@ -67,6 +67,6 @@ |
||
67 | 67 | */ |
68 | 68 | protected function makeCanonical($url) |
69 | 69 | { |
70 | - return '<link rel="canonical" href="' . $this->prependHost($url) . '" />'; |
|
70 | + return '<link rel="canonical" href="'.$this->prependHost($url).'" />'; |
|
71 | 71 | } |
72 | 72 | } |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | { |
143 | 143 | $text = Str::substr($origin, 0, $len); |
144 | 144 | |
145 | - return $origin == $text ? $text : $text . '...'; |
|
145 | + return $origin == $text ? $text : $text.'...'; |
|
146 | 146 | } |
147 | 147 | |
148 | 148 | /** |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | protected function prependHost($url) |
155 | 155 | { |
156 | 156 | if (preg_match('/^(http[s]?\:\/\/)([^\/]+)/i', $url, $matches) === 0) { |
157 | - return $this->request->root() . '/' . ltrim($url, '/'); |
|
157 | + return $this->request->root().'/'.ltrim($url, '/'); |
|
158 | 158 | } |
159 | 159 | |
160 | 160 | return $url; |