Passed
Push — master ( da9ad9...c724eb )
by Roeland
13:33 queued 01:55
created
core/Command/Config/System/GetConfig.php 1 patch
Indentation   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -29,72 +29,72 @@
 block discarded – undo
29 29
 use Symfony\Component\Console\Output\OutputInterface;
30 30
 
31 31
 class GetConfig extends Base {
32
-	/** * @var SystemConfig */
33
-	protected $systemConfig;
32
+    /** * @var SystemConfig */
33
+    protected $systemConfig;
34 34
 
35
-	/**
36
-	 * @param SystemConfig $systemConfig
37
-	 */
38
-	public function __construct(SystemConfig $systemConfig) {
39
-		parent::__construct();
40
-		$this->systemConfig = $systemConfig;
41
-	}
35
+    /**
36
+     * @param SystemConfig $systemConfig
37
+     */
38
+    public function __construct(SystemConfig $systemConfig) {
39
+        parent::__construct();
40
+        $this->systemConfig = $systemConfig;
41
+    }
42 42
 
43
-	protected function configure() {
44
-		parent::configure();
43
+    protected function configure() {
44
+        parent::configure();
45 45
 
46
-		$this
47
-			->setName('config:system:get')
48
-			->setDescription('Get a system config value')
49
-			->addArgument(
50
-				'name',
51
-				InputArgument::REQUIRED | InputArgument::IS_ARRAY,
52
-				'Name of the config to get, specify multiple for array parameter'
53
-			)
54
-			->addOption(
55
-				'default-value',
56
-				null,
57
-				InputOption::VALUE_OPTIONAL,
58
-				'If no default value is set and the config does not exist, the command will exit with 1'
59
-			)
60
-		;
61
-	}
46
+        $this
47
+            ->setName('config:system:get')
48
+            ->setDescription('Get a system config value')
49
+            ->addArgument(
50
+                'name',
51
+                InputArgument::REQUIRED | InputArgument::IS_ARRAY,
52
+                'Name of the config to get, specify multiple for array parameter'
53
+            )
54
+            ->addOption(
55
+                'default-value',
56
+                null,
57
+                InputOption::VALUE_OPTIONAL,
58
+                'If no default value is set and the config does not exist, the command will exit with 1'
59
+            )
60
+        ;
61
+    }
62 62
 
63
-	/**
64
-	 * Executes the current command.
65
-	 *
66
-	 * @param InputInterface  $input  An InputInterface instance
67
-	 * @param OutputInterface $output An OutputInterface instance
68
-	 * @return null|int null or 0 if everything went fine, or an error code
69
-	 */
70
-	protected function execute(InputInterface $input, OutputInterface $output) {
71
-		$configNames = $input->getArgument('name');
72
-		$configName = array_shift($configNames);
73
-		$defaultValue = $input->getOption('default-value');
63
+    /**
64
+     * Executes the current command.
65
+     *
66
+     * @param InputInterface  $input  An InputInterface instance
67
+     * @param OutputInterface $output An OutputInterface instance
68
+     * @return null|int null or 0 if everything went fine, or an error code
69
+     */
70
+    protected function execute(InputInterface $input, OutputInterface $output) {
71
+        $configNames = $input->getArgument('name');
72
+        $configName = array_shift($configNames);
73
+        $defaultValue = $input->getOption('default-value');
74 74
 
75
-		if (!in_array($configName, $this->systemConfig->getKeys()) && !$input->hasParameterOption('--default-value')) {
76
-			return 1;
77
-		}
75
+        if (!in_array($configName, $this->systemConfig->getKeys()) && !$input->hasParameterOption('--default-value')) {
76
+            return 1;
77
+        }
78 78
 
79
-		if (!in_array($configName, $this->systemConfig->getKeys())) {
80
-			$configValue = $defaultValue;
81
-		} else {
82
-			$configValue = $this->systemConfig->getValue($configName);
83
-			if (!empty($configNames)) {
84
-				foreach ($configNames as $configName) {
85
-					if (isset($configValue[$configName])) {
86
-						$configValue = $configValue[$configName];
87
-					} elseif (!$input->hasParameterOption('--default-value')) {
88
-						return 1;
89
-					} else {
90
-						$configValue = $defaultValue;
91
-						break;
92
-					}
93
-				}
94
-			}
95
-		}
79
+        if (!in_array($configName, $this->systemConfig->getKeys())) {
80
+            $configValue = $defaultValue;
81
+        } else {
82
+            $configValue = $this->systemConfig->getValue($configName);
83
+            if (!empty($configNames)) {
84
+                foreach ($configNames as $configName) {
85
+                    if (isset($configValue[$configName])) {
86
+                        $configValue = $configValue[$configName];
87
+                    } elseif (!$input->hasParameterOption('--default-value')) {
88
+                        return 1;
89
+                    } else {
90
+                        $configValue = $defaultValue;
91
+                        break;
92
+                    }
93
+                }
94
+            }
95
+        }
96 96
 
97
-		$this->writeMixedInOutputFormat($input, $output, $configValue);
98
-		return 0;
99
-	}
97
+        $this->writeMixedInOutputFormat($input, $output, $configValue);
98
+        return 0;
99
+    }
100 100
 }
