PHP code example of jawira / annotation-updater

1. Go to this page and download the library: Download jawira/annotation-updater library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jawira / annotation-updater example snippets




use Jawira\AnnotationUpdater\AnnotationUpdater;
use PhpCsFixer\Config;

return (new Config())
  ->registerCustomFixers([
    new AnnotationUpdater(),
  ])
  ->setRules([
    'Jawira/annotation_updater' => [
      'annotations' => [
        ['tag' => 'author', 'value' => 'John Connor', 'mode' => 'preserve'],
        ['tag' => 'license', 'value' => 'MIT', 'mode' => 'replace'],
        ['tag' => 'todo', 'mode' => 'remove'],
      ],
    ],
  ]);

[
  'tag' => 'author',
  'value' => 'John Connor',
  'mode' => 'preserve',
]