Mercurial > hg > isophonics-drupal-site
diff vendor/zendframework/zend-feed/src/PubSubHubbub/HttpResponse.php @ 12:7a779792577d
Update Drupal core to v8.4.5 (via Composer)
author | Chris Cannam |
---|---|
date | Fri, 23 Feb 2018 15:52:07 +0000 |
parents | 4c8ae668cc8c |
children | 129ea1e6d783 |
line wrap: on
line diff
--- a/vendor/zendframework/zend-feed/src/PubSubHubbub/HttpResponse.php Fri Feb 23 15:51:18 2018 +0000 +++ b/vendor/zendframework/zend-feed/src/PubSubHubbub/HttpResponse.php Fri Feb 23 15:52:07 2018 +0000 @@ -60,14 +60,14 @@ } $httpCodeSent = false; foreach ($this->headers as $header) { - if (!$httpCodeSent && $this->statusCode) { + if (! $httpCodeSent && $this->statusCode) { header($header['name'] . ': ' . $header['value'], $header['replace'], $this->statusCode); $httpCodeSent = true; } else { header($header['name'] . ': ' . $header['value'], $header['replace']); } } - if (!$httpCodeSent) { + if (! $httpCodeSent) { header('HTTP/1.1 ' . $this->statusCode); } } @@ -140,9 +140,11 @@ { $ok = headers_sent($file, $line); if ($ok && $throw) { - throw new Exception\RuntimeException('Cannot send headers; headers already sent in ' . $file . ', line ' . $line); + throw new Exception\RuntimeException( + 'Cannot send headers; headers already sent in ' . $file . ', line ' . $line + ); } - return !$ok; + return ! $ok; } /** @@ -154,7 +156,7 @@ */ public function setStatusCode($code) { - if (!is_int($code) || (100 > $code) || (599 < $code)) { + if (! is_int($code) || (100 > $code) || (599 < $code)) { throw new Exception\InvalidArgumentException('Invalid HTTP response' . ' code:' . $code); } @@ -201,8 +203,10 @@ * @param string $name * @return string */ + // @codingStandardsIgnoreStart protected function _normalizeHeader($name) { + // @codingStandardsIgnoreEnd $filtered = str_replace(['-', '_'], ' ', (string) $name); $filtered = ucwords(strtolower($filtered)); $filtered = str_replace(' ', '-', $filtered);