Please login to merge, or discard this patch.
core/Command/Status.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -28,23 +28,23 @@
 block discarded – undo
28 28
 use Symfony\Component\Console\Output\OutputInterface;
29 29
 
30 30
 class Status extends Base {
31
-	protected function configure() {
32
-		parent::configure();
31
+    protected function configure() {
32
+        parent::configure();
33 33
 
34
-		$this
35
-			->setName('status')
36
-			->setDescription('show some status information')
37
-		;
38
-	}
34
+        $this
35
+            ->setName('status')
36
+            ->setDescription('show some status information')
37
+        ;
38
+    }
39 39
 
40
-	protected function execute(InputInterface $input, OutputInterface $output) {
41
-		$values = [
42
-			'installed' => (bool) \OC::$server->getConfig()->getSystemValue('installed', false),
43
-			'version' => implode('.', \OCP\Util::getVersion()),
44
-			'versionstring' => \OC_Util::getVersionString(),
45
-			'edition' => '',
46
-		];
40
+    protected function execute(InputInterface $input, OutputInterface $output) {
41
+        $values = [
42
+            'installed' => (bool) \OC::$server->getConfig()->getSystemValue('installed', false),
43
+            'version' => implode('.', \OCP\Util::getVersion()),
44
+            'versionstring' => \OC_Util::getVersionString(),
45
+            'edition' => '',
46
+        ];
47 47
 
48
-		$this->writeArrayInOutputFormat($input, $output, $values);
49
-	}
48
+        $this->writeArrayInOutputFormat($input, $output, $values);
49
+    }
50 50
 }
Please login to merge, or discard this patch.
core/Command/User/Report.php 1 patch
Indentation   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -32,56 +32,56 @@
 block discarded – undo
32 32
 use Symfony\Component\Console\Output\OutputInterface;
33 33
 
