public function useBlog($id = 0) { if (!(is_numeric($id) && intval($id) === $id && intval($id) >= 0)) { throw new \InvalidArgumentException('Id must be an integer greater than or equal to 0'); } $this->blogId = intval($id); }