/** * @param mixed $unknown * @return mixed some child of the parent class * @throws exception\InvalidReturnException */ public static final function assertRootType($unknown) { return __CONTRACT__::returnIsA(self::class, $unknown); }
/** * Ensures the return for the callback is exactly the same type as the object * @param mixed $unknown * @return self * @throws exception\InvalidReturnException */ public static function assertType($unknown) { return __CONTRACT__::returnIsA(static::class, $unknown); }