Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php declare(strict_types=1); namespace PhpOffice\PhpSpreadsheetTests\Reader\Xlsx; use..

Decoded Output download

<?php

declare(strict_types=1);

namespace PhpOffice\PhpSpreadsheetTests\Reader\Xlsx;

use PhpOffice\PhpSpreadsheet\Reader\Xlsx;
use PHPUnit\Framework\TestCase;

class Issue2885Test extends TestCase
{
    private static string $testbook = 'tests/data/Reader/XLSX/issue.2885.xlsx';

    public function testIssue2885(): void
    {
        $filename = self::$testbook;
        $reader = new Xlsx();
        $spreadsheet = $reader->load($filename);
        $sheet = $spreadsheet->getActiveSheet();
        self::assertSame('[$-809]0%', $sheet->getStyle('A1')->getNumberFormat()->getFormatCode());

        $finishColumns = $sheet->getHighestColumn();
        $rowsCount = $sheet->getHighestRow();
        $rows = $sheet->rangeToArray("A1:{$finishColumns}{$rowsCount}");
        self::assertSame('8%', $rows[0][0]);

        $spreadsheet->disconnectWorksheets();
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

declare(strict_types=1);

namespace PhpOffice\PhpSpreadsheetTests\Reader\Xlsx;

use PhpOffice\PhpSpreadsheet\Reader\Xlsx;
use PHPUnit\Framework\TestCase;

class Issue2885Test extends TestCase
{
    private static string $testbook = 'tests/data/Reader/XLSX/issue.2885.xlsx';

    public function testIssue2885(): void
    {
        $filename = self::$testbook;
        $reader = new Xlsx();
        $spreadsheet = $reader->load($filename);
        $sheet = $spreadsheet->getActiveSheet();
        self::assertSame('[$-809]0%', $sheet->getStyle('A1')->getNumberFormat()->getFormatCode());

        $finishColumns = $sheet->getHighestColumn();
        $rowsCount = $sheet->getHighestRow();
        $rows = $sheet->rangeToArray("A1:{$finishColumns}{$rowsCount}");
        self::assertSame('8%', $rows[0][0]);

        $spreadsheet->disconnectWorksheets();
    }
}

Function Calls

None

Variables

None

Stats

MD5 ae808b064971e4a702b9db5c4a9c5fa3
Eval Count 0
Decode Time 89 ms