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); /* * This file is part of PHP CS Fixer. * * (c) Fabien..
Decoded Output download
<?php
declare(strict_types=1);
/*
* This file is part of PHP CS Fixer.
*
* (c) Fabien Potencier <[email protected]>
* Dariusz Rumiski <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace PhpCsFixer\Tests\AutoReview;
use PhpCsFixer\Console\Application;
use PhpCsFixer\Tests\TestCase;
use Symfony\Component\Console\Command\Command;
/**
* @author Dariusz Rumiski <[email protected]>
*
* @internal
*
* @coversNothing
*
* @group auto-review
* @group covers-nothing
*/
final class CommandTest extends TestCase
{
/**
* @dataProvider provideCommandHasNameConstCases
*/
public function testCommandHasNameConst(Command $command): void
{
self::assertNotNull($command::getDefaultName());
}
public static function provideCommandHasNameConstCases(): iterable
{
$application = new Application();
$commands = $application->all();
$names = array_filter(
array_keys($commands),
// is not an alias and is our command
static fn (string $name): bool => !\in_array($name, $commands[$name]->getAliases(), true) && str_starts_with(\get_class($commands[$name]), 'PhpCsFixer\')
);
return array_map(static fn (string $name): array => [$commands[$name]], $names);
}
}
?>
Did this file decode correctly?
Original Code
<?php
declare(strict_types=1);
/*
* This file is part of PHP CS Fixer.
*
* (c) Fabien Potencier <[email protected]>
* Dariusz Rumiski <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace PhpCsFixer\Tests\AutoReview;
use PhpCsFixer\Console\Application;
use PhpCsFixer\Tests\TestCase;
use Symfony\Component\Console\Command\Command;
/**
* @author Dariusz Rumiski <[email protected]>
*
* @internal
*
* @coversNothing
*
* @group auto-review
* @group covers-nothing
*/
final class CommandTest extends TestCase
{
/**
* @dataProvider provideCommandHasNameConstCases
*/
public function testCommandHasNameConst(Command $command): void
{
self::assertNotNull($command::getDefaultName());
}
public static function provideCommandHasNameConstCases(): iterable
{
$application = new Application();
$commands = $application->all();
$names = array_filter(
array_keys($commands),
// is not an alias and is our command
static fn (string $name): bool => !\in_array($name, $commands[$name]->getAliases(), true) && str_starts_with(\get_class($commands[$name]), 'PhpCsFixer\\')
);
return array_map(static fn (string $name): array => [$commands[$name]], $names);
}
}
Function Calls
None |
Stats
MD5 | 7b1cff7d6223ba436bd09aeddaa33df5 |
Eval Count | 0 |
Decode Time | 93 ms |