public function getNextPhotoId($albumId, $id) { $next = $this->photoDao->getNextPhoto($albumId, $id); return $next ? $next->id : null; }