/** * @param \Application\Model\Hand $hand * @return array */ protected function getHandData($hand) { if (null == $hand) { return array('cards' => array(), 'scores' => 0); } return array('cards' => $hand->getCards(), 'scores' => $hand->getScores()); }