在以下代码中,为什么额外的括号会避免警告?
PHP严格标准:只应通过引用传递变量。
class Family extends Eloquent
{
public function members()
{
return $this->hasMany('App\Person');
}
}
class Person extends Eloquent
{
public function family()
{
return $this->belongsTo('App\Family');
}
public function school()
{
return $this->belongsTo('App\School');
}
}
class School extends Eloquent
{
public function students()
{
return $this->hasMany('App\Person');
}
}