From b6b91c9bf74327d93d99aebd04f4417cf7fc701c Mon Sep 17 00:00:00 2001 From: Sebastian Meyer Date: Sun, 15 Oct 2017 18:11:50 +0200 Subject: [PATCH] Fix Codacy "Code Style" Pattern --- oai2server.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/oai2server.php b/oai2server.php index ccea27e..b85c0e1 100644 --- a/oai2server.php +++ b/oai2server.php @@ -62,15 +62,14 @@ class OAI2Server { public function response() { if (empty($this->errors)) { return $this->response->doc; - } else { - $errorResponse = new OAI2XMLResponse($this->uri, $this->verb, $this->args); - $oai_node = $errorResponse->doc->documentElement; - foreach($this->errors as $e) { - $node = $errorResponse->addChild($oai_node, 'error', $e->getMessage()); - $node->setAttribute('code', $e->getOAI2Code()); - } - return $errorResponse->doc; } + $errorResponse = new OAI2XMLResponse($this->uri, $this->verb, $this->args); + $oai_node = $errorResponse->doc->documentElement; + foreach($this->errors as $e) { + $node = $errorResponse->addChild($oai_node, 'error', $e->getMessage()); + $node->setAttribute('code', $e->getOAI2Code()); + } + return $errorResponse->doc; } public function Identify() {