diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-03-28 16:13:19 +0100 |
---|---|---|
committer | Côme Chilliet <91878298+come-nc@users.noreply.github.com> | 2024-04-02 14:16:21 +0200 |
commit | ec5133b739eabc76271789504b4dbb91a534f552 (patch) | |
tree | 880b81f5ebd11b289c67e4bcdd1ecaa41aedbcb4 /core | |
parent | b074399a87e764f506550d64f6379738186355c6 (diff) | |
download | nextcloud-server-ec5133b739eabc76271789504b4dbb91a534f552.tar.gz nextcloud-server-ec5133b739eabc76271789504b4dbb91a534f552.zip |
fix: Apply new coding standard to all files
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'core')
-rw-r--r-- | core/Command/App/Enable.php | 2 | ||||
-rw-r--r-- | core/Command/Base.php | 2 | ||||
-rw-r--r-- | core/Command/Upgrade.php | 8 | ||||
-rw-r--r-- | core/Controller/LoginController.php | 4 | ||||
-rw-r--r-- | core/Db/ProfileConfig.php | 2 | ||||
-rw-r--r-- | core/templates/update.use-cli.php | 2 |
6 files changed, 10 insertions, 10 deletions
diff --git a/core/Command/App/Enable.php b/core/Command/App/Enable.php index 624b31521ad..ed29f2fed92 100644 --- a/core/Command/App/Enable.php +++ b/core/Command/App/Enable.php @@ -103,7 +103,7 @@ class Enable extends Command implements CompletionAwareInterface { /** @var Installer $installer */ $installer = \OC::$server->query(Installer::class); - if (false === $installer->isDownloaded($appId)) { + if ($installer->isDownloaded($appId) === false) { $installer->downloadApp($appId); } diff --git a/core/Command/Base.php b/core/Command/Base.php index f8b864c5864..64d18c1b2c6 100644 --- a/core/Command/Base.php +++ b/core/Command/Base.php @@ -70,7 +70,7 @@ class Base extends Command implements CompletionAwareInterface { $this->writeArrayInOutputFormat($input, $output, $item, ' ' . $prefix); continue; } - if (!is_int($key) || ListCommand::class === get_class($this)) { + if (!is_int($key) || get_class($this) === ListCommand::class) { $value = $this->valueToString($item); if (!is_null($value)) { $output->writeln($prefix . $key . ': ' . $value); diff --git a/core/Command/Upgrade.php b/core/Command/Upgrade.php index 45427f6552f..93221f91e73 100644 --- a/core/Command/Upgrade.php +++ b/core/Command/Upgrade.php @@ -80,7 +80,7 @@ class Upgrade extends Command { */ protected function execute(InputInterface $input, OutputInterface $output): int { if (Util::needUpgrade()) { - if (OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) { + if ($output->getVerbosity() > OutputInterface::VERBOSITY_NORMAL) { // Prepend each line with a little timestamp $timestampFormatter = new TimestampFormatter($this->config, $output->getFormatter()); $output->setFormatter($timestampFormatter); @@ -96,7 +96,7 @@ class Upgrade extends Command { $progress->setFormat(" %message%\n %current%/%max% [%bar%] %percent:3s%%"); $listener = function (MigratorExecuteSqlEvent $event) use ($progress, $output): void { $message = $event->getSql(); - if (OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) { + if ($output->getVerbosity() > OutputInterface::VERBOSITY_NORMAL) { $output->writeln(' Executing SQL ' . $message); } else { if (strlen($message) > 60) { @@ -132,11 +132,11 @@ class Upgrade extends Command { $progress->finish(); $output->writeln(''); } elseif ($event instanceof RepairStepEvent) { - if (OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) { + if ($output->getVerbosity() > OutputInterface::VERBOSITY_NORMAL) { $output->writeln('<info>Repair step: ' . $event->getStepName() . '</info>'); } } elseif ($event instanceof RepairInfoEvent) { - if (OutputInterface::VERBOSITY_NORMAL < $output->getVerbosity()) { + if ($output->getVerbosity() > OutputInterface::VERBOSITY_NORMAL) { $output->writeln('<info>Repair info: ' . $event->getMessage() . '</info>'); } } elseif ($event instanceof RepairWarningEvent) { diff --git a/core/Controller/LoginController.php b/core/Controller/LoginController.php index 9644710689d..f22fee4f5e7 100644 --- a/core/Controller/LoginController.php +++ b/core/Controller/LoginController.php @@ -134,7 +134,7 @@ class LoginController extends Controller { #[UseSession] #[OpenAPI(scope: OpenAPI::SCOPE_IGNORE)] #[FrontpageRoute(verb: 'GET', url: '/login')] - public function showLoginForm(string $user = null, string $redirect_url = null): Http\Response { + public function showLoginForm(?string $user = null, ?string $redirect_url = null): Http\Response { if ($this->userSession->isLoggedIn()) { return new RedirectResponse($this->urlGenerator->linkToDefaultPageUrl()); } @@ -307,7 +307,7 @@ class LoginController extends Controller { public function tryLogin(Chain $loginChain, string $user = '', string $password = '', - string $redirect_url = null, + ?string $redirect_url = null, string $timezone = '', string $timezone_offset = ''): RedirectResponse { if (!$this->request->passesCSRFCheck()) { diff --git a/core/Db/ProfileConfig.php b/core/Db/ProfileConfig.php index 122adca88d0..d284817ca4e 100644 --- a/core/Db/ProfileConfig.php +++ b/core/Db/ProfileConfig.php @@ -26,7 +26,7 @@ declare(strict_types=1); namespace OC\Core\Db; -use \JsonSerializable; +use JsonSerializable; use OCP\AppFramework\Db\Entity; use OCP\Profile\ParameterDoesNotExistException; use function json_decode; diff --git a/core/templates/update.use-cli.php b/core/templates/update.use-cli.php index 36e348568c3..9d1febe614a 100644 --- a/core/templates/update.use-cli.php +++ b/core/templates/update.use-cli.php @@ -12,7 +12,7 @@ } else { $cliUpgradeLink = link_to_docs('admin-cli-upgrade'); } - print_unescaped($l->t('For help, see the <a target="_blank" rel="noreferrer noopener" href="%s">documentation</a>.', [$cliUpgradeLink])); ?> +print_unescaped($l->t('For help, see the <a target="_blank" rel="noreferrer noopener" href="%s">documentation</a>.', [$cliUpgradeLink])); ?> </div> </div> |