Skip to content

Commit 5d5e277

Browse files
jqhphStyleCIBot
authored andcommitted
Apply fixes from StyleCI
1 parent a84387c commit 5d5e277

28 files changed

+178
-156
lines changed

src/Contracts/Excel.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
interface Excel
1515
{
1616
/**
17-
* @param \Closure $callback
17+
* @param \Closure $callback
1818
* @return $this
1919
*/
2020
public function option(\Closure $callback);
2121

2222
/**
23-
* @param array|\Closure|false $headings
23+
* @param array|\Closure|false $headings
2424
* @return $this
2525
*/
2626
public function headings($headings);
@@ -31,7 +31,7 @@ public function headings($headings);
3131
public function getHeadings();
3232

3333
/**
34-
* @param string $type
34+
* @param string $type
3535
* @return $this
3636
*/
3737
public function type(string $type);
@@ -42,7 +42,7 @@ public function type(string $type);
4242
public function getType();
4343

4444
/**
45-
* @param FilesystemInterface|LaravelFilesystem|string $filesystem
45+
* @param FilesystemInterface|LaravelFilesystem|string $filesystem
4646
* @return $this
4747
*/
4848
public function disk($filesystem);

src/Contracts/Exporter.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,51 +9,51 @@ interface Exporter extends Excel
99
/**
1010
* 设置导出数据.
1111
*
12-
* @param array|\Closure|\Generator|Exporters\ChunkQuery $data
12+
* @param array|\Closure|\Generator|Exporters\ChunkQuery $data
1313
* @return $this
1414
*/
1515
public function data($data);
1616

1717
/**
18-
* @param callable $callback
18+
* @param callable $callback
1919
* @return $this
2020
*/
2121
public function row(callable $callback);
2222

2323
/**
24-
* @param Style $style
24+
* @param Style $style
2525
* @return $this
2626
*/
2727
public function headingStyle($style);
2828

2929
/**
3030
* 分批次导入数据.
3131
*
32-
* @param callable|callable[] $callbacks
32+
* @param callable|callable[] $callbacks
3333
* @return $this
3434
*/
3535
public function chunk($callbacks);
3636

3737
/**
3838
* 下载导出文件.
3939
*
40-
* @param string|null $fileName
41-
*
40+
* @param string|null $fileName
4241
* @return mixed
4342
*/
4443
public function download(string $fileName);
4544

4645
/**
4746
* 存储导出文件.
4847
*
49-
* @param string $filePath
50-
* @param array $diskConfig
48+
* @param string $filePath
49+
* @param array $diskConfig
5150
* @return bool
5251
*/
5352
public function store(string $filePath, array $diskConfig = []);
5453

5554
/**
5655
* @return string
56+
*
5757
* @throws \Box\Spout\Common\Exception\IOException
5858
*/
5959
public function raw();

src/Contracts/Exporters/Sheet.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ interface Sheet
1414
public function data($data);
1515

1616
/**
17-
* @param callable $callback
17+
* @param callable $callback
1818
* @return $this
1919
*/
2020
public function chunk(callable $callback);
@@ -27,7 +27,7 @@ public function getData();
2727
/**
2828
* 传false则禁用标题.
2929
*
30-
* @param array|false $headings
30+
* @param array|false $headings
3131
* @return $this
3232
*/
3333
public function headings($headings);
@@ -38,7 +38,7 @@ public function headings($headings);
3838
public function getHeadings();
3939

4040
/**
41-
* @param Style $style
41+
* @param Style $style
4242
* @return $this
4343
*/
4444
public function headingStyle($style);
@@ -49,7 +49,7 @@ public function headingStyle($style);
4949
public function getHeadingStyle();
5050

5151
/**
52-
* @param string $name
52+
* @param string $name
5353
* @return $this
5454
*/
5555
public function name(?string $name);
@@ -60,13 +60,13 @@ public function name(?string $name);
6060
public function getName();
6161

6262
/**
63-
* @param \Closure $callback
63+
* @param \Closure $callback
6464
* @return $this
6565
*/
6666
public function row(\Closure $callback);
6767

6868
/**
69-
* @param array $row
69+
* @param array $row
7070
* @return array|Row
7171
*/
7272
public function formatRow(array $row);

src/Contracts/Importer.php

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,20 @@
1111
interface Importer extends Excel
1212
{
1313
/**
14-
* @param string|UploadedFile $filePath
14+
* @param string|UploadedFile $filePath
1515
* @return $this
1616
*/
1717
public function file($filePath);
1818

1919
/**
20-
* @param int|\Closure $lineNumberOrCallback
20+
* @param int|\Closure $lineNumberOrCallback
2121
* @return mixed
2222
*/
2323
public function headingRow($lineNumberOrCallback);
2424

2525
/**
2626
* @return Sheets
27+
*
2728
* @throws FileNotFoundException
2829
* @throws IOException
2930
* @throws UnsupportedTypeException
@@ -33,17 +34,19 @@ public function sheets();
3334
/**
3435
* 根据名称或序号获取sheet.
3536
*
36-
* @param int|string $indexOrName
37+
* @param int|string $indexOrName
3738
* @return Sheet
39+
*
3840
* @throws FileNotFoundException
3941
* @throws IOException
4042
* @throws UnsupportedTypeException
4143
*/
4244
public function sheet($indexOrName): Sheet;
4345

4446
/**
45-
* @param callable $callback
47+
* @param callable $callback
4648
* @return $this
49+
*
4750
* @throws FileNotFoundException
4851
* @throws IOException
4952
* @throws UnsupportedTypeException
@@ -54,6 +57,7 @@ public function each(callable $callback);
5457
* 获取第一个sheet.
5558
*
5659
* @return Sheet
60+
*
5761
* @throws FileNotFoundException
5862
* @throws IOException
5963
* @throws UnsupportedTypeException
@@ -64,6 +68,7 @@ public function first(): Sheet;
6468
* 获取当前打开的sheet.
6569
*
6670
* @return Sheet
71+
*
6772
* @throws FileNotFoundException
6873
* @throws IOException
6974
* @throws UnsupportedTypeException
@@ -72,6 +77,7 @@ public function active(): Sheet;
7277

7378
/**
7479
* @return array
80+
*
7581
* @throws FileNotFoundException
7682
* @throws IOException
7783
* @throws UnsupportedTypeException
@@ -80,6 +86,7 @@ public function toArray(): array;
8086

8187
/**
8288
* @return SheetCollection
89+
*
8390
* @throws FileNotFoundException
8491
* @throws IOException
8592
* @throws UnsupportedTypeException

src/Contracts/Sheet.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function isVisible();
4747
public function getSheet();
4848

4949
/**
50-
* @param callable $callback
50+
* @param callable $callback
5151
* @return $this
5252
*/
5353
public function filter(callable $callback);
@@ -61,7 +61,7 @@ public function filter(callable $callback);
6161
* ...
6262
* });
6363
*
64-
* @param callable|null $callback
64+
* @param callable|null $callback
6565
* @return $this
6666
*/
6767
public function each(callable $callback);
@@ -75,8 +75,8 @@ public function each(callable $callback);
7575
* ...
7676
* });
7777
*
78-
* @param int $size
79-
* @param callable $callback
78+
* @param int $size
79+
* @param callable $callback
8080
* @return \Dcat\EasyExcel\Importers\Sheet
8181
*/
8282
public function chunk(int $size, callable $callback);

