Skip to content

Commit 7632561

Browse files
committed
style: fix with psr2
1 parent b115dca commit 7632561

File tree

4 files changed

+16
-6
lines changed

4 files changed

+16
-6
lines changed

src/LfmItem.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ public function __construct(LfmPath $lfm, Lfm $helper, $isDirectory = false)
2020
$this->lfm = $lfm->thumb(false);
2121
$this->helper = $helper;
2222
$this->isDirectory = $isDirectory;
23-
$this->columns = $helper->config('item_columns')??['name', 'url', 'time', 'icon', 'is_file', 'is_image', 'thumb_url'];
23+
$this->columns = $helper->config('item_columns') ?:
24+
['name', 'url', 'time', 'icon', 'is_file', 'is_image', 'thumb_url'];
2425
}
2526

2627
public function __get($var_name)

tests/LfmItemTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ public function setUp()
1919

2020
$this->lfm_path = m::mock(LfmPath::class);
2121
$this->lfm_path->shouldReceive('thumb')->andReturn($this->lfm_path);
22-
$this->lfm->shouldReceive('config')->with('item_columns')->andReturn(['name', 'url', 'time', 'icon', 'is_file', 'is_image', 'thumb_url']);
22+
$this->lfm->shouldReceive('config')
23+
->with('item_columns')
24+
->andReturn(['name', 'url', 'time', 'icon', 'is_file', 'is_image', 'thumb_url']);
2325
}
2426

2527
public function tearDown()

tests/LfmPathTest.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ public function testFolders()
126126
$helper->shouldReceive('getThumbFolderName')->andReturn('thumbs');
127127
$helper->shouldReceive('isRunningOnWindows')->andReturn(false);
128128
$helper->shouldReceive('ds')->andReturn('/');
129-
$helper->shouldReceive('config')->with('item_columns')->andReturn(['name', 'url', 'time', 'icon', 'is_file', 'is_image', 'thumb_url']);
129+
$helper->shouldReceive('config')
130+
->with('item_columns')
131+
->andReturn(['name', 'url', 'time', 'icon', 'is_file', 'is_image', 'thumb_url']);
130132

131133
$path = new LfmPath($helper);
132134

@@ -146,7 +148,9 @@ public function testFiles()
146148
$helper->shouldReceive('getNameFromPath')->andReturn('bar');
147149
$helper->shouldReceive('isRunningOnWindows')->andReturn(false);
148150
$helper->shouldReceive('ds')->andReturn('/');
149-
$helper->shouldReceive('config')->with('item_columns')->andReturn(['name', 'url', 'time', 'icon', 'is_file', 'is_image', 'thumb_url']);
151+
$helper->shouldReceive('config')
152+
->with('item_columns')
153+
->andReturn(['name', 'url', 'time', 'icon', 'is_file', 'is_image', 'thumb_url']);
150154

151155
$path = new LfmPath($helper);
152156

@@ -158,7 +162,9 @@ public function testPretty()
158162
$helper = m::mock(Lfm::class);
159163
$helper->shouldReceive('getNameFromPath')->andReturn('bar');
160164
$helper->shouldReceive('isRunningOnWindows')->andReturn(false);
161-
$helper->shouldReceive('config')->with('item_columns')->andReturn(['name', 'url', 'time', 'icon', 'is_file', 'is_image', 'thumb_url']);
165+
$helper->shouldReceive('config')
166+
->with('item_columns')
167+
->andReturn(['name', 'url', 'time', 'icon', 'is_file', 'is_image', 'thumb_url']);
162168

163169
$path = new LfmPath($helper);
164170

tests/LfmUploadValidatorTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
use UniSharp\LaravelFilemanager\LfmPath;
1414
use UniSharp\LaravelFilemanager\LfmUploadValidator;
1515

16-
function trans() {
16+
function trans()
17+
{
1718
// leave empty
1819
}
1920

0 commit comments

Comments
 (0)