aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/legacy
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/legacy')
-rw-r--r--lib/private/legacy/OC_Files.php2
-rw-r--r--lib/private/legacy/OC_Image.php4
-rw-r--r--lib/private/legacy/OC_User.php2
-rw-r--r--lib/private/legacy/OC_Util.php6
4 files changed, 7 insertions, 7 deletions
diff --git a/lib/private/legacy/OC_Files.php b/lib/private/legacy/OC_Files.php
index ef65aa33c93..1b2f83941c8 100644
--- a/lib/private/legacy/OC_Files.php
+++ b/lib/private/legacy/OC_Files.php
@@ -87,7 +87,7 @@ class OC_Files {
header('Accept-Ranges: bytes', true);
if (count($rangeArray) > 1) {
$type = 'multipart/byteranges; boundary='.self::getBoundary();
- // no Content-Length header here
+ // no Content-Length header here
} else {
header(sprintf('Content-Range: bytes %d-%d/%d', $rangeArray[0]['from'], $rangeArray[0]['to'], $fileSize), true);
OC_Response::setContentLengthHeader($rangeArray[0]['to'] - $rangeArray[0]['from'] + 1);
diff --git a/lib/private/legacy/OC_Image.php b/lib/private/legacy/OC_Image.php
index 56fb3e0d52f..48f1812038b 100644
--- a/lib/private/legacy/OC_Image.php
+++ b/lib/private/legacy/OC_Image.php
@@ -85,7 +85,7 @@ class OC_Image implements \OCP\IImage {
* @param \OCP\IConfig $config
* @throws \InvalidArgumentException in case the $imageRef parameter is not null
*/
- public function __construct($imageRef = null, \OCP\ILogger $logger = null, \OCP\IConfig $config = null) {
+ public function __construct($imageRef = null, ?\OCP\ILogger $logger = null, ?\OCP\IConfig $config = null) {
$this->logger = $logger;
if ($logger === null) {
$this->logger = \OC::$server->getLogger();
@@ -211,7 +211,7 @@ class OC_Image implements \OCP\IImage {
* @param string $mimeType
* @return bool
*/
- public function show(string $mimeType = null): bool {
+ public function show(?string $mimeType = null): bool {
if ($mimeType === null) {
$mimeType = $this->mimeType();
}
diff --git a/lib/private/legacy/OC_User.php b/lib/private/legacy/OC_User.php
index 07ec97da7b0..3fe3f173b99 100644
--- a/lib/private/legacy/OC_User.php
+++ b/lib/private/legacy/OC_User.php
@@ -88,7 +88,7 @@ class OC_User {
\OC::$server->getUserManager()->registerBackend($backend);
} else {
// You'll never know what happens
- if (null === $backend or !is_string($backend)) {
+ if ($backend === null or !is_string($backend)) {
$backend = 'database';
}
diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php
index 09d0719ff2b..86472f1b5e5 100644
--- a/lib/private/legacy/OC_Util.php
+++ b/lib/private/legacy/OC_Util.php
@@ -970,11 +970,11 @@ class OC_Util {
*/
private static function isNonUTF8Locale() {
if (function_exists('escapeshellcmd')) {
- return '' === escapeshellcmd('§');
+ return escapeshellcmd('§') === '';
} elseif (function_exists('escapeshellarg')) {
- return '\'\'' === escapeshellarg('§');
+ return escapeshellarg('§') === '\'\'';
} else {
- return 0 === preg_match('/utf-?8/i', setlocale(LC_CTYPE, 0));
+ return preg_match('/utf-?8/i', setlocale(LC_CTYPE, 0)) === 0;
}
}