如何使用 php 预言指定函数的返回类型(接口的实例)。
方法是这样的: -
class classname()
{
public $var;
public functionName : Interface
{
return $this->var;
}
}
有可能做这样的事情吗?$this->method->willreturn(string)->ofTypeInterface
如何使用 php 预言指定函数的返回类型(接口的实例)。
方法是这样的: -
class classname()
{
public $var;
public functionName : Interface
{
return $this->var;
}
}
有可能做这样的事情吗?$this->method->willreturn(string)->ofTypeInterface