diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e7d6f94..6066f5f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ jobs: strategy: matrix: - php: ['8.0', '8.1', '8.2', '8.3'] + php: ['8.0', '8.1', '8.2', '8.3', '8.4'] stability: ['prefer-lowest', 'prefer-stable'] name: PHP ${{ matrix.php }} - ${{ matrix.stability }} @@ -45,7 +45,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.2' + php-version: '8.3' extensions: dom, curl, libxml, mbstring, zip, bcmath, gd tools: composer coverage: none diff --git a/composer.json b/composer.json index 5c96b6a..f200b92 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,7 @@ {"name": "Manuel Reinhard", "email": "manu@sprain.ch"} ], "require": { - "php": "~8.0.0|~8.1.0|~8.2.0|~8.3.0", + "php": "~8.0.0|~8.1.0|~8.2.0|~8.3.0|~8.4.0", "ext-json": "*", "ext-dom": "*", "ext-intl": "*", diff --git a/lib/HtmlPhpExcel/HtmlPhpExcel.php b/lib/HtmlPhpExcel/HtmlPhpExcel.php index 067032d..30d0fda 100644 --- a/lib/HtmlPhpExcel/HtmlPhpExcel.php +++ b/lib/HtmlPhpExcel/HtmlPhpExcel.php @@ -146,14 +146,14 @@ private function createExcel(): void } // Loop over all tables in document - foreach($this->document->getTables() as $table) { + foreach ($this->document->getTables() as $table) { // Handle worksheets $sheet = $this->excel->makeSheet($table->getAttribute('_excel-name')); // Loop over all rows $rowIndex = 1; - foreach($table->getRows() as $row) { + foreach ($table->getRows() as $row) { $rowStyles = $this->getStyles($row); if (!empty($rowStyles)) { $sheet->setRowStyles( @@ -164,7 +164,7 @@ private function createExcel(): void // Loop over all cells in a row $colIndex = 1; - foreach($row->getCells() as $cell) { + foreach ($row->getCells() as $cell) { // Skip cells within merged range $excelCellIndex = Helper::colLetter($colIndex).$rowIndex; diff --git a/lib/HtmlPhpExcel/Parser/Parser.php b/lib/HtmlPhpExcel/Parser/Parser.php index 98a2f3c..e5a2a5f 100644 --- a/lib/HtmlPhpExcel/Parser/Parser.php +++ b/lib/HtmlPhpExcel/Parser/Parser.php @@ -79,7 +79,7 @@ public function parse(): Document $table = new Table(); $htmlRows = $xpath->query('.//tr[contains(concat(" ", normalize-space(@class), " "), "'.$this->rowClass.'")]', $htmlTable); - foreach($htmlRows as $htmlRow) { + foreach ($htmlRows as $htmlRow) { $row = new Row(); $htmlCells = $xpath->query( @@ -88,7 +88,7 @@ public function parse(): Document $htmlRow ); - foreach($htmlCells as $htmlCell) { + foreach ($htmlCells as $htmlCell) { $cell = new Cell(); $cell->setValue($htmlCell->nodeValue);