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\Fixer\Phpdoc;
use PhpCsFixer\AbstractProxyFixer;
use PhpCsFixer\FixerDefinition\CodeSample;
use PhpCsFixer\FixerDefinition\FixerDefinition;
use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
/**
* @author Graham Campbell <[email protected]>
* @author Dariusz Rumiski <[email protected]>
*/
final class PhpdocNoPackageFixer extends AbstractProxyFixer
{
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
'`@package` and `@subpackage` annotations should be omitted from PHPDoc.',
[
new CodeSample(
'<?php
/**
* @internal
* @package Foo
* subpackage Bar
*/
class Baz
{
}
'
),
]
);
}
/**
* {@inheritdoc}
*
* Must run before NoEmptyPhpdocFixer, PhpdocAlignFixer, PhpdocSeparationFixer, PhpdocTrimFixer.
* Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
*/
public function getPriority(): int
{
return parent::getPriority();
}
protected function createProxyFixers(): array
{
$fixer = new GeneralPhpdocAnnotationRemoveFixer();
$fixer->configure([
'annotations' => ['package', 'subpackage'],
'case_sensitive' => true,
]);
return [$fixer];
}
}
?>
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\Fixer\Phpdoc;
use PhpCsFixer\AbstractProxyFixer;
use PhpCsFixer\FixerDefinition\CodeSample;
use PhpCsFixer\FixerDefinition\FixerDefinition;
use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
/**
* @author Graham Campbell <[email protected]>
* @author Dariusz Rumiski <[email protected]>
*/
final class PhpdocNoPackageFixer extends AbstractProxyFixer
{
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition(
'`@package` and `@subpackage` annotations should be omitted from PHPDoc.',
[
new CodeSample(
'<?php
/**
* @internal
* @package Foo
* subpackage Bar
*/
class Baz
{
}
'
),
]
);
}
/**
* {@inheritdoc}
*
* Must run before NoEmptyPhpdocFixer, PhpdocAlignFixer, PhpdocSeparationFixer, PhpdocTrimFixer.
* Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
*/
public function getPriority(): int
{
return parent::getPriority();
}
protected function createProxyFixers(): array
{
$fixer = new GeneralPhpdocAnnotationRemoveFixer();
$fixer->configure([
'annotations' => ['package', 'subpackage'],
'case_sensitive' => true,
]);
return [$fixer];
}
}
Function Calls
None |
Stats
MD5 | 320ed32ef47ffed3736ec2c7981d184a |
Eval Count | 0 |
Decode Time | 110 ms |