The expression return Modules\Schedule\...ies\Schedule::find($id) could return the type Illuminate\Database\Eloq...go\Abstracts\MongoModel which includes types incompatible with the type-hinted return Modules\Schedule\Entities\Schedule|null. Consider adding an additional type-check to rule them out.
The expression return $Schedule returns the type Illuminate\Database\Eloq...go\Abstracts\MongoModel which includes types incompatible with the type-hinted return Modules\Schedule\Entities\Schedule.
The expression return $this->find($id)->delete() could return the type null which is incompatible with the type-hinted return boolean. Consider adding an additional type-check to rule them out.