/** * @param \DateTime $date * @param $index * @param $key * @return null|Statistics */ public function getOneByDate(\DateTime $date, $index, $key) { return $this->repo->findOneBy(array('timestamp' => $date, 'index' => $index, 'key' => $key)); }