The expression return Modules\User\Entities\User::find($id) could return the type Illuminate\Database\Eloquent\Collection which is incompatible with the type-hinted return null|Modules\User\Entities\User. Consider adding an additional type-check to rule them out.
The expression return $user could return the type Illuminate\Database\Eloquent\Model which includes types incompatible with the type-hinted return Modules\User\Entities\User. Consider adding an additional type-check to rule them out.