File: 02-resolving-classes.php

package info (click to toggle)
php-phpdocumentor-type-resolver 1.10.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,312 kB
  • sloc: php: 25,713; xml: 102; makefile: 50
file content (12 lines) | stat: -rw-r--r-- 457 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
<?php

use phpDocumentor\Reflection\Types\Context;
use phpDocumentor\Reflection\TypeResolver;

require '/usr/share/php/phpDocumentor/Reflection/Types/autoload.php';

$typeResolver = new TypeResolver();

// Will use the namespace and aliases to resolve to \phpDocumentor\Types\Resolver|Mockery\MockInterface
$context = new Context('\phpDocumentor', [ 'm' => 'Mockery' ]);
var_dump((string)$typeResolver->resolve('Types\Resolver|m\MockInterface', $context));