@@ -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() |
@@ -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; |
@@ -415,7 +415,7 @@ |
||
415 | 415 | $config = $this->getConfigEntity(); |
416 | 416 | $config->shouldReceive('get')->once()->with('required')->andReturn(false); |
417 | 417 | |
418 | - $result =$handler->getRules($config); |
|
418 | + $result = $handler->getRules($config); |
|
419 | 419 | $this->assertEquals([], $result); |
420 | 420 | |
421 | 421 | $config->shouldReceive('get')->with('id')->andReturn('id'); |
@@ -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'); |
@@ -33,14 +33,14 @@ discard block |
||
33 | 33 | public function testPutDuplicateAdvisorName() |
34 | 34 | { |
35 | 35 | $advisor1 = new Advisor( |
36 | - 'ad1', 'Xpressengine\Tests\Interception\Document@insertDocument', function ($target, $args) { |
|
36 | + 'ad1', 'Xpressengine\Tests\Interception\Document@insertDocument', function($target, $args) { |
|
37 | 37 | return $target($args); |
38 | 38 | } |
39 | 39 | ); |
40 | 40 | $this->advisorCollection->put($advisor1); |
41 | 41 | |
42 | 42 | $advisor2 = new Advisor( |
43 | - 'ad1', ['Xpressengine\Tests\Interception\Document@insertDocument', 'Xpressengine\Tests\Interception\Document@deleteDocument'], function ($target, $args) { |
|
43 | + 'ad1', ['Xpressengine\Tests\Interception\Document@insertDocument', 'Xpressengine\Tests\Interception\Document@deleteDocument'], function($target, $args) { |
|
44 | 44 | return $target($args); |
45 | 45 | } |
46 | 46 | ); |
@@ -52,14 +52,14 @@ discard block |
||
52 | 52 | { |
53 | 53 | |
54 | 54 | $advisor1 = new Advisor( |
55 | - 'ad1', 'Xpressengine\Tests\Interception\Document@insertDocument', function ($target, $args) { |
|
55 | + 'ad1', 'Xpressengine\Tests\Interception\Document@insertDocument', function($target, $args) { |
|
56 | 56 | return $target($args); |
57 | 57 | } |
58 | 58 | ); |
59 | 59 | $this->advisorCollection->put($advisor1); |
60 | 60 | |
61 | 61 | $advisor2 = new Advisor( |
62 | - 'ad2', ['Xpressengine\Tests\Interception\Document@insertDocument', 'Xpressengine\Tests\Interception\Document@deleteDocument'], function ($target, $args) { |
|
62 | + 'ad2', ['Xpressengine\Tests\Interception\Document@insertDocument', 'Xpressengine\Tests\Interception\Document@deleteDocument'], function($target, $args) { |
|
63 | 63 | return $target($args); |
64 | 64 | } |
65 | 65 | |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | $this->advisorCollection->put($advisor2, ['before' => ['ad1', 'ad3']]); |
68 | 68 | |
69 | 69 | $advisor3 = new Advisor( |
70 | - 'ad3', 'Xpressengine\Tests\Interception\Document@deleteDocument', function ($target, $args) { |
|
70 | + 'ad3', 'Xpressengine\Tests\Interception\Document@deleteDocument', function($target, $args) { |
|
71 | 71 | return $target($args); |
72 | 72 | }); |
73 | 73 | |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | { |
92 | 92 | |
93 | 93 | $advisor1 = new Advisor( |
94 | - 'ad1', 'Bar@insertDocument', function ($target, $args) { |
|
94 | + 'ad1', 'Bar@insertDocument', function($target, $args) { |
|
95 | 95 | return $target($args); |
96 | 96 | } |
97 | 97 | ); |
@@ -43,7 +43,7 @@ |
||
43 | 43 | $advisor = $interceptor->addAdvisor( |
44 | 44 | 'Xpressengine\Tests\Interception\Document@insertDocument', |
45 | 45 | 'spamfilter', |
46 | - function ($target, $args) { |
|
46 | + function($target, $args) { |
|
47 | 47 | return $target($args); |
48 | 48 | } |
49 | 49 | ); |