[icinga-checkins] icinga.org: icingaweb2/bugfix/icinga-web-2-doesn't-set-content-type-12161: Response: Improve documentation for method getHeader

git at icinga.org git at icinga.org
Tue Oct 18 11:07:36 CEST 2016


Module: icingaweb2
Branch: bugfix/icinga-web-2-doesn't-set-content-type-12161
Commit: 888ac98007a74dd8b45f0a61b329d0d2928812a8
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=888ac98007a74dd8b45f0a61b329d0d2928812a8

Author: Noah Hilverling <noah.hilverling at netways.de>
Date:   Tue Oct 18 11:07:24 2016 +0200

Response: Improve documentation for method getHeader

refs #12161

---

 library/Icinga/Web/Response.php |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/library/Icinga/Web/Response.php b/library/Icinga/Web/Response.php
index ac2573f..a42f48f 100644
--- a/library/Icinga/Web/Response.php
+++ b/library/Icinga/Web/Response.php
@@ -154,12 +154,12 @@ class Response extends Zend_Controller_Response_Http
     }
 
     /**
-     * Get an array of every header value with a specified name
+     * Get an array of all header values for the given name
      *
-     * @param  string $name
-     * @param  bool $lastOnly  If this is true, the last value will be returned as a string.
+     * @param   string  $name       The name of the header
+     * @param   bool    $lastOnly   If this is true, the last value will be returned as a string
      *
-     * @return null|array|string
+     * @return  null|array|string
      */
     public function getHeader($name, $lastOnly = false)
     {
@@ -300,7 +300,7 @@ class Response extends Zend_Controller_Response_Http
             }
         }
 
-        if (!$this->getHeader('Content-Type', true)) {
+        if (! $this->getHeader('Content-Type', true)) {
             $this->setHeader('Content-Type', $this->getContentType());
         }
     }



More information about the icinga-checkins mailing list