Refactoring
This commit is contained in:
15
lib/composer/vendor/consolidation/annotated-command/tests/src/ExampleCommandInfoAlterer.php
vendored
Normal file
15
lib/composer/vendor/consolidation/annotated-command/tests/src/ExampleCommandInfoAlterer.php
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
namespace Consolidation\TestUtils;
|
||||
|
||||
use Consolidation\AnnotatedCommand\Parser\CommandInfo;
|
||||
use Consolidation\AnnotatedCommand\CommandInfoAltererInterface;
|
||||
|
||||
class ExampleCommandInfoAlterer implements CommandInfoAltererInterface
|
||||
{
|
||||
public function alterCommandInfo(CommandInfo $commandInfo, $commandFileInstance)
|
||||
{
|
||||
if ($commandInfo->hasAnnotation('arbitrary')) {
|
||||
$commandInfo->addAnnotation('dynamic', "This annotation was dynamically added by ExampleCommandInfoAlterer");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user