private function authorTypeHandle(Article $a) { if ($a === null) { throw new Exceptions\NullPointerException("Argument Event cannot be null"); } try { $author = null; if ($this->getUserService() !== null) { $id = $this->getMixId($a->getAuthor()); if ($id !== null) { $author = $this->getUserService()->getUser($id, false); } } $a->setAuthor($author); } catch (\Exception $ex) { $this->logError($ex->getMessage()); throw new Exceptions\DataErrorException($ex->getMessage(), $ex->getCode(), $ex->getPrevious()); } }