diff options
author | Patrik Kernstock <info@pkern.at> | 2018-09-03 23:39:03 +0300 |
---|---|---|
committer | Patrik Kernstock <info@pkern.at> | 2018-09-03 23:39:03 +0300 |
commit | a050907f62e06d9ac95b047f000cf3aca5a36c69 (patch) | |
tree | bcf44669ae679a23066536fb7f6a1ea5ae7d0ad6 /lib | |
parent | a55f3bac57a188a6e0e9bd8bb06ba52f377252dd (diff) |
Fixed indents (let PhpStorm know about tabs)
Signed-off-by: Patrik Kernstock <info@pkern.at>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/SystemStatistics.php | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/lib/SystemStatistics.php b/lib/SystemStatistics.php index 9a57249..15e6a9e 100644 --- a/lib/SystemStatistics.php +++ b/lib/SystemStatistics.php @@ -38,8 +38,8 @@ class SystemStatistics { private $appManager; /** @var Installer */ private $installer; - /** @var IniGetWrapper */ - protected $phpIni; + /** @var IniGetWrapper */ + protected $phpIni; /** * SystemStatistics constructor. @@ -47,7 +47,7 @@ class SystemStatistics { * @param IConfig $config * @param IAppManager $appManager * @param Installer $installer - * @param IniGetWrapper $phpIni + * @param IniGetWrapper $phpIni * @throws \Exception */ public function __construct(IConfig $config, IAppManager $appManager, Installer $installer, IniGetWrapper $phpIni) { @@ -55,7 +55,7 @@ class SystemStatistics { $this->view = new View(); $this->appManager = $appManager; $this->installer = $installer; - $this->phpIni = $phpIni; + $this->phpIni = $phpIni; } /** @@ -98,7 +98,7 @@ class SystemStatistics { $memoryUsage = file_get_contents('/proc/meminfo'); } //If FreeBSD is used and exec()-usage is allowed - if (PHP_OS === 'FreeBSD' && $this->is_function_enabled('exec')) { + if (PHP_OS === 'FreeBSD' && $this->is_function_enabled('exec')) { //Read Swap usage: exec("/usr/sbin/swapinfo", $return, $status); if ($status === 0 && count($return) > 1) { @@ -184,28 +184,28 @@ class SystemStatistics { return $info; } - /** - * Checks if a function is available. Borrowed from - * https://github.com/nextcloud/server/blob/2e36069e24406455ad3f3998aa25e2a949d1402a/lib/private/legacy/helper.php#L475 - * - * @param string $function_name - * @return bool - */ - public function is_function_enabled($function_name) { - if (!function_exists($function_name)) { - return false; - } - $disabled = explode(',', $this->phpIni->get('disable_functions') ?: ''); - $disabled = array_map('trim', $disabled); - if (in_array($function_name, $disabled)) { - return false; - } - $disabled = explode(',', $this->phpIni->get('suhosin.executor.func.blacklist') ?: ''); - $disabled = array_map('trim', $disabled); - if (in_array($function_name, $disabled)) { - return false; - } - return true; - } + /** + * Checks if a function is available. Borrowed from + * https://github.com/nextcloud/server/blob/2e36069e24406455ad3f3998aa25e2a949d1402a/lib/private/legacy/helper.php#L475 + * + * @param string $function_name + * @return bool + */ + public function is_function_enabled($function_name) { + if (!function_exists($function_name)) { + return false; + } + $disabled = explode(',', $this->phpIni->get('disable_functions') ?: ''); + $disabled = array_map('trim', $disabled); + if (in_array($function_name, $disabled)) { + return false; + } + $disabled = explode(',', $this->phpIni->get('suhosin.executor.func.blacklist') ?: ''); + $disabled = array_map('trim', $disabled); + if (in_array($function_name, $disabled)) { + return false; + } + return true; + } } |