summaryrefslogtreecommitdiff
path: root/vendor/symfony/http-foundation/Response.php
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@webtrees.net>2018-08-04 17:45:34 +0100
committerGreg Roach <fisharebest@webtrees.net>2018-08-04 17:45:34 +0100
commit69c36a120a7878f299c7c53aa5c2da9e8a2e1c6c (patch)
treef2ab9b134d7c24f79c4fa66f581cc6387e1938ed /vendor/symfony/http-foundation/Response.php
parentd69397b0fb0a7e71220076299d45dc2ac034b754 (diff)
downloadwebtrees-69c36a120a7878f299c7c53aa5c2da9e8a2e1c6c.tar.gz
webtrees-69c36a120a7878f299c7c53aa5c2da9e8a2e1c6c.tar.bz2
webtrees-69c36a120a7878f299c7c53aa5c2da9e8a2e1c6c.zip
Update vendor dependencies
Diffstat (limited to 'vendor/symfony/http-foundation/Response.php')
-rw-r--r--vendor/symfony/http-foundation/Response.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/vendor/symfony/http-foundation/Response.php b/vendor/symfony/http-foundation/Response.php
index 7c1edd5a5e..4e9fb8723c 100644
--- a/vendor/symfony/http-foundation/Response.php
+++ b/vendor/symfony/http-foundation/Response.php
@@ -372,9 +372,9 @@ class Response
$this->sendHeaders();
$this->sendContent();
- if (function_exists('fastcgi_finish_request')) {
+ if (\function_exists('fastcgi_finish_request')) {
fastcgi_finish_request();
- } elseif (!\in_array(PHP_SAPI, array('cli', 'phpdbg'), true)) {
+ } elseif (!\in_array(\PHP_SAPI, array('cli', 'phpdbg'), true)) {
static::closeOutputBuffers(0, true);
}
@@ -394,8 +394,8 @@ class Response
*/
public function setContent($content)
{
- if (null !== $content && !is_string($content) && !is_numeric($content) && !is_callable(array($content, '__toString'))) {
- throw new \UnexpectedValueException(sprintf('The Response content must be a string or object implementing __toString(), "%s" given.', gettype($content)));
+ if (null !== $content && !\is_string($content) && !is_numeric($content) && !\is_callable(array($content, '__toString'))) {
+ throw new \UnexpectedValueException(sprintf('The Response content must be a string or object implementing __toString(), "%s" given.', \gettype($content)));
}
$this->content = (string) $content;
@@ -541,7 +541,7 @@ class Response
*/
public function isCacheable()
{
- if (!in_array($this->statusCode, array(200, 203, 300, 301, 302, 404, 410))) {
+ if (!\in_array($this->statusCode, array(200, 203, 300, 301, 302, 404, 410))) {
return false;
}
@@ -1112,7 +1112,7 @@ class Response
$modifiedSince = $request->headers->get('If-Modified-Since');
if ($etags = $request->getETags()) {
- $notModified = in_array($this->getEtag(), $etags) || in_array('*', $etags);
+ $notModified = \in_array($this->getEtag(), $etags) || \in_array('*', $etags);
}
if ($modifiedSince && $lastModified) {
@@ -1247,7 +1247,7 @@ class Response
*/
public function isRedirect($location = null)
{
- return in_array($this->statusCode, array(201, 301, 302, 303, 307, 308)) && (null === $location ?: $location == $this->headers->get('Location'));
+ return \in_array($this->statusCode, array(201, 301, 302, 303, 307, 308)) && (null === $location ?: $location == $this->headers->get('Location'));
}
/**
@@ -1259,7 +1259,7 @@ class Response
*/
public function isEmpty()
{
- return in_array($this->statusCode, array(204, 304));
+ return \in_array($this->statusCode, array(204, 304));
}
/**
@@ -1275,9 +1275,9 @@ class Response
public static function closeOutputBuffers($targetLevel, $flush)
{
$status = ob_get_status(true);
- $level = count($status);
+ $level = \count($status);
// PHP_OUTPUT_HANDLER_* are not defined on HHVM 3.3
- $flags = defined('PHP_OUTPUT_HANDLER_REMOVABLE') ? PHP_OUTPUT_HANDLER_REMOVABLE | ($flush ? PHP_OUTPUT_HANDLER_FLUSHABLE : PHP_OUTPUT_HANDLER_CLEANABLE) : -1;
+ $flags = \defined('PHP_OUTPUT_HANDLER_REMOVABLE') ? PHP_OUTPUT_HANDLER_REMOVABLE | ($flush ? PHP_OUTPUT_HANDLER_FLUSHABLE : PHP_OUTPUT_HANDLER_CLEANABLE) : -1;
while ($level-- > $targetLevel && ($s = $status[$level]) && (!isset($s['del']) ? !isset($s['flags']) || ($s['flags'] & $flags) === $flags : $s['del'])) {
if ($flush) {