Skip to content

Commit eea4079

Browse files
authored
Merge pull request #79 from rappasoft/analysis-Yjav1K
Apply fixes from StyleCI
2 parents 86befce + 42a1972 commit eea4079

File tree

5 files changed

+14
-13
lines changed

5 files changed

+14
-13
lines changed

src/Exceptions/UnsupportedExportFormatException.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@
44

55
use Exception;
66

7-
class UnsupportedExportFormatException extends Exception {}
7+
class UnsupportedExportFormatException extends Exception
8+
{
9+
}

src/Exports/Export.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,10 @@
1010
use Rappasoft\LaravelLivewireTables\Traits\ExportHelper;
1111

1212
/**
13-
* Class CSVExport
14-
*
15-
* @package Rappasoft\LaravelLivewireTables\Exports
13+
* Class CSVExport.
1614
*/
1715
class Export implements FromQuery, WithHeadings, WithMapping
1816
{
19-
2017
use Exportable, ExportHelper;
2118

2219
/**
@@ -35,7 +32,8 @@ class Export implements FromQuery, WithHeadings, WithMapping
3532
* @param Builder $builder
3633
* @param array $columns
3734
*/
38-
public function __construct(Builder $builder, array $columns = []) {
35+
public function __construct(Builder $builder, array $columns = [])
36+
{
3937
$this->builder = $builder;
4038
$this->columns = $columns;
4139
}

src/Traits/ExportHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
*/
88
trait ExportHelper
99
{
10-
1110
/**
1211
* @return array
1312
*/
14-
public function getHeadingRow(): array {
13+
public function getHeadingRow(): array
14+
{
1515
$headers = [];
1616

1717
foreach ($this->columns as $column) {

src/Traits/Exports.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
*/
1212
trait Exports
1313
{
14-
1514
/**
1615
* @var string
1716
*/
@@ -28,14 +27,15 @@ trait Exports
2827
* @return mixed
2928
* @throws Exception
3029
*/
31-
public function export($type) {
30+
public function export($type)
31+
{
3232
$type = strtolower($type);
3333

34-
if (!in_array($type, ['csv', 'xls', 'xlsx'], true)) {
34+
if (! in_array($type, ['csv', 'xls', 'xlsx'], true)) {
3535
throw new UnsupportedExportFormatException(__('This export type is not supported.'));
3636
}
3737

38-
if (!in_array($type, array_map('strtolower', $this->exports), true)) {
38+
if (! in_array($type, array_map('strtolower', $this->exports), true)) {
3939
throw new UnsupportedExportFormatException(__('This export type is not set on this table component.'));
4040
}
4141

src/Views/Column.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,8 @@ public function includedInExport(): bool
250250
/**
251251
* @return $this
252252
*/
253-
public function excludeFromExport(): self {
253+
public function excludeFromExport(): self
254+
{
254255
$this->includeInExport = false;
255256

256257
return $this;

0 commit comments

Comments
 (0)