File: 01-resolving-simple-types.php

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

use phpDocumentor\Reflection\TypeResolver;

require __DIR__ . '/../vendor/autoload.php';

$typeResolver = new TypeResolver();

// Will yield an object of type phpDocumentor\Types\Compound
var_export($typeResolver->resolve('string|integer'));

// Will return the string "string|int"
var_dump((string)$typeResolver->resolve('string|integer'));