Merge pull request #36271 from nextcloud/fix/fix-codestyle

Fix codestyle using codesniffer
This commit is contained in:
Côme Chilliet 2023-01-20 15:26:17 +01:00 committed by GitHub
commit 3f231d68d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
887 changed files with 430 additions and 1320 deletions

View File

@ -28,7 +28,6 @@ require_once(dirname(__DIR__) . '/3rdparty/autoload.php');
* this class checks all methods for the presence of the @since tag
*/
class SinceTagCheckVisitor extends \PhpParser\NodeVisitorAbstract {
/** @var string */
protected $namespace = '';
/** @var string */

View File

@ -26,7 +26,6 @@ use PHPUnit\Framework\Assert;
require __DIR__ . '/../../vendor/autoload.php';
trait Avatar {
/** @var string **/
private $lastAvatar;

View File

@ -73,7 +73,6 @@ trait BasicStructure {
protected $remoteBaseUrl;
public function __construct($baseUrl, $admin, $regular_user_password) {
// Initialize your context here
$this->baseUrl = $baseUrl;
$this->adminUser = $admin;

View File

@ -23,7 +23,6 @@
use PHPUnit\Framework\Assert;
trait ContactsMenu {
// BasicStructure trait is expected to be used in the class that uses this
// trait.

View File

@ -26,7 +26,6 @@ use PHPUnit\Framework\Assert;
require __DIR__ . '/../../vendor/autoload.php';
trait Download {
/** @var string **/
private $downloadedFile;

View File

@ -21,7 +21,6 @@
*
*/
trait Mail {
// CommandLine trait is expected to be used in the class that uses this
// trait.

View File

@ -24,7 +24,6 @@ use Behat\Gherkin\Node\TableNode;
use PHPUnit\Framework\Assert;
trait Search {
// BasicStructure trait is expected to be used in the class that uses this
// trait.

View File

@ -23,7 +23,6 @@
use Behat\Behat\Context\Context;
class TalkContext implements Context {
/**
* @BeforeFeature @Talk
* @BeforeScenario @Talk

View File

@ -31,7 +31,6 @@ require __DIR__ . '/../../vendor/autoload.php';
* Trashbin functions
*/
trait Trashbin {
// WebDav trait is expected to be used in the class that uses this trait.
/**

View File

@ -107,11 +107,11 @@ class ListApps extends Base {
$output->writeln('Disabled:');
parent::writeArrayInOutputFormat($input, $output, $items['disabled']);
break;
break;
default:
parent::writeArrayInOutputFormat($input, $output, $items);
break;
break;
}
}

View File

@ -77,7 +77,7 @@ class ListConfigs extends Base {
$configs = [
'system' => $this->getSystemConfigs($noSensitiveValues),
];
break;
break;
case 'all':
$apps = $this->appConfig->getApps();
@ -88,7 +88,7 @@ class ListConfigs extends Base {
foreach ($apps as $appName) {
$configs['apps'][$appName] = $this->getAppConfigs($appName, $noSensitiveValues);
}
break;
break;
default:
$configs = [

View File

@ -74,7 +74,6 @@ class Install extends Command {
}
protected function execute(InputInterface $input, OutputInterface $output): int {
// validate the environment
$server = \OC::$server;
$setupHelper = new Setup(

View File

@ -95,10 +95,10 @@ class Upgrade extends Command {
$self = $this;
$updater = new Updater(
$this->config,
\OC::$server->getIntegrityCodeChecker(),
$this->logger,
$this->installer
$this->config,
\OC::$server->getIntegrityCodeChecker(),
$this->logger,
$this->installer
);
/** @var IEventDispatcher $dispatcher */

View File

@ -308,16 +308,16 @@ class AvatarController extends Controller {
return new JSONResponse(['data' => [
'message' => $this->l->t("No temporary profile picture available, try again")
]],
Http::STATUS_NOT_FOUND);
Http::STATUS_NOT_FOUND);
}
$image = new \OCP\Image();
$image->loadFromData($tmpAvatar);
$resp = new DataDisplayResponse(
$image->data() ?? '',
Http::STATUS_OK,
['Content-Type' => $image->mimeType()]);
$image->data() ?? '',
Http::STATUS_OK,
['Content-Type' => $image->mimeType()]);
$resp->setETag((string)crc32($image->data() ?? ''));
$resp->cacheFor(0);
@ -331,12 +331,12 @@ class AvatarController extends Controller {
public function postCroppedAvatar(?array $crop = null): JSONResponse {
if (is_null($crop)) {
return new JSONResponse(['data' => ['message' => $this->l->t("No crop data provided")]],
Http::STATUS_BAD_REQUEST);
Http::STATUS_BAD_REQUEST);
}
if (!isset($crop['x'], $crop['y'], $crop['w'], $crop['h'])) {
return new JSONResponse(['data' => ['message' => $this->l->t("No valid crop data provided")]],
Http::STATUS_BAD_REQUEST);
Http::STATUS_BAD_REQUEST);
}
$tmpAvatar = $this->cache->get('tmpAvatar');
@ -344,7 +344,7 @@ class AvatarController extends Controller {
return new JSONResponse(['data' => [
'message' => $this->l->t("No temporary profile picture available, try again")
]],
Http::STATUS_BAD_REQUEST);
Http::STATUS_BAD_REQUEST);
}
$image = new \OCP\Image();
@ -358,7 +358,7 @@ class AvatarController extends Controller {
return new JSONResponse(['status' => 'success']);
} catch (\OC\NotSquareException $e) {
return new JSONResponse(['data' => ['message' => $this->l->t('Crop is not square')]],
Http::STATUS_BAD_REQUEST);
Http::STATUS_BAD_REQUEST);
} catch (\Exception $e) {
$this->logger->error($e->getMessage(), ['exception' => $e, 'app' => 'core']);
return new JSONResponse(['data' => ['message' => $this->l->t('An error occurred. Please contact your admin.')]], Http::STATUS_BAD_REQUEST);

View File

@ -28,7 +28,6 @@ use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Response;
class WalledGardenController extends Controller {
/**
* @PublicPage
* @NoCSRFRequired

View File

@ -33,7 +33,6 @@ use OCP\AppFramework\Http\Response;
use OCP\IRequest;
class WellKnownController extends Controller {
/** @var RequestManager */
private $requestManager;

View File

@ -37,7 +37,6 @@ use OCP\IUserSession;
use OCP\L10N\IFactory;
class WhatsNewController extends OCSController {
/** @var IConfig */
protected $config;
/** @var IUserSession */

View File

@ -33,7 +33,6 @@ use OCP\AppFramework\Http\JSONResponse;
use OCP\IRequest;
class WipeController extends Controller {
/** @var RemoteWipe */
private $remoteWipe;

View File

@ -26,7 +26,6 @@ declare(strict_types=1);
namespace OC\Core\Data;
class LoginFlowV2Tokens {
/** @var string */
private $loginToken;
/** @var string */

View File

@ -40,7 +40,6 @@ use OCP\Profile\ParameterDoesNotExistException;
* @method void setConfig(string $config)
*/
class ProfileConfig extends Entity implements JsonSerializable {
/**
* Visible to users, guests, and public access
*

View File

@ -46,7 +46,6 @@ use OCP\IURLGenerator;
use OCP\IUser;
class TwoFactorMiddleware extends Middleware {
/** @var Manager */
private $twoFactorManager;

View File

@ -39,7 +39,6 @@ use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
class Version13000Date20170718121200 extends SimpleMigrationStep {
/** @var IDBConnection */
private $connection;

View File

@ -28,7 +28,6 @@ use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
class Version13000Date20170814074715 extends SimpleMigrationStep {
/**
* @param IOutput $output
* @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`

View File

@ -33,7 +33,6 @@ use OCP\Migration\SimpleMigrationStep;
* Auto-generated migration step: Please modify to your needs!
*/
class Version13000Date20170919121250 extends SimpleMigrationStep {
/**
* @param IOutput $output
* @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`

View File

@ -29,7 +29,6 @@ use OCP\Migration\BigIntMigration;
* Auto-generated migration step: Please modify to your needs!
*/
class Version13000Date20170926101637 extends BigIntMigration {
/**
* @return array Returns an array with the following structure
* ['table1' => ['column1', 'column2'], ...]

View File

@ -35,7 +35,6 @@ use OCP\Migration\SimpleMigrationStep;
* Auto-generated migration step: Please modify to your needs!
*/
class Version14000Date20180404140050 extends SimpleMigrationStep {
/** @var IDBConnection */
private $connection;

View File

@ -27,7 +27,6 @@ use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
class Version14000Date20180516101403 extends SimpleMigrationStep {
/**
* @param IOutput $output
* @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`

View File

@ -32,7 +32,6 @@ use OCP\Migration\SimpleMigrationStep;
*/
class Version14000Date20180712153140 extends SimpleMigrationStep {
public function changeSchema(\OCP\Migration\IOutput $output, \Closure $schemaClosure, array $options) {
/** @var ISchemaWrapper $schema */
$schema = $schemaClosure();

View File

@ -32,7 +32,6 @@ use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
class Version15000Date20180926101451 extends SimpleMigrationStep {
/**
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`

View File

@ -32,7 +32,6 @@ use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
class Version15000Date20181015062942 extends SimpleMigrationStep {
/**
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`

View File

@ -32,7 +32,6 @@ use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
class Version15000Date20181029084625 extends SimpleMigrationStep {
/**
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`

View File

@ -35,8 +35,6 @@ use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
class Version16000Date20190207141427 extends SimpleMigrationStep {
/**
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`

View File

@ -33,7 +33,6 @@ use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
class Version16000Date20190427105638 extends SimpleMigrationStep {
/** @var IDBConnection */
private $connection;

View File

@ -35,7 +35,6 @@ use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
class Version16000Date20190428150708 extends SimpleMigrationStep {
/**
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`

View File

@ -36,7 +36,6 @@ use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
class Version17000Date20190514105811 extends SimpleMigrationStep {
/**
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`

View File

@ -36,7 +36,6 @@ use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
class Version18000Date20190920085628 extends SimpleMigrationStep {
/** @var IDBConnection */
protected $connection;

View File

@ -36,7 +36,6 @@ use OCP\Migration\SimpleMigrationStep;
use OCP\Migration\IOutput;
class Version18000Date20191014105105 extends SimpleMigrationStep {
/** @var IDBConnection */
protected $connection;

View File

@ -32,7 +32,6 @@ use OCP\Migration\SimpleMigrationStep;
use OCP\Migration\IOutput;
class Version18000Date20191204114856 extends SimpleMigrationStep {
/** @var IDBConnection */
protected $connection;

View File

@ -35,7 +35,6 @@ use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
class Version20000Date20201109081918 extends SimpleMigrationStep {
/** @var IDBConnection */
protected $connection;

View File

@ -31,7 +31,6 @@ use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
class Version20000Date20201109081919 extends SimpleMigrationStep {
/**
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`

View File

@ -30,7 +30,6 @@ use OCP\Migration\SimpleMigrationStep;
use OCP\Migration\IOutput;
class Version23000Date20210721100600 extends SimpleMigrationStep {
/**
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`

View File

@ -29,7 +29,6 @@ namespace OC\Core\Migrations;
use OCP\Migration\BigIntMigration;
class Version23000Date20211213203940 extends BigIntMigration {
/**
* @return array Returns an array with the following structure
* ['table1' => ['column1', 'column2'], ...]

View File

@ -37,7 +37,6 @@ use OCP\Migration\SimpleMigrationStep;
*
*/
class Version24000Date20211210141942 extends SimpleMigrationStep {
/** @var IDBConnection */
protected $connection;

View File

@ -33,7 +33,6 @@ use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
class Version25000Date20220602190540 extends SimpleMigrationStep {
/**
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`

View File

@ -33,7 +33,6 @@ use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
class Version25000Date20220905140840 extends SimpleMigrationStep {
/**
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`

View File

@ -112,10 +112,10 @@ if (\OCP\Util::needUpgrade()) {
$logger = \OC::$server->get(\Psr\Log\LoggerInterface::class);
$config = \OC::$server->getConfig();
$updater = new \OC\Updater(
$config,
\OC::$server->getIntegrityCodeChecker(),
$logger,
\OC::$server->query(\OC\Installer::class)
$config,
\OC::$server->getIntegrityCodeChecker(),
$logger,
\OC::$server->query(\OC\Installer::class)
);
$incompatibleApps = [];

View File

@ -55,19 +55,19 @@ $application->add(new OC\Core\Command\Status(\OC::$server->get(\OCP\IConfig::cla
$application->add(new OC\Core\Command\Check(\OC::$server->getSystemConfig()));
$application->add(new OC\Core\Command\L10n\CreateJs());
$application->add(new \OC\Core\Command\Integrity\SignApp(
\OC::$server->getIntegrityCodeChecker(),
new \OC\IntegrityCheck\Helpers\FileAccessHelper(),
\OC::$server->getURLGenerator()
\OC::$server->getIntegrityCodeChecker(),
new \OC\IntegrityCheck\Helpers\FileAccessHelper(),
\OC::$server->getURLGenerator()
));
$application->add(new \OC\Core\Command\Integrity\SignCore(
\OC::$server->getIntegrityCodeChecker(),
new \OC\IntegrityCheck\Helpers\FileAccessHelper()
\OC::$server->getIntegrityCodeChecker(),
new \OC\IntegrityCheck\Helpers\FileAccessHelper()
));
$application->add(new \OC\Core\Command\Integrity\CheckApp(
\OC::$server->getIntegrityCodeChecker()
\OC::$server->getIntegrityCodeChecker()
));
$application->add(new \OC\Core\Command\Integrity\CheckCore(
\OC::$server->getIntegrityCodeChecker()
\OC::$server->getIntegrityCodeChecker()
));
@ -142,21 +142,21 @@ if (\OC::$server->getConfig()->getSystemValue('installed', false)) {
\OC::$server->getConfig()
);
$application->add(new OC\Core\Command\Encryption\ChangeKeyStorageRoot(
$view,
\OC::$server->getUserManager(),
\OC::$server->getConfig(),
$util,
new \Symfony\Component\Console\Helper\QuestionHelper()
)
$view,
\OC::$server->getUserManager(),
\OC::$server->getConfig(),
$util,
new \Symfony\Component\Console\Helper\QuestionHelper()
)
);
$application->add(new OC\Core\Command\Encryption\ShowKeyStorageRoot($util));
$application->add(new OC\Core\Command\Encryption\MigrateKeyStorage(
$view,
\OC::$server->getUserManager(),
\OC::$server->getConfig(),
$util,
\OC::$server->getCrypto()
)
$view,
\OC::$server->getUserManager(),
\OC::$server->getConfig(),
$util,
\OC::$server->getCrypto()
)
);
$application->add(new OC\Core\Command\Maintenance\DataFingerprint(\OC::$server->getConfig(), new \OC\AppFramework\Utility\TimeFactory()));

View File

@ -12,6 +12,6 @@ if (!isset($_)) {//standalone page is not supported anymore - redirect to /
<div class="guest-box">
<h2><?php p($l->t('Access forbidden')); ?></h2>
<p class='hint'><?php if (isset($_['message'])) {
p($_['message']);
}?></p>
p($_['message']);
}?></p>
</ul>

View File

@ -9,8 +9,8 @@
<title>
<?php
p(!empty($_['pageTitle']) ? $_['pageTitle'] . ' ' : '');
p($theme->getTitle());
?>
p($theme->getTitle());
?>
</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<?php if ($theme->getiTunesAppId() !== '') { ?>

View File

@ -2,10 +2,10 @@
<div id="nojavascript">
<div>
<?php print_unescaped(str_replace(
['{linkstart}', '{linkend}'],
['<a href="https://www.enable-javascript.com/" target="_blank" rel="noreferrer noopener">', '</a>'],
$l->t('This application requires JavaScript for correct operation. Please {linkstart}enable JavaScript{linkend} and reload the page.')
)); ?>
['{linkstart}', '{linkend}'],
['<a href="https://www.enable-javascript.com/" target="_blank" rel="noreferrer noopener">', '</a>'],
$l->t('This application requires JavaScript for correct operation. Please {linkstart}enable JavaScript{linkend} and reload the page.')
)); ?>
</div>
</div>
</noscript>

View File

@ -5,8 +5,8 @@
<title>
<?php
p(!empty($_['application'])?$_['application'].' - ':'');
p($theme->getTitle());
?>
p($theme->getTitle());
?>
</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<?php if ($theme->getiTunesAppId() !== '') { ?>
@ -55,10 +55,10 @@
<div class="header-right">
<?php
/** @var \OCP\AppFramework\Http\Template\PublicTemplateResponse $template */
if (isset($template) && $template->getActionCount() !== 0) {
$primary = $template->getPrimaryAction();
$others = $template->getOtherActions(); ?>
/** @var \OCP\AppFramework\Http\Template\PublicTemplateResponse $template */
if (isset($template) && $template->getActionCount() !== 0) {
$primary = $template->getPrimaryAction();
$others = $template->getOtherActions(); ?>
<span id="header-primary-action" class="<?php if ($template->getActionCount() === 1) {
p($primary->getIcon());
} ?>">
@ -76,13 +76,13 @@
foreach ($others as $action) {
print_unescaped($action->render());
}
?>
?>
</ul>
</div>
</div>
<?php } ?>
<?php
} ?>
} ?>
</div>
</header>
<main id="content" class="app-<?php p($_['appid']) ?>">
@ -99,15 +99,15 @@
<footer>
<p><?php print_unescaped($theme->getLongFooter()); ?></p>
<?php
if ($_['showSimpleSignUpLink']) {
?>
if ($_['showSimpleSignUpLink']) {
?>
<p>
<a href="https://nextcloud.com/signup/" target="_blank" rel="noreferrer noopener">
<?php p($l->t('Get your own free account')); ?>
</a>
</p>
<?php
}
}
?>
</footer>
<?php } ?>

View File

@ -19,9 +19,9 @@ $getUserAvatar = static function (int $size) use ($_): string {
<title>
<?php
p(!empty($_['pageTitle'])?$_['pageTitle'].' - ':'');
p(!empty($_['application'])?$_['application'].' - ':'');
p($theme->getTitle());
?>
p(!empty($_['application'])?$_['application'].' - ':'');
p($theme->getTitle());
?>
</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
@ -43,8 +43,8 @@ $getUserAvatar = static function (int $size) use ($_): string {
<?php print_unescaped($_['headers']); ?>
</head>
<body id="<?php p($_['bodyid']);?>" <?php foreach ($_['enabledThemes'] as $themeId) {
p("data-theme-$themeId ");
}?> data-themes=<?php p(join(',', $_['enabledThemes'])) ?>>
p("data-theme-$themeId ");
}?> data-themes=<?php p(join(',', $_['enabledThemes'])) ?>>
<?php include 'layout.noscript.warning.php'; ?>
<?php foreach ($_['initialStates'] as $app => $initialState) { ?>
@ -75,19 +75,19 @@ $getUserAvatar = static function (int $size) use ($_): string {
aria-label="<?php p($l->t('Open settings menu'));?>"
aria-haspopup="true" aria-controls="expanddiv" aria-expanded="false">
<div id="avatardiv-menu" class="avatardiv<?php if ($_['userAvatarSet']) {
print_unescaped(' avatardiv-shown');
} else {
print_unescaped('" style="display: none');
} ?>"
print_unescaped(' avatardiv-shown');
} else {
print_unescaped('" style="display: none');
} ?>"
data-user="<?php p($_['user_uid']); ?>"
data-displayname="<?php p($_['user_displayname']); ?>"
<?php
if ($_['userAvatarSet']) {
$avatar32 = $getUserAvatar(32); ?> data-avatar="<?php p($avatar32); ?>"
if ($_['userAvatarSet']) {
$avatar32 = $getUserAvatar(32); ?> data-avatar="<?php p($avatar32); ?>"
<?php
} ?>>
} ?>>
<?php
if ($_['userAvatarSet']) {?>
if ($_['userAvatarSet']) {?>
<img alt="" width="32" height="32"
src="<?php p($avatar32);?>"
srcset="<?php p($getUserAvatar(64));?> 2x, <?php p($getUserAvatar(128));?> 4x"

View File

@ -4,7 +4,7 @@
\OCP\Util::addStyle('core', 'guest');
\OCP\Util::addStyle('core', 'publicshareauth');
\OCP\Util::addScript('core', 'publicshareauth');
?>
?>
<div class="guest-box">
<!-- password prompt form. It should be hidden when we show the email prompt form -->

View File

@ -37,18 +37,18 @@ $noProviders = empty($_['providers']);
<li>
<a class="two-factor-provider"
href="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.showChallenge',
[
'challengeProviderId' => $provider->getId(),
'redirect_url' => $_['redirect_url'],
]
)) ?>">
[
'challengeProviderId' => $provider->getId(),
'redirect_url' => $_['redirect_url'],
]
)) ?>">
<?php
if ($provider instanceof \OCP\Authentication\TwoFactorAuth\IProvidesIcons) {
$icon = $provider->getLightIcon();
} else {
$icon = image_path('core', 'actions/password-white.svg');
}
?>
?>
<img src="<?php p($icon) ?>" alt="" />
<div>
<h3><?php p($provider->getDisplayName()) ?></h3>

View File

@ -31,17 +31,17 @@ declare(strict_types=1);
<li>
<a class="two-factor-provider"
href="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.setupProvider',
[
'providerId' => $provider->getId(),
]
)) ?>">
[
'providerId' => $provider->getId(),
]
)) ?>">
<?php
if ($provider instanceof \OCP\Authentication\TwoFactorAuth\IProvidesIcons) {
$icon = $provider->getLightIcon();
} else {
$icon = image_path('core', 'actions/password-white.svg');
}
?>
?>
<img src="<?php p($icon) ?>" alt="" />
<div>
<h3><?php p($provider->getDisplayName()) ?></h3>

View File

@ -3,12 +3,12 @@
<h2 class="title"><?php p($l->t('Update needed')) ?></h2>
<div class="text-left">
<?php if ($_['tooBig']) {
p($l->t('Please use the command line updater because you have a big instance with more than 50 users.'));
} else {
p($l->t('Please use the command line updater because automatic updating is disabled in the config.php.'));
} ?><br><br>
p($l->t('Please use the command line updater because you have a big instance with more than 50 users.'));
} else {
p($l->t('Please use the command line updater because automatic updating is disabled in the config.php.'));
} ?><br><br>
<?php
print_unescaped($l->t('For help, see the <a target="_blank" rel="noreferrer noopener" href="%s">documentation</a>.', [link_to_docs('admin-cli-upgrade')])); ?>
print_unescaped($l->t('For help, see the <a target="_blank" rel="noreferrer noopener" href="%s">documentation</a>.', [link_to_docs('admin-cli-upgrade')])); ?>
</div>
</div>

View File

@ -32,7 +32,6 @@ use OCP\Accounts\IAccountManager;
use OCP\Accounts\IAccountProperty;
class AccountProperty implements IAccountProperty {
/** @var string */
private $name;
/** @var string */

View File

@ -32,7 +32,6 @@ use OCP\Accounts\IAccountProperty;
use OCP\Accounts\IAccountPropertyCollection;
class AccountPropertyCollection implements IAccountPropertyCollection {
/** @var string */
protected $collectionName = '';

View File

@ -36,7 +36,6 @@ use Psr\Log\LoggerInterface;
* @template-implements IEventListener<UserChangedEvent>
*/
class Hooks implements IEventListener {
/** @var IAccountManager */
private $accountManager;
/** @var LoggerInterface */

View File

@ -29,7 +29,6 @@ use OCP\Activity\IEventMerger;
use OCP\IL10N;
class EventMerger implements IEventMerger {
/** @var IL10N */
protected $l10n;

View File

@ -52,7 +52,6 @@ use Psr\Log\LoggerInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
class AppManager implements IAppManager {
/**
* Apps with these types can not be enabled for certain groups only
* @var string[]

View File

@ -24,7 +24,6 @@
namespace OC\App\AppStore\Bundles;
class EducationBundle extends Bundle {
/**
* {@inheritDoc}
*/

View File

@ -24,7 +24,6 @@
namespace OC\App\AppStore\Bundles;
class EnterpriseBundle extends Bundle {
/**
* {@inheritDoc}
*/

View File

@ -25,7 +25,6 @@
namespace OC\App\AppStore\Bundles;
class GroupwareBundle extends Bundle {
/**
* {@inheritDoc}
*/

View File

@ -24,7 +24,6 @@
namespace OC\App\AppStore\Bundles;
class SocialSharingBundle extends Bundle {
/**
* {@inheritDoc}
*/

View File

@ -39,7 +39,6 @@ use OCP\Support\Subscription\IRegistry;
use Psr\Log\LoggerInterface;
class AppFetcher extends Fetcher {
/** @var CompareVersion */
private $compareVersion;
@ -117,15 +116,15 @@ class AppFetcher extends Fetcher {
$minPhpVersion = $phpVersion->getMinimumVersion();
$maxPhpVersion = $phpVersion->getMaximumVersion();
$minPhpFulfilled = $minPhpVersion === '' || $this->compareVersion->isCompatible(
PHP_VERSION,
$minPhpVersion,
'>='
);
PHP_VERSION,
$minPhpVersion,
'>='
);
$maxPhpFulfilled = $maxPhpVersion === '' || $this->compareVersion->isCompatible(
PHP_VERSION,
$maxPhpVersion,
'<='
);
PHP_VERSION,
$maxPhpVersion,
'<='
);
$isPhpCompatible = $minPhpFulfilled && $maxPhpFulfilled;
}

View File

@ -167,10 +167,8 @@ abstract class Fetcher {
// Always get latests apps info if $allowUnstable
if (!$allowUnstable && is_array($jsonBlob)) {
// No caching when the version has been updated
if (isset($jsonBlob['ncversion']) && $jsonBlob['ncversion'] === $this->getVersion()) {
// If the timestamp is older than 3600 seconds request the files new
if ((int)$jsonBlob['timestamp'] > ($this->timeFactory->getTime() - self::INVALIDATE_AFTER_SECONDS)) {
return $jsonBlob['data'];

View File

@ -33,7 +33,6 @@ namespace OC\App;
use OCP\IL10N;
class DependencyAnalyzer {
/** @var Platform */
private $platform;
/** @var \OCP\IL10N */

View File

@ -267,7 +267,7 @@ class InfoParser {
} else {
$array[$element] = $data;
}
// Just a value
// Just a value
} else {
if ($totalElement > 1) {
$array[$element][] = $this->xmlToArray($node);

View File

@ -42,7 +42,6 @@ use OCP\IConfig;
* database.
*/
class AppConfig implements IAppConfig {
/** @var array[] */
protected $sensitiveValues = [
'circles' => [
@ -285,7 +284,6 @@ class AppConfig implements IAppConfig {
* > Large objects (LOBs) are not supported in comparison conditions.
*/
if (!($this->conn instanceof OracleConnection)) {
/*
* Only update the value when it is not the same
* Note that NULL requires some special handling. Since comparing

View File

@ -53,7 +53,6 @@ use OCP\IRequest;
* Handles all the dependency injection, controllers and output flow
*/
class App {
/** @var string[] */
private static $nameSpaceCache = [];

View File

@ -29,7 +29,6 @@ namespace OC\AppFramework\Bootstrap;
* @psalm-immutable
*/
abstract class ARegistration {
/** @var string */
private $appId;

View File

@ -31,7 +31,6 @@ use OCP\AppFramework\IAppContainer;
use OCP\IServerContainer;
class BootContext implements IBootContext {
/** @var IAppContainer */
private $appContainer;

View File

@ -46,7 +46,6 @@ use Psr\Log\LoggerInterface;
use Throwable;
class Coordinator {
/** @var IServerContainer */
private $serverContainer;

View File

@ -30,7 +30,6 @@ namespace OC\AppFramework\Bootstrap;
* @template-extends ServiceRegistration<\OCP\EventDispatcher\IEventListener>
*/
class EventListenerRegistration extends ServiceRegistration {
/** @var string */
private $event;

View File

@ -33,7 +33,6 @@ use ReflectionParameter;
use function array_map;
class FunctionInjector {
/** @var ContainerInterface */
private $container;

View File

@ -29,7 +29,6 @@ namespace OC\AppFramework\Bootstrap;
* @psalm-immutable
*/
final class ParameterRegistration extends ARegistration {
/** @var string */
private $name;

View File

@ -30,7 +30,6 @@ namespace OC\AppFramework\Bootstrap;
* @template-extends ServiceRegistration<\OCP\Preview\IProviderV2>
*/
class PreviewProviderRegistration extends ServiceRegistration {
/** @var string */
private $mimeTypeRegex;

View File

@ -58,7 +58,6 @@ use Psr\Log\LoggerInterface;
use Throwable;
class RegistrationContext {
/** @var ServiceRegistration<ICapability>[] */
private $capabilities = [];

View File

@ -29,7 +29,6 @@ namespace OC\AppFramework\Bootstrap;
* @psalm-immutable
*/
class ServiceAliasRegistration extends ARegistration {
/**
* @var string
* @psalm-var string|class-string

View File

@ -29,7 +29,6 @@ namespace OC\AppFramework\Bootstrap;
* @psalm-immutable
*/
class ServiceFactoryRegistration extends ARegistration {
/**
* @var string
* @psalm-var string|class-string

View File

@ -49,7 +49,6 @@ use Psr\Log\LoggerInterface;
* Class to dispatch the request to the middleware dispatcher
*/
class Dispatcher {
/** @var MiddlewareDispatcher */
private $middlewareDispatcher;
@ -169,7 +168,7 @@ class Dispatcher {
} catch (\Throwable $throwable) {
$exception = new \Exception($throwable->getMessage() . ' in file \'' . $throwable->getFile() . '\' line ' . $throwable->getLine(), $throwable->getCode(), $throwable);
$response = $this->middlewareDispatcher->afterException(
$controller, $methodName, $exception);
$controller, $methodName, $exception);
}
$response = $this->middlewareDispatcher->afterController(
@ -202,7 +201,6 @@ class Dispatcher {
$types = ['int', 'integer', 'bool', 'boolean', 'float', 'double'];
foreach ($this->reflector->getParameters() as $param => $default) {
// try to get the parameter from the request object and cast
// it to the type annotated in the @param annotation
$value = $this->request->getParam($param, $default);
@ -234,7 +232,6 @@ class Dispatcher {
// format response
if ($response instanceof DataResponse || !($response instanceof Response)) {
// get format from the url format or request format parameter
$format = $this->request->getParam('format');

View File

@ -429,7 +429,7 @@ class Request implements \ArrayAccess, \Countable, IRequest {
$this->items['post'] = $params;
}
}
// Handle application/x-www-form-urlencoded for methods other than GET
// Handle application/x-www-form-urlencoded for methods other than GET
// or post correctly
} elseif ($this->method !== 'GET'
&& $this->method !== 'POST'

View File

@ -32,7 +32,6 @@ use OCP\ILogger;
* @deprecated
*/
class Logger implements ILogger {
/** @var ILogger */
private $logger;

View File

@ -35,7 +35,6 @@ use OCP\AppFramework\Middleware;
use OCP\IRequest;
class CompressionMiddleware extends Middleware {
/** @var bool */
private $useGZip;

View File

@ -39,7 +39,6 @@ use OCP\AppFramework\Middleware;
* This class is used to store and run all the middleware in correct order
*/
class MiddlewareDispatcher {
/**
* @var array array containing all the middlewares
*/

View File

@ -39,7 +39,6 @@ use OCP\AppFramework\OCSController;
use OCP\IRequest;
class OCSMiddleware extends Middleware {
/** @var IRequest */
private $request;

View File

@ -35,7 +35,6 @@ use OCP\IRequest;
use OCP\ISession;
class PublicShareMiddleware extends Middleware {
/** @var IRequest */
private $request;

View File

@ -118,7 +118,6 @@ class CORSMiddleware extends Middleware {
if (isset($this->request->server['HTTP_ORIGIN']) &&
$this->reflector->hasAnnotation('CORS')) {
// allow credentials headers must not be true or CSRF is possible
// otherwise
foreach ($response->getHeaders() as $header => $value) {

View File

@ -36,7 +36,6 @@ use OCP\AppFramework\Http\Response;
use OCP\AppFramework\Middleware;
class CSPMiddleware extends Middleware {
/** @var ContentSecurityPolicyManager */
private $contentSecurityPolicyManager;
/** @var ContentSecurityPolicyNonceManager */

View File

@ -33,7 +33,6 @@ use OCP\AppFramework\Http\Response;
use OCP\AppFramework\Middleware;
class FeaturePolicyMiddleware extends Middleware {
/** @var FeaturePolicyManager */
private $policyManager;

View File

@ -31,7 +31,6 @@ use OCP\AppFramework\Http\Response;
use OCP\AppFramework\Middleware;
class SameSiteCookieMiddleware extends Middleware {
/** @var Request */
private $request;

View File

@ -137,7 +137,6 @@ class SecurityMiddleware extends Middleware {
* @suppress PhanUndeclaredClassConstant
*/
public function beforeController($controller, $methodName) {
// this will set the current navigation entry of the app, use this only
// for normal HTML requests and not for AJAX requests
$this->navigationManager->setActiveEntry($this->appName);
@ -207,11 +206,11 @@ class SecurityMiddleware extends Middleware {
* This allows oauth apps (e.g. moodle) to use the OCS endpoints
*/
if (!$this->request->passesCSRFCheck() && !(
$controller instanceof OCSController && (
$this->request->getHeader('OCS-APIREQUEST') === 'true' ||
strpos($this->request->getHeader('Authorization'), 'Bearer ') === 0
)
)) {
$controller instanceof OCSController && (
$this->request->getHeader('OCS-APIREQUEST') === 'true' ||
strpos($this->request->getHeader('Authorization'), 'Bearer ') === 0
)
)) {
throw new CrossSiteRequestForgeryException();
}
}

View File

@ -32,7 +32,6 @@ use OCP\AppFramework\Middleware;
use OCP\ISession;
class SessionMiddleware extends Middleware {
/** @var ControllerMethodReflector */
private $reflector;

View File

@ -79,7 +79,6 @@ class RouteConfig {
* The routes and resource will be registered to the \OCP\Route\IRouter
*/
public function register() {
// parse simple
$this->processIndexRoutes($this->routes);

View File

@ -30,7 +30,6 @@ use Psr\Log\LoggerInterface;
use function array_merge;
class ScopedPsrLogger implements LoggerInterface {
/** @var LoggerInterface */
private $inner;

View File

@ -30,7 +30,6 @@ use OCP\AppFramework\Services\IAppConfig;
use OCP\IConfig;
class AppConfig implements IAppConfig {
/** @var IConfig */
private $config;

View File

@ -45,7 +45,6 @@ use function class_exists;
* SimpleContainer is a simple implementation of a container on basis of Pimple
*/
class SimpleContainer implements ArrayAccess, ContainerInterface, IContainer {
/** @var Container */
private $container;

View File

@ -33,8 +33,6 @@ use OCP\AppFramework\Utility\ITimeFactory;
* Needed to mock calls to time()
*/
class TimeFactory implements ITimeFactory {
/**
* @return int the result of a call to time()
*/

View File

@ -29,7 +29,6 @@ use OC\Authentication\Token\IToken;
use OCP\EventDispatcher\Event;
abstract class ARemoteWipeEvent extends Event {
/** @var IToken */
private $token;

Some files were not shown because too many files have changed in this diff Show More