34 34
 class Report extends Command {
35
-	/** @var IUserManager */
36
-	protected $userManager;
35
+    /** @var IUserManager */
36
+    protected $userManager;
37 37
 
38
-	/**
39
-	 * @param IUserManager $userManager
40
-	 */
41
-	public function __construct(IUserManager $userManager) {
42
-		$this->userManager = $userManager;
43
-		parent::__construct();
44
-	}
38
+    /**
39
+     * @param IUserManager $userManager
40
+     */
41
+    public function __construct(IUserManager $userManager) {
42
+        $this->userManager = $userManager;
43
+        parent::__construct();
44
+    }
45 45
 
46
-	protected function configure() {
47
-		$this
48
-			->setName('user:report')
49
-			->setDescription('shows how many users have access');
50
-	}
46
+    protected function configure() {
47
+        $this
48
+            ->setName('user:report')
49
+            ->setDescription('shows how many users have access');
50
+    }
51 51
 
52
-	protected function execute(InputInterface $input, OutputInterface $output) {
53
-		$table = new Table($output);
54
-		$table->setHeaders(['User Report', '']);
55
-		$userCountArray = $this->countUsers();
56
-		if (!empty($userCountArray)) {
57
-			$total = 0;
58
-			$rows = [];
59
-			foreach ($userCountArray as $classname => $users) {
60
-				$total += $users;
61
-				$rows[] = [$classname, $users];
62
-			}
52
+    protected function execute(InputInterface $input, OutputInterface $output) {
53
+        $table = new Table($output);
54
+        $table->setHeaders(['User Report', '']);
55
+        $userCountArray = $this->countUsers();
56
+        if (!empty($userCountArray)) {
57
+            $total = 0;
58
+            $rows = [];
59
+            foreach ($userCountArray as $classname => $users) {
60
+                $total += $users;
61
+                $rows[] = [$classname, $users];
62
+            }
63 63
 
64
-			$rows[] = [' '];
65
-			$rows[] = ['total users', $total];
66
-		} else {
67
-			$rows[] = ['No backend enabled that supports user counting', ''];
68
-		}
64
+            $rows[] = [' '];
65
+            $rows[] = ['total users', $total];
66
+        } else {
67
+            $rows[] = ['No backend enabled that supports user counting', ''];
68
+        }
69 69
 
70
-		$userDirectoryCount = $this->countUserDirectories();
71
-		$rows[] = [' '];
72
-		$rows[] = ['user directories', $userDirectoryCount];
70
+        $userDirectoryCount = $this->countUserDirectories();
71
+        $rows[] = [' '];
72
+        $rows[] = ['user directories', $userDirectoryCount];
73 73
 
74
-		$table->setRows($rows);
75
-		$table->render();
76
-	}
74
+        $table->setRows($rows);
75
+        $table->render();
76
+    }
77 77
 
78
-	private function countUsers() {
79
-		return $this->userManager->countUsers();
80
-	}
78
+    private function countUsers() {
79
+        return $this->userManager->countUsers();
80
+    }
81 81
 
82
-	private function countUserDirectories() {
83
-		$dataview = new \OC\Files\View('/');
84
-		$userDirectories = $dataview->getDirectoryContent('/', 'httpd/unix-directory');
85
-		return count($userDirectories);
86
-	}
82
+    private function countUserDirectories() {
83
+        $dataview = new \OC\Files\View('/');
84
+        $userDirectories = $dataview->getDirectoryContent('/', 'httpd/unix-directory');
85
+        return count($userDirectories);
86
+    }
87 87
 }
Please login to merge, or discard this patch.
core/Command/Check.php 1 patch
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -28,35 +28,35 @@
 block discarded – undo
28 28
 use Symfony\Component\Console\Output\OutputInterface;
29 29
 
30 30
 class Check extends Base {
31
-	/**
32
-	 * @var SystemConfig
33
-	 */
34
-	private $config;
31
+    /**
32
+     * @var SystemConfig
33
+     */
34
+    private $config;
35 35
 
36
-	public function __construct(SystemConfig $config) {
37
-		parent::__construct();
38
-		$this->config = $config;
39
-	}
36
+    public function __construct(SystemConfig $config) {
37
+        parent::__construct();
38
+        $this->config = $config;
39
+    }
40 40
 
41
-	protected function configure() {
42
-		parent::configure();
41
+    protected function configure() {
42
+        parent::configure();
43 43
 
44
-		$this
45
-			->setName('check')
46
-			->setDescription('check dependencies of the server environment')
47
-		;
48
-	}
44
+        $this
45
+            ->setName('check')
46
+            ->setDescription('check dependencies of the server environment')
47
+        ;
48
+    }
49 49
 
50
-	protected function execute(InputInterface $input, OutputInterface $output) {
51
-		$errors = \OC_Util::checkServer($this->config);
52
-		if (!empty($errors)) {
53
-			$errors = array_map(function ($item) {
54
-				return (string) $item['error'];
55
-			}, $errors);
50
+    protected function execute(InputInterface $input, OutputInterface $output) {
51
+        $errors = \OC_Util::checkServer($this->config);
52
+        if (!empty($errors)) {
53
+            $errors = array_map(function ($item) {
54
+                return (string) $item['error'];
55
+            }, $errors);
56 56
 
57
-			$this->writeArrayInOutputFormat($input, $output, $errors);
58
-			return 1;
59
-		}
60
-		return 0;
61
-	}
57
+            $this->writeArrayInOutputFormat($input, $output, $errors);
58
+            return 1;
59
+        }
60
+        return 0;
61
+    }
62 62
 }
