Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit 2a54a8a

Browse files
Jamie SnapeStyleCIBot
authored andcommitted
Applied fixes from StyleCI
1 parent e65c0ed commit 2a54a8a

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

core/controllers/components/DownloadBitstreamComponent.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,10 @@ function env($key)
165165
{
166166
if ($key == 'HTTPS') {
167167
if (isset($_SERVER['HTTPS'])) {
168-
return (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off');
168+
return !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off';
169169
}
170170

171-
return (strpos(env('SCRIPT_URI'), 'https://') === 0);
171+
return strpos(env('SCRIPT_URI'), 'https://') === 0;
172172
}
173173

174174
if ($key == 'SCRIPT_NAME') {
@@ -217,7 +217,7 @@ function env($key)
217217
return str_replace(env('DOCUMENT_ROOT'), '', env('SCRIPT_FILENAME'));
218218
break;
219219
case 'CGI_MODE':
220-
return (PHP_SAPI === 'cgi');
220+
return PHP_SAPI === 'cgi';
221221
break;
222222
case 'HTTP_BASE':
223223
$host = env('HTTP_HOST');

core/controllers/components/MimeTypeComponent.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ private function privFindType($filename)
7272
// return mime type for extension
7373
if (isset($mimeTypes[$filename])) {
7474
return $mimeTypes[$filename];
75-
7675
}
7776

7877
// If the extension was not found, return octet-stream.

library/KWUtils.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public static function createSubDirectories($baseDirectory, $subDirectories, $mo
8484
*/
8585
public static function isWindows()
8686
{
87-
return (strtolower(substr(PHP_OS, 0, 3)) == 'win');
87+
return strtolower(substr(PHP_OS, 0, 3)) == 'win';
8888
}
8989

9090
/**
@@ -162,7 +162,7 @@ public static function exec($command, &$output = null, $chdir = '', &$return_val
162162
*/
163163
public static function isLinux()
164164
{
165-
return (strtolower(substr(PHP_OS, 0, 5)) == 'linux');
165+
return strtolower(substr(PHP_OS, 0, 5)) == 'linux';
166166
}
167167

168168
/**

modules/oai/library/oai/oaidp-util.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function get_token()
2222
{
2323
list($usec, $sec) = explode(' ', microtime());
2424

25-
return ((int) ($usec * 1000) + (int) ($sec * 1000));
25+
return (int) ($usec * 1000) + (int) ($sec * 1000);
2626
}
2727

2828
function oai_error($code, $argument = '', $value = '')
@@ -429,7 +429,7 @@ function php_is_at_least($version)
429429

430430
function is_valid_uri($url)
431431
{
432-
return ((bool) preg_match("'^[^:]+:(?://)?(?:[a-z_0-9-]+[\.]{1})*(?:[a-z_0-9-]+\.)[a-z]{2,3}.*$'i", $url));
432+
return (bool) preg_match("'^[^:]+:(?://)?(?:[a-z_0-9-]+[\.]{1})*(?:[a-z_0-9-]+\.)[a-z]{2,3}.*$'i", $url);
433433
}
434434

435435
function metadataHeader($prefix)

0 commit comments

Comments
 (0)