Пример #1
0
 /**
  * Return the name of this type as string
  *
  * @return string
  */
 public function getTypeName()
 {
     $typeName = parent::getTypeName();
     if ($typeName != ezcReflectionTypeMapper::CANONICAL_NAME_NUMBER and $typeName != ezcReflectionTypeMapper::CANONICAL_NAME_CALLBACK) {
         $types = $this->getTypes();
         if (!empty($types)) {
             $typeName = '';
             foreach ($types as $type) {
                 $typeName .= $type->getTypeName() . '|';
             }
             $typeName = substr($typeName, 0, -1);
             // remove last '|'
         }
     }
     return $typeName;
 }
 public function testToString()
 {
     self::assertEquals($this->type->getTypeName(), (string) $this->type);
 }