composer.json in the wrong place. Gone now.
[yaffs-website] / vendor / consolidation / annotated-command / src / Hooks / ProcessResultInterface.php
1 <?php
2 namespace Consolidation\AnnotatedCommand\Hooks;
3
4 use Consolidation\AnnotatedCommand\CommandData;
5
6 /**
7  * A result processor takes a result object, processes it, and
8  * returns another result object.  For example, if a result object
9  * represents a 'task', then a task-runner hook could run the
10  * task and return the result from that execution.
11  *
12  * @see HookManager::addResultProcessor()
13  */
14 interface ProcessResultInterface
15 {
16     /**
17      * After a command has executed, if the result is something
18      * that needs to be processed, e.g. a collection of tasks to
19      * run, then execute it and return the new result.
20      *
21      * @param  mixed $result Result to (potentially) be processed
22      * @param  CommandData $commandData Reference to commandline arguments and options
23      *
24      * @return mixed $result
25      */
26     public function process($result, CommandData $commandData);
27 }