src/Contracts/Sheets.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ interface Sheets
1313
*
1414
* });
1515
*
16-
* @param callable $callback 返回false可中断循环
16+
* @param callable $callback 返回false可中断循环
1717
* @return $this
1818
*/
1919
public function each(callable $callback);
2020

2121
/**
22-
* @param int|string $indexOrName
22+
* @param int|string $indexOrName
2323
* @return Sheet|null
2424
*/
2525
public function index($indexOrName);
2626

2727
/**
28-
* @param int|string $indexOrName
28+
* @param int|string $indexOrName
2929
* @return $this
3030
*/
3131
public function reject($indexOrName);

src/Excel.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Excel
1717
/**
1818
* 导入.
1919
*
20-
* @param string|UploadedFile $filePath
20+
* @param string|UploadedFile $filePath
2121
* @return Contracts\Importer
2222
*/
2323
public static function import($filePath): Contracts\Importer
@@ -28,7 +28,7 @@ public static function import($filePath): Contracts\Importer
2828
/**
2929
* 导出.
3030
*
31-
* @param array|\Closure|\Generator $data
31+
* @param array|\Closure|\Generator $data
3232
* @return Contracts\Exporter
3333
*/
3434
public static function export($data = null): Contracts\Exporter
@@ -37,9 +37,9 @@ public static function export($data = null): Contracts\Exporter
3737
}
3838

3939
/**
40-
* @param array|\Closure|\Generator $data
41-
* @param null $sheetName
42-
* @param null $headings
40+
* @param array|\Closure|\Generator $data
41+
* @param null $sheetName
42+
* @param null $headings
4343
* @return Contracts\Exporters\Sheet
4444
*/
4545
public static function createSheet($data = null, $sheetName = null, array $headings = []): Contracts\Exporters\Sheet
@@ -48,7 +48,7 @@ public static function createSheet($data = null, $sheetName = null, array $headi
4848
}
4949

5050
/**
51-
* @param mixed ...$params
51+
* @param mixed ...$params
5252
* @return Factory
5353
*/
5454
public static function xlsx(...$params)
@@ -57,7 +57,7 @@ public static function xlsx(...$params)
5757
}
5858

5959
/**
60-
* @param mixed ...$params
60+
* @param mixed ...$params
6161
* @return Factory
6262
*/
6363
public static function csv(...$params)
@@ -66,7 +66,7 @@ public static function csv(...$params)
6666
}
6767

6868
/**
69-
* @param mixed ...$params
69+
* @param mixed ...$params
7070
* @return Factory
7171
*/
7272
public static function ods(...$params)

src/Exporters/ChunkQuery.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class ChunkQuery implements Exporters\ChunkQuery
1212
protected $generators;
1313

1414
/**
15-
* @param callable|callable[] $generator
15+
* @param callable|callable[] $generator
1616
*/
1717
public function __construct($generator)
1818
{
@@ -36,7 +36,7 @@ public function makeGenerators()
3636
}
3737

3838
/**
39-
* @param callable|object $callback
39+
* @param callable|object $callback
4040
* @return \Generator
4141
*/
4242
protected function makeGenerator($callback)
@@ -53,8 +53,8 @@ protected function makeGenerator($callback)
5353
}
5454

5555
/**
56-
* @param callable $callback
57-
* @param int $times
56+
* @param callable $callback
57+
* @param int $times
5858
* @return array|null
5959
*/
6060
protected function fetchArray(callable $callback, int $times)
@@ -75,7 +75,7 @@ protected function fetchArray(callable $callback, int $times)
7575
}
7676

7777
/**
78-
* @param callable $generator
78+
* @param callable $generator
7979
* @return callable
8080
*/
8181
protected function resolve(callable $generator)

0 commit comments

Comments
 (0)