Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
51 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
/** | ||
* This file is part of the php-tricorder project. | ||
* | ||
* (c) Yannick Voyer (http://github.com/yvoyer) | ||
*/ | ||
|
||
namespace Tricorder\Processor; | ||
|
||
use Symfony\Component\Console\Output\OutputInterface; | ||
|
||
/** | ||
* Class ArgumentProcessor | ||
* | ||
* @author Yannick Voyer (http://github.com/yvoyer) | ||
* | ||
* @package Tricorder\Processor | ||
*/ | ||
class ArgumentProcessor implements Processor | ||
{ | ||
/** | ||
* @var OutputInterface | ||
*/ | ||
private $output; | ||
|
||
/** | ||
* @param OutputInterface $output | ||
*/ | ||
public function __construct(OutputInterface $output) | ||
{ | ||
$this->output = $output; | ||
} | ||
|
||
/** | ||
* Look at the $tags and react accordingly | ||
* | ||
* @param string $methodName | ||
* @param array $tag | ||
* @param array $tricorderTags | ||
*/ | ||
public function process($methodName, array $tags, array $tricorderTags) | ||
{ | ||
$processor = new ArgumentTypeProcessor($this->output); | ||
foreach ($tags as $tag) { | ||
$processor->process($methodName, $tag, $tricorderTags); | ||
} | ||
} | ||
} |