create(ParserFactory::PREFER_PHP7); } private static function getAtomic($string) { return array_values(Type::parseString($string)->types)[0]; } public function testIntOrString() { $this->assertEquals('int|string', (string) Type::parseString('int|string')); $this->assertEquals('array', (string) Type::parseString('array')); $this->assertEquals('array', (string) Type::parseString('array')); $this->assertEquals('array', (string) Type::parseString('array')); $this->assertEquals('B', (string) Type::parseString('B')); } }