Version 1
[yaffs-website] / vendor / consolidation / annotated-command / tests / src / ExampleCommandInfoAlterer.php
diff --git a/vendor/consolidation/annotated-command/tests/src/ExampleCommandInfoAlterer.php b/vendor/consolidation/annotated-command/tests/src/ExampleCommandInfoAlterer.php
new file mode 100644 (file)
index 0000000..824122d
--- /dev/null
@@ -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");
+        }
+    }
+}