示例#1
0
 /**
  * @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);
 }
示例#2
0
 /**
  * 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);
 }