4 * This file is part of the Prophecy.
5 * (c) Konstantin Kudryashov <ever.zet@gmail.com>
6 * Marcello Duarte <marcello.duarte@gmail.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Prophecy\PhpDocumentor;
14 use phpDocumentor\Reflection\DocBlock\Tags\Method;
15 use phpDocumentor\Reflection\DocBlockFactory;
16 use phpDocumentor\Reflection\Types\ContextFactory;
19 * @author Théo FIDRY <theo.fidry@gmail.com>
23 final class ClassTagRetriever implements MethodTagRetrieverInterface
25 private $docBlockFactory;
26 private $contextFactory;
28 public function __construct()
30 $this->docBlockFactory = DocBlockFactory::createInstance();
31 $this->contextFactory = new ContextFactory();
35 * @param \ReflectionClass $reflectionClass
39 public function getTagList(\ReflectionClass $reflectionClass)
42 $phpdoc = $this->docBlockFactory->create(
44 $this->contextFactory->createFromReflector($reflectionClass)
47 return $phpdoc->getTagsByName('method');
48 } catch (\InvalidArgumentException $e) {