drupal-civicrm/vendor/consolidation/annotated-command/src/Parser/Internal/CommandDocBlockParserFactory.php
2018-01-14 13:10:16 +00:00

20 lines
559 B
PHP

<?php
namespace Consolidation\AnnotatedCommand\Parser\Internal;
use Consolidation\AnnotatedCommand\Parser\CommandInfo;
/**
* Create an appropriate CommandDocBlockParser.
*/
class CommandDocBlockParserFactory
{
public static function parse(CommandInfo $commandInfo, \ReflectionMethod $reflection)
{
return static::create($commandInfo, $reflection)->parse();
}
private static function create(CommandInfo $commandInfo, \ReflectionMethod $reflection)
{
return new BespokeDocBlockParser($commandInfo, $reflection);
}
}