Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
[ci skip] [skip ci]
  • Loading branch information
StyleCIBot committed Jan 18, 2024
1 parent 0054529 commit 5276a7f
Showing 1 changed file with 49 additions and 62 deletions.
111 changes: 49 additions & 62 deletions src/Sheet.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class Sheet
private $worksheet;

/**
* @param Worksheet $worksheet
* @param Worksheet $worksheet
*/
public function __construct(Worksheet $worksheet)
{
Expand All @@ -95,9 +95,8 @@ public function __construct(Worksheet $worksheet)
}

/**
* @param Spreadsheet $spreadsheet
* @param string|int $index
*
* @param Spreadsheet $spreadsheet
* @param string|int $index
* @return Sheet
*
* @throws \PhpOffice\PhpSpreadsheet\Exception
Expand All @@ -113,9 +112,8 @@ public static function make(Spreadsheet $spreadsheet, $index)
}

/**
* @param Spreadsheet $spreadsheet
* @param int $index
*
* @param Spreadsheet $spreadsheet
* @param int $index
* @return Sheet
*
* @throws \PhpOffice\PhpSpreadsheet\Exception
Expand All @@ -131,9 +129,8 @@ public static function byIndex(Spreadsheet $spreadsheet, int $index): Sheet
}

/**
* @param Spreadsheet $spreadsheet
* @param string $name
*
* @param Spreadsheet $spreadsheet
* @param string $name
* @return Sheet
*
* @throws SheetNotFoundException
Expand All @@ -148,7 +145,7 @@ public static function byName(Spreadsheet $spreadsheet, string $name): Sheet
}

/**
* @param object $sheetExport
* @param object $sheetExport
*
* @throws \PhpOffice\PhpSpreadsheet\Exception
*/
Expand Down Expand Up @@ -199,7 +196,7 @@ public function open($sheetExport)
}

/**
* @param object $sheetExport
* @param object $sheetExport
*
* @throws \PhpOffice\PhpSpreadsheet\Exception
* @throws \PhpOffice\PhpSpreadsheet\Reader\Exception
Expand Down Expand Up @@ -236,8 +233,8 @@ public function export($sheetExport)
}

/**
* @param object $import
* @param int $startRow
* @param object $import
* @param int $startRow
*/
public function import($import, int $startRow = 1)
{
Expand Down Expand Up @@ -325,12 +322,11 @@ public function import($import, int $startRow = 1)
}

/**
* @param object $import
* @param int|null $startRow
* @param null $nullValue
* @param bool $calculateFormulas
* @param bool $formatData
*
* @param object $import
* @param int|null $startRow
* @param null $nullValue
* @param bool $calculateFormulas
* @param bool $formatData
* @return array
*/
public function toArray($import, int $startRow = null, $nullValue = null, $calculateFormulas = false, $formatData = false)
Expand Down Expand Up @@ -377,12 +373,11 @@ public function toArray($import, int $startRow = null, $nullValue = null, $calcu
}

/**
* @param object $import
* @param int|null $startRow
* @param null $nullValue
* @param bool $calculateFormulas
* @param bool $formatData
*
* @param object $import
* @param int|null $startRow
* @param null $nullValue
* @param bool $calculateFormulas
* @param bool $formatData
* @return Collection
*/
public function toCollection($import, int $startRow = null, $nullValue = null, $calculateFormulas = false, $formatData = false): Collection
Expand All @@ -395,7 +390,7 @@ public function toCollection($import, int $startRow = null, $nullValue = null, $
}

/**
* @param object $sheetExport
* @param object $sheetExport
*
* @throws \PhpOffice\PhpSpreadsheet\Exception
*/
Expand Down Expand Up @@ -442,8 +437,8 @@ public function close($sheetExport)
}

/**
* @param FromView $sheetExport
* @param int|null $sheetIndex
* @param FromView $sheetExport
* @param int|null $sheetIndex
*
* @throws \PhpOffice\PhpSpreadsheet\Reader\Exception
*/
Expand All @@ -465,8 +460,8 @@ public function fromView(FromView $sheetExport, $sheetIndex = null)
}

/**
* @param FromQuery $sheetExport
* @param Worksheet $worksheet
* @param FromQuery $sheetExport
* @param Worksheet $worksheet
*/
public function fromQuery(FromQuery $sheetExport, Worksheet $worksheet)
{
Expand All @@ -482,8 +477,8 @@ public function fromQuery(FromQuery $sheetExport, Worksheet $worksheet)
}

