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

Commit

Permalink
Applied fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie Snape authored and StyleCIBot committed Dec 8, 2015
1 parent e65c0ed commit 2a54a8a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions core/controllers/components/DownloadBitstreamComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,10 @@ function env($key)
{
if ($key == 'HTTPS') {
if (isset($_SERVER['HTTPS'])) {
return (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off');
return !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off';
}

return (strpos(env('SCRIPT_URI'), 'https://') === 0);
return strpos(env('SCRIPT_URI'), 'https://') === 0;
}

if ($key == 'SCRIPT_NAME') {
Expand Down Expand Up @@ -217,7 +217,7 @@ function env($key)
return str_replace(env('DOCUMENT_ROOT'), '', env('SCRIPT_FILENAME'));
break;
case 'CGI_MODE':
return (PHP_SAPI === 'cgi');
return PHP_SAPI === 'cgi';
break;
case 'HTTP_BASE':
$host = env('HTTP_HOST');
Expand Down
1 change: 0 additions & 1 deletion core/controllers/components/MimeTypeComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ private function privFindType($filename)
// return mime type for extension
if (isset($mimeTypes[$filename])) {
return $mimeTypes[$filename];

}

// If the extension was not found, return octet-stream.
Expand Down
4 changes: 2 additions & 2 deletions library/KWUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public static function createSubDirectories($baseDirectory, $subDirectories, $mo
*/
public static function isWindows()
{
return (strtolower(substr(PHP_OS, 0, 3)) == 'win');
return strtolower(substr(PHP_OS, 0, 3)) == 'win';
}

/**
Expand Down Expand Up @@ -162,7 +162,7 @@ public static function exec($command, &$output = null, $chdir = '', &$return_val
*/
public static function isLinux()
{
return (strtolower(substr(PHP_OS, 0, 5)) == 'linux');
return strtolower(substr(PHP_OS, 0, 5)) == 'linux';
}

/**
Expand Down
4 changes: 2 additions & 2 deletions modules/oai/library/oai/oaidp-util.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function get_token()
{
list($usec, $sec) = explode(' ', microtime());

return ((int) ($usec * 1000) + (int) ($sec * 1000));
return (int) ($usec * 1000) + (int) ($sec * 1000);
}

function oai_error($code, $argument = '', $value = '')
Expand Down Expand Up @@ -429,7 +429,7 @@ function php_is_at_least($version)

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

function metadataHeader($prefix)
Expand Down

0 comments on commit 2a54a8a

Please sign in to comment.