/** * Checks if the parameter is a valid adjustment id * @param $id int * @return Adjustment object if $id is found, otherwise false */ private function __checkExistence($id) { if (!is_null($id) && $id != '') { $adjustment = Adjustment::find($id); if (is_null($adjustment)) { return false; } return $adjustment; } return false; }