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\IOFactory;
use PHPUnit\Framework\TestCase;

class VerticalAlignTest extends TestCase
{
    public function testVerticalAlignStyle(): void
    {
        $filename = 'tests/data/Reader/XLSX/verticalAlignTest.xlsx';
        $reader = IOFactory::createReader('Xlsx');
        $sheet = $reader->load($filename)->getActiveSheet();

        self::assertTrue($sheet->getCell('A1')->getStyle()->getFont()->getSuperscript());
        self::assertFalse($sheet->getCell('A1')->getStyle()->getFont()->getSubscript());

        self::assertTrue($sheet->getCell('B1')->getStyle()->getFont()->getSubscript());
        self::assertFalse($sheet->getCell('B1')->getStyle()->getFont()->getSuperscript());

        self::assertFalse($sheet->getCell('C1')->getStyle()->getFont()->getSubscript());
        self::assertFalse($sheet->getCell('C1')->getStyle()->getFont()->getSuperscript());
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

declare(strict_types=1);

namespace PhpOffice\PhpSpreadsheetTests\Reader\Xlsx;

use PhpOffice\PhpSpreadsheet\IOFactory;
use PHPUnit\Framework\TestCase;

class VerticalAlignTest extends TestCase
{
    public function testVerticalAlignStyle(): void
    {
        $filename = 'tests/data/Reader/XLSX/verticalAlignTest.xlsx';
        $reader = IOFactory::createReader('Xlsx');
        $sheet = $reader->load($filename)->getActiveSheet();

        self::assertTrue($sheet->getCell('A1')->getStyle()->getFont()->getSuperscript());
        self::assertFalse($sheet->getCell('A1')->getStyle()->getFont()->getSubscript());

        self::assertTrue($sheet->getCell('B1')->getStyle()->getFont()->getSubscript());
        self::assertFalse($sheet->getCell('B1')->getStyle()->getFont()->getSuperscript());

        self::assertFalse($sheet->getCell('C1')->getStyle()->getFont()->getSubscript());
        self::assertFalse($sheet->getCell('C1')->getStyle()->getFont()->getSuperscript());
    }
}

Function Calls

None

Variables

None

Stats

MD5 5ae76dbd4695adf5275a344227a29611
Eval Count 0
Decode Time 99 ms