/**
* @param FromQuery $sheetExport
* @param Worksheet $worksheet
* @param FromQuery $sheetExport
* @param Worksheet $worksheet
*/
public function fromScout(FromQuery $sheetExport, Worksheet $worksheet)
{
Expand All @@ -501,23 +496,23 @@ public function fromScout(FromQuery $sheetExport, Worksheet $worksheet)
}

/**
* @param FromCollection $sheetExport
* @param FromCollection $sheetExport
*/
public function fromCollection(FromCollection $sheetExport)
{
$this->appendRows($sheetExport->collection()->all(), $sheetExport);
}

/**
* @param FromArray $sheetExport
* @param FromArray $sheetExport
*/
public function fromArray(FromArray $sheetExport)
{
$this->appendRows($sheetExport->array(), $sheetExport);
}

/**
* @param FromIterator $sheetExport
* @param FromIterator $sheetExport
*/
public function fromIterator(FromIterator $sheetExport)
{
Expand All @@ -531,7 +526,7 @@ public function fromIterator(FromIterator $sheetExport)
}

/**
* @param FromGenerator $sheetExport
* @param FromGenerator $sheetExport
*/
public function fromGenerator(FromGenerator $sheetExport)
{
Expand All @@ -545,9 +540,9 @@ public function fromGenerator(FromGenerator $sheetExport)
}

/**
* @param array $rows
* @param string|null $startCell
* @param bool $strictNullComparison
* @param array $rows
* @param string|null $startCell
* @param bool $strictNullComparison
*/
public function append(array $rows, string $startCell = null, bool $strictNullComparison = false)
{
Expand Down Expand Up @@ -575,8 +570,8 @@ public function autoSize()
}

/**
* @param string $column
* @param string $format
* @param string $column
* @param string $format
*
* @throws \PhpOffice\PhpSpreadsheet\Exception
*/
Expand All @@ -597,8 +592,7 @@ public function formatColumn(string $column, string $format)
}

/**
* @param int $chunkSize
*
* @param int $chunkSize
* @return Sheet
*/
public function chunkSize(int $chunkSize)
Expand All @@ -617,7 +611,7 @@ public function getDelegate()
}

/**
* @param Chart|Chart[] $charts
* @param Chart|Chart[] $charts
*/
public function addCharts($charts)
{
Expand All @@ -629,7 +623,7 @@ public function addCharts($charts)
}

/**
* @param BaseDrawing|BaseDrawing[] $drawings
* @param BaseDrawing|BaseDrawing[] $drawings
*/
public function addDrawings($drawings)
{
Expand All @@ -641,8 +635,7 @@ public function addDrawings($drawings)
}

/**
* @param string $concern
*
* @param string $concern
* @return string
*/
public function hasConcern(string $concern): string
Expand All @@ -651,8 +644,8 @@ public function hasConcern(string $concern): string
}

/**
* @param iterable $rows
* @param object $sheetExport
* @param iterable $rows
* @param object $sheetExport
*/
public function appendRows($rows, $sheetExport)
{
Expand Down Expand Up @@ -684,8 +677,7 @@ public function appendRows($rows, $sheetExport)
}

/**
* @param mixed $row
*
* @param mixed $row
* @return array
*/
public static function mapArraybleRow($row): array
Expand All @@ -710,7 +702,6 @@ public static function mapArraybleRow($row): array

/**
* @param $sheetImport
*
* @return int
*/
public function getStartRow($sheetImport): int
Expand Down Expand Up @@ -748,9 +739,8 @@ protected function validated(WithValidation $import, int $startRow, $rows)
}

/**
* @param string $lower
* @param string $upper
*
* @param string $lower
* @param string $upper
* @return \Generator
*/
protected function buildColumnRange(string $lower, string $upper)
Expand All @@ -775,8 +765,7 @@ private function hasRows(): bool
}

/**
* @param object $sheetExport
*
* @param object $sheetExport
* @return bool
*/
private function hasStrictNullComparison($sheetExport): bool
Expand All @@ -789,8 +778,7 @@ private function hasStrictNullComparison($sheetExport): bool
}

/**
* @param object|WithCustomChunkSize $export
*
* @param object|WithCustomChunkSize $export
* @return int
*/
private function getChunkSize($export): int
Expand All @@ -803,8 +791,7 @@ private function getChunkSize($export): int
}

/**
* @param object|WithValidation $import
*
* @param object|WithValidation $import
* @return Closure|null
*/
private function getPreparationCallback($import)
Expand Down

0 comments on commit 5276a7f

Please sign in to comment.