The expression $this->users; of type Doctrine\Common\Collecti...\Contracts\Users\User[] adds the type Maatwebsite\Usher\Contracts\Users\User[] to the return on line 26 which is incompatible with the return type documented by Modules\User\Entities\Usher\Role::getUsers of type Doctrine\Common\Collections\ArrayCollection.