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