Version 1
[yaffs-website] / vendor / consolidation / annotated-command / tests / src / ExampleCommandInfoAlterer.php
1 <?php
2 namespace Consolidation\TestUtils;
3
4 use Consolidation\AnnotatedCommand\Parser\CommandInfo;
5 use Consolidation\AnnotatedCommand\CommandInfoAltererInterface;
6
7 class ExampleCommandInfoAlterer implements CommandInfoAltererInterface
8 {
9     public function alterCommandInfo(CommandInfo $commandInfo, $commandFileInstance)
10     {
11         if ($commandInfo->hasAnnotation('arbitrary')) {
12             $commandInfo->addAnnotation('dynamic', "This annotation was dynamically added by ExampleCommandInfoAlterer");
13         }
14     }
15 }