Use single quotes and getters over direct prop access in HTTPOutputHandler

This commit is contained in:
Robbie Averill 2018-10-20 14:51:08 +02:00
parent 2694a47c45
commit 9911c9c9ef

View File

@ -18,7 +18,7 @@ class HTTPOutputHandler extends AbstractProcessingHandler
/** /**
* @var string * @var string
*/ */
private $contentType = "text/html"; private $contentType = 'text/html';
/** /**
* @var int * @var int
@ -155,8 +155,8 @@ class HTTPOutputHandler extends AbstractProcessingHandler
// If headers have been sent then these won't be used, and may throw errors that we wont' want to see. // If headers have been sent then these won't be used, and may throw errors that we wont' want to see.
if (!headers_sent()) { if (!headers_sent()) {
$response->setStatusCode($this->statusCode); $response->setStatusCode($this->getStatusCode());
$response->addHeader("Content-Type", $this->contentType); $response->addHeader('Content-Type', $this->getContentType());
} else { } else {
// To supress errors aboot errors // To supress errors aboot errors
$response->setStatusCode(200); $response->setStatusCode(200);
@ -165,6 +165,6 @@ class HTTPOutputHandler extends AbstractProcessingHandler
$response->setBody($record['formatted']); $response->setBody($record['formatted']);
$response->output(); $response->output();
return false === $this->bubble; return false === $this->getBubble();
} }
} }