Please login to merge, or discard this patch.
core/Command/Encryption/ShowKeyStorageRoot.php 1 patch
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -30,29 +30,29 @@
 block discarded – undo
30 30
 
31 31
 class ShowKeyStorageRoot extends Command {
32 32
 
33
-	/** @var Util  */
34
-	protected $util;
35
-
36
-	/**
37
-	 * @param Util $util
38
-	 */
39
-	public function __construct(Util $util) {
40
-		parent::__construct();
41
-		$this->util = $util;
42
-	}
43
-
44
-	protected function configure() {
45
-		parent::configure();
46
-		$this
47
-			->setName('encryption:show-key-storage-root')
48
-			->setDescription('Show current key storage root');
49
-	}
50
-
51
-	protected function execute(InputInterface $input, OutputInterface $output) {
52
-		$currentRoot = $this->util->getKeyStorageRoot();
53
-
54
-		$rootDescription = $currentRoot !== '' ? $currentRoot : 'default storage location (data/)';
55
-
56
-		$output->writeln("Current key storage root:  <info>$rootDescription</info>");
57
-	}
33
+    /** @var Util  */
34
+    protected $util;
35
+
36
+    /**
37
+     * @param Util $util
38
+     */
39
+    public function __construct(Util $util) {
40
+        parent::__construct();
41
+        $this->util = $util;
42
+    }
43
+
44
+    protected function configure() {
45
+        parent::configure();
46
+        $this
47
+            ->setName('encryption:show-key-storage-root')
48
+            ->setDescription('Show current key storage root');
49
+    }
50
+
51
+    protected function execute(InputInterface $input, OutputInterface $output) {
52
+        $currentRoot = $this->util->getKeyStorageRoot();
53
+
54
+        $rootDescription = $currentRoot !== '' ? $currentRoot : 'default storage location (data/)';
55
+
56
+        $output->writeln("Current key storage root:  <info>$rootDescription</info>");
57
+    }
58 58
 }
Please login to merge, or discard this patch.
core/Command/Encryption/Enable.php 1 patch
Indentation   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -29,51 +29,51 @@
 block discarded – undo
29 29
 use Symfony\Component\Console\Output\OutputInterface;
30 30
 
