By mistake I've added DocBlock comments to my files:
/**
* @author My Name <[email protected]>
* @copyright Copyright (C) 2012 - 2015 My App. All rights reserved.
* @license Some notes about the license.
*/
But this si wrong as I want the header comments set like those:
/*
* This file is part of the My App.
*
* Copyright My Name 2012-2016.
*
* This code is to consider private and non disclosable to anyone for whatever reason.
* Every right on this code is reserved.
*
* @author My name <[email protected]>
*/
Now, I've added the header comment using PHP-CS-Fixer but now, how can I remove the old ones?
Using friendsofphp/php-cs-fixer:^2.0.0, the header comment can be removed entirely using the following configuration:
$config = PhpCsFixer\Config::create()->setRules([
'header_comment' => [
'header' => '',
],
]);
Note how we provide an empty string.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With