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\Calculation\Funct..

Decoded Output download

<?php

declare(strict_types=1);

namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\LookupRef;

use PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Matrix;
use PHPUnit\Framework\TestCase;

class MatrixHelperFunctionsTest extends TestCase
{
    /**
     * @dataProvider columnVectorProvider
     */
    public function testIsColumnVector(bool $expectedResult, array $array): void
    {
        $result = Matrix::isColumnVector($array);
        self::assertSame($expectedResult, $result);
    }

    /**
     * @dataProvider rowVectorProvider
     */
    public function testIsRowVector(bool $expectedResult, array $array): void
    {
        $result = Matrix::isRowVector($array);
        self::assertSame($expectedResult, $result);
    }

    public static function columnVectorProvider(): array
    {
        return [
            [
                true,
                [
                    [1], [2], [3],
                ],
            ],
            [
                false,
                [1, 2, 3],
            ],
            [
                false,
                [
                    [1, 2, 3],
                    [4, 5, 6],
                ],
            ],
        ];
    }

    public static function rowVectorProvider(): array
    {
        return [
            [
                false,
                [
                    [1], [2], [3],
                ],
            ],
            [
                true,
                [1, 2, 3],
            ],
            [
                true,
                [[1, 2, 3]],
            ],
            [
                false,
                [
                    [1, 2, 3],
                    [4, 5, 6],
                ],
            ],
        ];
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

declare(strict_types=1);

namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\LookupRef;

use PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Matrix;
use PHPUnit\Framework\TestCase;

class MatrixHelperFunctionsTest extends TestCase
{
    /**
     * @dataProvider columnVectorProvider
     */
    public function testIsColumnVector(bool $expectedResult, array $array): void
    {
        $result = Matrix::isColumnVector($array);
        self::assertSame($expectedResult, $result);
    }

    /**
     * @dataProvider rowVectorProvider
     */
    public function testIsRowVector(bool $expectedResult, array $array): void
    {
        $result = Matrix::isRowVector($array);
        self::assertSame($expectedResult, $result);
    }

    public static function columnVectorProvider(): array
    {
        return [
            [
                true,
                [
                    [1], [2], [3],
                ],
            ],
            [
                false,
                [1, 2, 3],
            ],
            [
                false,
                [
                    [1, 2, 3],
                    [4, 5, 6],
                ],
            ],
        ];
    }

    public static function rowVectorProvider(): array
    {
        return [
            [
                false,
                [
                    [1], [2], [3],
                ],
            ],
            [
                true,
                [1, 2, 3],
            ],
            [
                true,
                [[1, 2, 3]],
            ],
            [
                false,
                [
                    [1, 2, 3],
                    [4, 5, 6],
                ],
            ],
        ];
    }
}

Function Calls

None

Variables

None

Stats

MD5 59ff8154b30681fba4cca26a1420683f
Eval Count 0
Decode Time 85 ms