@@ -70,19 +70,19 @@ |
||
70 | 70 | { |
71 | 71 | $widgetHandler = $this->widgetHandler; |
72 | 72 | |
73 | - $content = preg_replace_callback('/<xewidget (.*?)<\/xewidget>/s', function ($matches) use ($widgetHandler) { |
|
73 | + $content = preg_replace_callback('/<xewidget (.*?)<\/xewidget>/s', function($matches) use ($widgetHandler) { |
|
74 | 74 | |
75 | 75 | try { |
76 | 76 | $widgetXmlString = $matches[0]; |
77 | 77 | $simpleXmlObj = simplexml_load_string($widgetXmlString); |
78 | 78 | |
79 | - $widgetId = (string)$simpleXmlObj->attributes()->id; |
|
79 | + $widgetId = (string) $simpleXmlObj->attributes()->id; |
|
80 | 80 | |
81 | 81 | $inputs = []; |
82 | 82 | |
83 | 83 | foreach ($simpleXmlObj->param as $param) { |
84 | - $key = (string)$param['title']; |
|
85 | - $value = (string)$param[0]; |
|
84 | + $key = (string) $param['title']; |
|
85 | + $value = (string) $param[0]; |
|
86 | 86 | $inputs[$key] = $value; |
87 | 87 | } |
88 | 88 |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | { |
243 | 243 | list($repo, $validator) = $this->getMocks(); |
244 | 244 | |
245 | - $func = function () { |
|
245 | + $func = function() { |
|
246 | 246 | return 'called'; |
247 | 247 | }; |
248 | 248 | |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | $repo->shouldReceive('save')->twice(); |
398 | 398 | |
399 | 399 | |
400 | - $this->invokeMethod($instance, 'convey', [$mockConfig, function () { return true; }, null]); |
|
400 | + $this->invokeMethod($instance, 'convey', [$mockConfig, function() { return true; }, null]); |
|
401 | 401 | } |
402 | 402 | |
403 | 403 | public function testRemove() |
@@ -315,6 +315,9 @@ |
||
315 | 315 | ]; |
316 | 316 | } |
317 | 317 | |
318 | + /** |
|
319 | + * @param string $methodName |
|
320 | + */ |
|
318 | 321 | private function invokeMethod(&$object, $methodName, array $parameters = array()) |
319 | 322 | { |
320 | 323 | $reflection = new \ReflectionClass(get_class($object)); |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | $conn->shouldReceive('table')->once()->withAnyArgs()->andReturn($conn); |
21 | 21 | $conn->shouldReceive('where')->once()->with('siteKey', 'default')->andReturn($conn); |
22 | 22 | $conn->shouldReceive('where')->once()->with('name', 'board.instance1')->andReturn($conn); |
23 | - $conn->shouldReceive('first')->once()->withNoArgs()->andReturn((object)[ |
|
23 | + $conn->shouldReceive('first')->once()->withNoArgs()->andReturn((object) [ |
|
24 | 24 | 'name' => 'board.instance1', |
25 | 25 | 'vars' => '{"limit":20,"perPage":10}' |
26 | 26 | ]); |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | $conn->shouldReceive('whereRaw')->once()->with("'board.instance1' like concat(`name`, '.', '%')")->andReturn($conn); |
44 | 44 | $conn->shouldReceive('where')->once()->with('name', '<>', 'board.instance1')->andReturn($conn); |
45 | 45 | $conn->shouldReceive('get')->once()->withNoArgs()->andReturn([ |
46 | - (object)[ |
|
46 | + (object) [ |
|
47 | 47 | 'name' => 'board', |
48 | 48 | 'vars' => '{"limit":10,"perPage":5}' |
49 | 49 | ] |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | $conn->shouldReceive('where')->once()->with('name', 'like', 'board.%')->andReturn($conn); |
70 | 70 | $conn->shouldReceive('where')->once()->with('name', '<>', 'board')->andReturn($conn); |
71 | 71 | $conn->shouldReceive('get')->once()->withNoArgs()->andReturn([ |
72 | - (object)[ |
|
72 | + (object) [ |
|
73 | 73 | 'name' => 'board.instance1', |
74 | 74 | 'vars' => '{"limit":20,"perPage":10}' |
75 | 75 | ] |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | $conn->shouldReceive('table')->withAnyArgs()->andReturn($conn); |
136 | 136 | $conn->shouldReceive('where')->once()->with('siteKey', 'default')->andReturn($conn); |
137 | 137 | $conn->shouldReceive('where')->once()->with('name', 'board.instance1')->andReturn($conn); |
138 | - $conn->shouldReceive('first')->once()->withNoArgs()->andReturn((object)[ |
|
138 | + $conn->shouldReceive('first')->once()->withNoArgs()->andReturn((object) [ |
|
139 | 139 | 'name' => 'board.instance1', |
140 | 140 | 'vars' => '{"limit":20,"perPage":10}' |
141 | 141 | ]); |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | |
182 | 182 | $conn->shouldReceive('table')->withAnyArgs()->andReturn($query); |
183 | 183 | $query->shouldReceive('where')->once()->with('siteKey', 'default')->andReturn($query); |
184 | - $query->shouldReceive('where')->once()->with(m::on(function ($closure) use ($query) { |
|
184 | + $query->shouldReceive('where')->once()->with(m::on(function($closure) use ($query) { |
|
185 | 185 | $query->shouldReceive('where')->once()->with('name', 'like', 'board.instance1.%')->andReturn($query); |
186 | 186 | $query->shouldReceive('orWhere')->once()->with('name', 'board.instance1')->andReturn($query); |
187 | 187 | |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | |
209 | 209 | $conn->shouldReceive('table')->andReturn($query); |
210 | 210 | $query->shouldReceive('where')->twice()->with('siteKey', 'default')->andReturnSelf(); |
211 | - $query->shouldReceive('where')->twice()->with(m::on(function ($closure) use ($query) { |
|
211 | + $query->shouldReceive('where')->twice()->with(m::on(function($closure) use ($query) { |
|
212 | 212 | $query->shouldReceive('where')->once()->with('name', 'board.instance1')->andReturnSelf(); |
213 | 213 | $query->shouldReceive('orWhere')->once()->with('name', 'like', 'board.instance1.%')->andReturnSelf(); |
214 | 214 | |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | |
243 | 243 | $conn->shouldReceive('table')->andReturn($query); |
244 | 244 | $query->shouldReceive('where')->once()->with('siteKey', 'default')->andReturnSelf(); |
245 | - $query->shouldReceive('where')->once()->with(m::on(function ($closure) use ($query) { |
|
245 | + $query->shouldReceive('where')->once()->with(m::on(function($closure) use ($query) { |
|
246 | 246 | $query->shouldReceive('where')->once()->with('name', 'board.instance1')->andReturnSelf(); |
247 | 247 | $query->shouldReceive('orWhere')->once()->with('name', 'like', 'board.instance1.%')->andReturnSelf(); |
248 | 248 |
@@ -100,7 +100,7 @@ |
||
100 | 100 | /** @var DatabaseCoupler $databaseCoupler */ |
101 | 101 | $connector = new VirtualConnection($databaseCoupler, self::CONN_NAME, $this->databaseConfig); |
102 | 102 | |
103 | - $connection = $connector->getDefaultConnection(); |
|
103 | + $connection = $connector->getDefaultConnection(); |
|
104 | 104 | |
105 | 105 | $this->assertInstanceOf('Illuminate\Database\Connection', $connection); |
106 | 106 | } |
@@ -185,13 +185,13 @@ discard block |
||
185 | 185 | $fluent->shouldReceive('default'); |
186 | 186 | $table->shouldReceive('integer')->andReturn($fluent); |
187 | 187 | |
188 | - $schemaBuilder->shouldReceive('create')->with('tableName', m::on(function ($closure) use ($table) { |
|
188 | + $schemaBuilder->shouldReceive('create')->with('tableName', m::on(function($closure) use ($table) { |
|
189 | 189 | call_user_func($closure, $table); |
190 | 190 | |
191 | 191 | return true; |
192 | 192 | })); |
193 | 193 | |
194 | - $schemaBuilder->shouldReceive('create')->with('revisionTableName', m::on(function ($closure) use ($table) { |
|
194 | + $schemaBuilder->shouldReceive('create')->with('revisionTableName', m::on(function($closure) use ($table) { |
|
195 | 195 | call_user_func($closure, $table); |
196 | 196 | |
197 | 197 | return true; |
@@ -251,13 +251,13 @@ discard block |
||
251 | 251 | |
252 | 252 | $schemaBuilder->shouldReceive('hasTable')->andReturn(true); |
253 | 253 | $schemaBuilder->shouldReceive('hasColumn')->andReturn(false); |
254 | - $schemaBuilder->shouldReceive('table')->with('tableName', m::on(function ($closure) use ($table) { |
|
254 | + $schemaBuilder->shouldReceive('table')->with('tableName', m::on(function($closure) use ($table) { |
|
255 | 255 | call_user_func($closure, $table); |
256 | 256 | |
257 | 257 | return true; |
258 | 258 | })); |
259 | 259 | |
260 | - $schemaBuilder->shouldReceive('table')->with('revisionTableName', m::on(function ($closure) use ($table) { |
|
260 | + $schemaBuilder->shouldReceive('table')->with('revisionTableName', m::on(function($closure) use ($table) { |
|
261 | 261 | call_user_func($closure, $table); |
262 | 262 | |
263 | 263 | return true; |
@@ -346,13 +346,13 @@ discard block |
||
346 | 346 | |
347 | 347 | $schemaBuilder->shouldReceive('hasTable')->andReturn(true); |
348 | 348 | $schemaBuilder->shouldReceive('hasColumn')->andReturn(false); |
349 | - $schemaBuilder->shouldReceive('table')->with('tableName', m::on(function ($closure) use ($table) { |
|
349 | + $schemaBuilder->shouldReceive('table')->with('tableName', m::on(function($closure) use ($table) { |
|
350 | 350 | call_user_func($closure, $table); |
351 | 351 | |
352 | 352 | return true; |
353 | 353 | })); |
354 | 354 | |
355 | - $schemaBuilder->shouldReceive('table')->with('revisionTableName', m::on(function ($closure) use ($table) { |
|
355 | + $schemaBuilder->shouldReceive('table')->with('revisionTableName', m::on(function($closure) use ($table) { |
|
356 | 356 | call_user_func($closure, $table); |
357 | 357 | |
358 | 358 | return true; |
@@ -548,7 +548,7 @@ discard block |
||
548 | 548 | $join = m::mock('Illuminate\Database\Query\JoinClause'); |
549 | 549 | $join->shouldReceive('on'); |
550 | 550 | |
551 | - $query->shouldReceive('leftJoin')->with('tableName', m::on(function ($closure) use ($join) { |
|
551 | + $query->shouldReceive('leftJoin')->with('tableName', m::on(function($closure) use ($join) { |
|
552 | 552 | call_user_func($closure, $join); |
553 | 553 | |
554 | 554 | return true; |
@@ -713,7 +713,7 @@ discard block |
||
713 | 713 | $join = m::mock('Illuminate\Database\Query\JoinClause'); |
714 | 714 | $join->shouldReceive('on')->andReturnSelf(); |
715 | 715 | |
716 | - $query->shouldReceive('leftJoin')->with('revisionTableName', m::on(function ($closure) use ($join) { |
|
716 | + $query->shouldReceive('leftJoin')->with('revisionTableName', m::on(function($closure) use ($join) { |
|
717 | 717 | call_user_func($closure, $join); |
718 | 718 | |
719 | 719 | return true; |
@@ -41,7 +41,7 @@ |
||
41 | 41 | public function testOutputComposer() |
42 | 42 | { |
43 | 43 | $html = new Html(); |
44 | - $html->content(function(){ |
|
44 | + $html->content(function() { |
|
45 | 45 | return 'hi'; |
46 | 46 | })->load(); |
47 | 47 | $output = Html::output('body.append'); |
@@ -203,10 +203,10 @@ discard block |
||
203 | 203 | $this->handler->shouldReceive('getPicture')->once()->with($mockMedia)->andReturn($mockImage); |
204 | 204 | |
205 | 205 | $mockCommand = m::mock('Xpressengine\Media\Commands\AbstractCommand'); |
206 | - $mockCommand->shouldReceive('setDimension')->once()->with(m::on(function ($object) { |
|
206 | + $mockCommand->shouldReceive('setDimension')->once()->with(m::on(function($object) { |
|
207 | 207 | return $object instanceof Dimension && $object->getWidth() == 200 && $object->getHeight() == 200; |
208 | 208 | })); |
209 | - $mockCommand->shouldReceive('setDimension')->once()->with(m::on(function ($object) { |
|
209 | + $mockCommand->shouldReceive('setDimension')->once()->with(m::on(function($object) { |
|
210 | 210 | return $object instanceof Dimension && $object->getWidth() == 400 && $object->getHeight() == 400; |
211 | 211 | })); |
212 | 212 | $factory->shouldReceive('make')->twice()->with('fit')->andReturn($mockCommand); |
@@ -230,8 +230,8 @@ discard block |
||
230 | 230 | 'path' => 'path', |
231 | 231 | 'type' => 'fit', |
232 | 232 | 'dimensions' => [ |
233 | - 'S' => ['width' => 200,'height' => 200,], |
|
234 | - 'M' => ['width' => 400,'height' => 400,], |
|
233 | + 'S' => ['width' => 200, 'height' => 200, ], |
|
234 | + 'M' => ['width' => 400, 'height' => 400, ], |
|
235 | 235 | ], |
236 | 236 | ] |
237 | 237 | ]; |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | $view, $request, $theme, $skin, $settings, $instanceConfig |
139 | 139 | ); |
140 | 140 | |
141 | - $presenter->register('html', function () { |
|
141 | + $presenter->register('html', function() { |
|
142 | 142 | }); |
143 | 143 | |
144 | 144 | $reflection = new \ReflectionClass(get_class($presenter)); |
@@ -398,11 +398,11 @@ discard block |
||
398 | 398 | ); |
399 | 399 | |
400 | 400 | $htmlRenderer = m::mock('HtmlRenderer', 'Xpressengine\Presenter\RendererInterface'); |
401 | - $presenter->register('html', function ($presenter) use ($htmlRenderer) { |
|
401 | + $presenter->register('html', function($presenter) use ($htmlRenderer) { |
|
402 | 402 | return new $htmlRenderer($presenter); |
403 | 403 | }); |
404 | 404 | $jsonRenderer = m::mock('JsonRenderer', 'Xpressengine\Presenter\RendererInterface'); |
405 | - $presenter->register('json', function ($presenter) use ($jsonRenderer) { |
|
405 | + $presenter->register('json', function($presenter) use ($jsonRenderer) { |
|
406 | 406 | return new $jsonRenderer($presenter); |
407 | 407 | }); |
408 | 408 | |
@@ -440,11 +440,11 @@ discard block |
||
440 | 440 | ); |
441 | 441 | |
442 | 442 | $htmlRenderer = m::mock('HtmlRenderer', 'Xpressengine\Presenter\RendererInterface'); |
443 | - $presenter->register('html', function ($presenter) use ($htmlRenderer) { |
|
443 | + $presenter->register('html', function($presenter) use ($htmlRenderer) { |
|
444 | 444 | return new $htmlRenderer($presenter); |
445 | 445 | }); |
446 | 446 | $jsonRenderer = m::mock('JsonRenderer', 'Xpressengine\Presenter\RendererInterface'); |
447 | - $presenter->register('json', function ($presenter) use ($jsonRenderer) { |
|
447 | + $presenter->register('json', function($presenter) use ($jsonRenderer) { |
|
448 | 448 | return new $jsonRenderer($presenter); |
449 | 449 | }); |
450 | 450 | |
@@ -496,7 +496,7 @@ discard block |
||
496 | 496 | ); |
497 | 497 | |
498 | 498 | $htmlRenderer = m::mock('HtmlRenderer'); |
499 | - $presenter->register('html', function ($presenter) use ($htmlRenderer) { |
|
499 | + $presenter->register('html', function($presenter) use ($htmlRenderer) { |
|
500 | 500 | return new $htmlRenderer($presenter); |
501 | 501 | }); |
502 | 502 |
@@ -56,7 +56,7 @@ |
||
56 | 56 | $mockConfig->shouldReceive('set')->once()->with('uuid', $id); |
57 | 57 | |
58 | 58 | $cfg->shouldReceive('set')->once()->with( |
59 | - m::on(function () { return true; }), |
|
59 | + m::on(function() { return true; }), |
|
60 | 60 | [ |
61 | 61 | 'foo' => 'bar', |
62 | 62 | 'baz' => 'qux' |