31 31
 class Enable extends Command {
32
-	/** @var IConfig */
33
-	protected $config;
32
+    /** @var IConfig */
33
+    protected $config;
34 34
 
35
-	/** @var IManager */
36
-	protected $encryptionManager;
35
+    /** @var IManager */
36
+    protected $encryptionManager;
37 37
 
38
-	/**
39
-	 * @param IConfig $config
40
-	 * @param IManager $encryptionManager
41
-	 */
42
-	public function __construct(IConfig $config, IManager $encryptionManager) {
43
-		parent::__construct();
38
+    /**
39
+     * @param IConfig $config
40
+     * @param IManager $encryptionManager
41
+     */
42
+    public function __construct(IConfig $config, IManager $encryptionManager) {
43
+        parent::__construct();
44 44
 
45
-		$this->encryptionManager = $encryptionManager;
46
-		$this->config = $config;
47
-	}
45
+        $this->encryptionManager = $encryptionManager;
46
+        $this->config = $config;
47
+    }
48 48
 
49
-	protected function configure() {
50
-		$this
51
-			->setName('encryption:enable')
52
-			->setDescription('Enable encryption')
53
-		;
54
-	}
49
+    protected function configure() {
50
+        $this
51
+            ->setName('encryption:enable')
52
+            ->setDescription('Enable encryption')
53
+        ;
54
+    }
55 55
 
56
-	protected function execute(InputInterface $input, OutputInterface $output) {
57
-		if ($this->config->getAppValue('core', 'encryption_enabled', 'no') === 'yes') {
58
-			$output->writeln('Encryption is already enabled');
59
-		} else {
60
-			$this->config->setAppValue('core', 'encryption_enabled', 'yes');
61
-			$output->writeln('<info>Encryption enabled</info>');
62
-		}
63
-		$output->writeln('');
56
+    protected function execute(InputInterface $input, OutputInterface $output) {
57
+        if ($this->config->getAppValue('core', 'encryption_enabled', 'no') === 'yes') {
58
+            $output->writeln('Encryption is already enabled');
59
+        } else {
60
+            $this->config->setAppValue('core', 'encryption_enabled', 'yes');
61
+            $output->writeln('<info>Encryption enabled</info>');
62
+        }
63
+        $output->writeln('');
64 64
 
65
-		$modules = $this->encryptionManager->getEncryptionModules();
66
-		if (empty($modules)) {
67
-			$output->writeln('<error>No encryption module is loaded</error>');
68
-		} else {
69
-			$defaultModule = $this->config->getAppValue('core', 'default_encryption_module', null);
70
-			if ($defaultModule === null) {
71
-				$output->writeln('<error>No default module is set</error>');
72
-			} elseif (!isset($modules[$defaultModule])) {
73
-				$output->writeln('<error>The current default module does not exist: ' . $defaultModule . '</error>');
74
-			} else {
75
-				$output->writeln('Default module: ' . $defaultModule);
76
-			}
77
-		}
78
-	}
65
+        $modules = $this->encryptionManager->getEncryptionModules();
66
+        if (empty($modules)) {
67
+            $output->writeln('<error>No encryption module is loaded</error>');
68
+        } else {
69
+            $defaultModule = $this->config->getAppValue('core', 'default_encryption_module', null);
70
+            if ($defaultModule === null) {
71
+                $output->writeln('<error>No default module is set</error>');
72
+            } elseif (!isset($modules[$defaultModule])) {
73
+                $output->writeln('<error>The current default module does not exist: ' . $defaultModule . '</error>');
74
+            } else {
75
+                $output->writeln('Default module: ' . $defaultModule);
76
+            }
77
+        }
78
+    }
79 79
 }
Please login to merge, or discard this patch.
core/templates/layout.guest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 									<?php p($theme->getName()); ?>
30 30
 								</h1>
31 31
 								<?php if (\OC::$server->getConfig()->getSystemValue('installed', false)
32
-									&& \OC::$server->getConfig()->getAppValue('theming', 'logoMime', false)): ?>
32
+                                    && \OC::$server->getConfig()->getAppValue('theming', 'logoMime', false)): ?>
33 33
 									<img src="<?php p($theme->getLogo()); ?>"/>
34 34
 								<?php endif; ?>
35 35
 							</div>
Please login to merge, or discard this patch.
lib/private/DB/QueryBuilder/FunctionBuilder/PgSqlFunctionBuilder.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 use OC\DB\QueryBuilder\QueryFunction;
25 25
 
26 26
 class PgSqlFunctionBuilder extends FunctionBuilder {
27
-	public function concat($x, $y) {
28
-		return new QueryFunction('(' . $this->helper->quoteColumnName($x) . ' || ' . $this->helper->quoteColumnName($y) . ')');
29
-	}
27
+    public function concat($x, $y) {
28
+        return new QueryFunction('(' . $this->helper->quoteColumnName($x) . ' || ' . $this->helper->quoteColumnName($y) . ')');
29
+    }
30 30
 }
Please login to merge, or discard this patch.
apps/files_sharing/lib/Activity/Settings/RemoteShare.php 1 patch
Indentation   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -27,72 +27,72 @@
 block discarded – undo
