@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | ['2', '4', '1', '3'], $list |
193 | 193 | ); |
194 | 194 | |
195 | - $list = $this->sorter->sort(['1','2','3']); |
|
195 | + $list = $this->sorter->sort(['1', '2', '3']); |
|
196 | 196 | |
197 | 197 | $this->assertEquals( |
198 | 198 | ['2', '1', '3'], $list |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | $this->sorter->add(['6', '4'], Sorter::AFTER, '5'); |
211 | 211 | $this->sorter->add('4', Sorter::AFTER, '3'); |
212 | 212 | |
213 | - $list = $this->sorter->sort(['1','2','4']); |
|
213 | + $list = $this->sorter->sort(['1', '2', '4']); |
|
214 | 214 | |
215 | 215 | // 3 5 1 4 2 |
216 | 216 |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | $keygen->shouldReceive('generate')->andReturn('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'); |
76 | 76 | |
77 | 77 | $conn->shouldReceive('table')->andReturn($query); |
78 | - $query->shouldReceive('insert')->once()->with(m::on(function ($array) { |
|
78 | + $query->shouldReceive('insert')->once()->with(m::on(function($array) { |
|
79 | 79 | return $array['key'] === 'someKey' |
80 | 80 | && $array['val'] === 'baz' |
81 | 81 | && $array['etc'] === 'a:1:{s:3:"foo";s:3:"bar";}' |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | $conn->shouldReceive('table')->andReturn($query); |
107 | 107 | $query->shouldReceive('where')->once()->with('id', 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx')->andReturnSelf(); |
108 | 108 | |
109 | - $query->shouldReceive('update')->once()->with(m::on(function ($array) { |
|
109 | + $query->shouldReceive('update')->once()->with(m::on(function($array) { |
|
110 | 110 | return $array['val'] === 'qux' && $array['etc'] === 'a:1:{s:3:"foo";s:3:"baz";}'; |
111 | 111 | })); |
112 | 112 |
@@ -56,7 +56,7 @@ |
||
56 | 56 | |
57 | 57 | $langData = new LangData(); |
58 | 58 | $langData->setData($data); |
59 | - $langData->each(function ($item, $locale, $value) use (&$retrievedData) { |
|
59 | + $langData->each(function($item, $locale, $value) use (&$retrievedData) { |
|
60 | 60 | $retrievedData[$item][$locale] = $value; |
61 | 61 | }); |
62 | 62 |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | protected function createTranslator(array $config, array $files) |
10 | 10 | { |
11 | 11 | $fileLoader = $this->getLoader(); |
12 | - foreach ( $files as $fileName => $data ) { |
|
12 | + foreach ($files as $fileName => $data) { |
|
13 | 13 | $langData = $this->getLangData($data); |
14 | 14 | $fileLoader->shouldReceive('load')->with($fileName)->andReturn($langData); |
15 | 15 | } |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | { |
56 | 56 | private $cache = []; |
57 | 57 | public function putLangData($namespace, LangData $langData) { |
58 | - $langData->each(function ($item, $locale, $value) use ($namespace) { |
|
58 | + $langData->each(function($item, $locale, $value) use ($namespace) { |
|
59 | 59 | $this->putLine($namespace, $item, $locale, $value); |
60 | 60 | }); |
61 | 61 | } |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $this->cache[$namespace][$item][$locale] = $value; |
64 | 64 | } |
65 | 65 | public function getLine($namespace, $item, $locale) { |
66 | - if ( isset($this->cache[$namespace][$item][$locale]) ) { |
|
66 | + if (isset($this->cache[$namespace][$item][$locale])) { |
|
67 | 67 | return $this->cache[$namespace][$item][$locale]; |
68 | 68 | } |
69 | 69 | return null; |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $this->cacheKey = $transCacheKey; |
79 | 79 | } |
80 | 80 | public function get($namespace, $item, $locale) { |
81 | - if ( isset($this->cache[$this->cacheKey][$namespace][$item][$locale]) ) { |
|
81 | + if (isset($this->cache[$this->cacheKey][$namespace][$item][$locale])) { |
|
82 | 82 | return $this->cache[$this->cacheKey][$namespace][$item][$locale]; |
83 | 83 | } |
84 | 84 | return null; |
@@ -16,8 +16,7 @@ |
||
16 | 16 | |
17 | 17 | protected function setUp() |
18 | 18 | { |
19 | - $this->t = $this->createTranslator |
|
20 | - ( |
|
19 | + $this->t = $this->createTranslator( |
|
21 | 20 | [ |
22 | 21 | 'locales' => ['en', 'ko'], |
23 | 22 | 'localeTexts' => [ |
@@ -4,7 +4,6 @@ |
||
4 | 4 | */ |
5 | 5 | namespace Xpressengine\Tests\Trash; |
6 | 6 | |
7 | -use Mockery as M; |
|
8 | 7 | use PHPUnit_Framework_TestCase; |
9 | 8 | use Xpressengine\Trash\TrashManager; |
10 | 9 | use Xpressengine\Trash\WasteInterface; |
@@ -58,7 +58,7 @@ |
||
58 | 58 | /** |
59 | 59 | * get config entity |
60 | 60 | * |
61 | - * @return m\MockInterface|\Xpressengine\Config\ConfigEntity |
|
61 | + * @return m\MockInterface |
|
62 | 62 | */ |
63 | 63 | private function getConfigEntity() |
64 | 64 | { |
@@ -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)); |
@@ -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' |