/** * Render the supplied type. * * @api * * @param Type $type The type. * * @return string The rendered type. */ public function render(Type $type) { return $type->accept($this); }
/** * Compare the supplied types for equivalence. * * @param Type $left The left-hand type. * @param Type $right The right-hand type. * * @return integer The comparison result. */ public function compare(Type $left, Type $right) { return $right->accept(new TypeEquivalenceComparatorVisitor($this, $left)); }
/** * @param Type $type * * @return string */ protected function renderTypeName(Type $type) { $this->typeCheck->renderTypeName(func_get_args()); if ($type instanceof NullifiedType) { return $type->originalType()->accept($this->typeRenderer()); } return $type->accept($this->typeRenderer()); }