27 27
 
28 28
 class RemoteShare implements ISetting {
29 29
 
30
-	/** @var IL10N */
31
-	protected $l;
30
+    /** @var IL10N */
31
+    protected $l;
32 32
 
33
-	/**
34
-	 * @param IL10N $l
35
-	 */
36
-	public function __construct(IL10N $l) {
37
-		$this->l = $l;
38
-	}
33
+    /**
34
+     * @param IL10N $l
35
+     */
36
+    public function __construct(IL10N $l) {
37
+        $this->l = $l;
38
+    }
39 39
 
40
-	/**
41
-	 * @return string Lowercase a-z and underscore only identifier
42
-	 * @since 11.0.0
43
-	 */
44
-	public function getIdentifier() {
45
-		return 'remote_share';
46
-	}
40
+    /**
41
+     * @return string Lowercase a-z and underscore only identifier
42
+     * @since 11.0.0
43
+     */
44
+    public function getIdentifier() {
45
+        return 'remote_share';
46
+    }
47 47
 
48
-	/**
49
-	 * @return string A translated string
50
-	 * @since 11.0.0
51
-	 */
52
-	public function getName() {
53
-		return $this->l->t('A file or folder was shared from <strong>another server</strong>');
54
-	}
48
+    /**
49
+     * @return string A translated string
50
+     * @since 11.0.0
51
+     */
52
+    public function getName() {
53
+        return $this->l->t('A file or folder was shared from <strong>another server</strong>');
54
+    }
55 55
 
56
-	/**
57
-	 * @return int whether the filter should be rather on the top or bottom of
58
-	 * the admin section. The filters are arranged in ascending order of the
59
-	 * priority values. It is required to return a value between 0 and 100.
60
-	 * @since 11.0.0
61
-	 */
62
-	public function getPriority() {
63
-		return 11;
64
-	}
56
+    /**
57
+     * @return int whether the filter should be rather on the top or bottom of
58
+     * the admin section. The filters are arranged in ascending order of the
59
+     * priority values. It is required to return a value between 0 and 100.
60
+     * @since 11.0.0
61
+     */
62
+    public function getPriority() {
63
+        return 11;
64
+    }
65 65
 
66
-	/**
67
-	 * @return bool True when the option can be changed for the stream
68
-	 * @since 11.0.0
69
-	 */
70
-	public function canChangeStream() {
71
-		return true;
72
-	}
66
+    /**
67
+     * @return bool True when the option can be changed for the stream
68
+     * @since 11.0.0
69
+     */
70
+    public function canChangeStream() {
71
+        return true;
72
+    }
73 73
 
74
-	/**
75
-	 * @return bool True when the option can be changed for the stream
76
-	 * @since 11.0.0
77
-	 */
78
-	public function isDefaultEnabledStream() {
79
-		return true;
80
-	}
74
+    /**
75
+     * @return bool True when the option can be changed for the stream
76
+     * @since 11.0.0
77
+     */
78
+    public function isDefaultEnabledStream() {
79
+        return true;
80
+    }
81 81
 
82
-	/**
83
-	 * @return bool True when the option can be changed for the mail
84
-	 * @since 11.0.0
85
-	 */
86
-	public function canChangeMail() {
87
-		return true;
88
-	}
82
+    /**
83
+     * @return bool True when the option can be changed for the mail
84
+     * @since 11.0.0
85
+     */
86
+    public function canChangeMail() {
87
+        return true;
88
+    }
89 89
 
90
-	/**
91
-	 * @return bool True when the option can be changed for the stream
92
-	 * @since 11.0.0
93
-	 */
94
-	public function isDefaultEnabledMail() {
95
-		return false;
96
-	}
90
+    /**
91
+     * @return bool True when the option can be changed for the stream
92
+     * @since 11.0.0
93
+     */
94
+    public function isDefaultEnabledMail() {
95
+        return false;
96
+    }
97 97
 }
98 98
 
Please login to merge, or discard this patch.