Example #1
0
function setHeader()
{
    HeaderCommentFixer::setHeader(<<<'EOF'
This file is part of the Kreta package.

(c) Beñat Espiña <*****@*****.**>
(c) Gorka Laucirica <*****@*****.**>

For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
EOF
);
}
    public function testFixRemovePreviousHeader()
    {
        HeaderCommentFixer::setHeader('');
        $expected = <<<'EOH'
<?php

phpinfo();
EOH;
        $input = <<<'EOH'
<?php

/*
 * This file is part of the PHP CS utility.
 *
 * (c) Fabien Potencier <*****@*****.**>
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

phpinfo();
EOH;
        $this->makeTest($expected, $input);
    }
Example #3
0
<?php

/*
 * This file is part of the Sylius package.
 *
 * (c) Paweł Jędrzejewski
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
use Symfony\CS\Fixer\Contrib\HeaderCommentFixer;
$header = <<<EOF
This file is part of the Sylius package.

(c) Paweł Jędrzejewski

For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
EOF;
HeaderCommentFixer::setHeader($header);
return ['header_comment', 'short_array_syntax', 'ordered_use', '-empty_return', '-phpdoc_no_empty_return', '-phpdoc_params', '-phpdoc_short_description'];