Skip to content

Commit

Permalink
Merge pull request #36271 from nextcloud/fix/fix-codestyle
Browse files Browse the repository at this point in the history
Fix codestyle using codesniffer
  • Loading branch information
come-nc committed Jan 20, 2023
2 parents 473c546 + f5c361c commit 3f231d6
Show file tree
Hide file tree
Showing 887 changed files with 430 additions and 1,320 deletions.
1 change: 0 additions & 1 deletion build/OCPSinceChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
* this class checks all methods for the presence of the @since tag
*/
class SinceTagCheckVisitor extends \PhpParser\NodeVisitorAbstract {

/** @var string */
protected $namespace = '';
/** @var string */
Expand Down
1 change: 0 additions & 1 deletion build/integration/features/bootstrap/Avatar.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
require __DIR__ . '/../../vendor/autoload.php';

trait Avatar {

/** @var string **/
private $lastAvatar;

Expand Down
1 change: 0 additions & 1 deletion build/integration/features/bootstrap/BasicStructure.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion build/integration/features/bootstrap/ContactsMenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
use PHPUnit\Framework\Assert;

trait ContactsMenu {

// BasicStructure trait is expected to be used in the class that uses this
// trait.

Expand Down
1 change: 0 additions & 1 deletion build/integration/features/bootstrap/Download.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
require __DIR__ . '/../../vendor/autoload.php';

trait Download {

/** @var string **/
private $downloadedFile;

Expand Down
1 change: 0 additions & 1 deletion build/integration/features/bootstrap/Mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
*
*/
trait Mail {

// CommandLine trait is expected to be used in the class that uses this
// trait.

Expand Down
1 change: 0 additions & 1 deletion build/integration/features/bootstrap/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
use PHPUnit\Framework\Assert;

trait Search {

// BasicStructure trait is expected to be used in the class that uses this
// trait.

Expand Down
1 change: 0 additions & 1 deletion build/integration/features/bootstrap/TalkContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
use Behat\Behat\Context\Context;

class TalkContext implements Context {

/**
* @BeforeFeature @Talk
* @BeforeScenario @Talk
Expand Down
1 change: 0 additions & 1 deletion build/integration/features/bootstrap/Trashbin.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
* Trashbin functions
*/
trait Trashbin {

// WebDav trait is expected to be used in the class that uses this trait.

/**
Expand Down
4 changes: 2 additions & 2 deletions core/Command/App/ListApps.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ protected function writeAppList(InputInterface $input, OutputInterface $output,

$output->writeln('Disabled:');
parent::writeArrayInOutputFormat($input, $output, $items['disabled']);
break;
break;

default:
parent::writeArrayInOutputFormat($input, $output, $items);
break;
break;
}
}

Expand Down
4 changes: 2 additions & 2 deletions core/Command/Config/ListConfigs.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$configs = [
'system' => $this->getSystemConfigs($noSensitiveValues),
];
break;
break;

case 'all':
$apps = $this->appConfig->getApps();
Expand All @@ -88,7 +88,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
foreach ($apps as $appName) {
$configs['apps'][$appName] = $this->getAppConfigs($appName, $noSensitiveValues);
}
break;
break;

default:
$configs = [
Expand Down
1 change: 0 additions & 1 deletion core/Command/Maintenance/Install.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ protected function configure() {
}

protected function execute(InputInterface $input, OutputInterface $output): int {

// validate the environment
$server = \OC::$server;
$setupHelper = new Setup(
Expand Down
8 changes: 4 additions & 4 deletions core/Command/Upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int

$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 */
Expand Down
16 changes: 8 additions & 8 deletions core/Controller/AvatarController.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,16 +308,16 @@ public function getTmpAvatar() {
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);
Expand All @@ -331,20 +331,20 @@ public function getTmpAvatar() {
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');
if (is_null($tmpAvatar)) {
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();
Expand All @@ -358,7 +358,7 @@ public function postCroppedAvatar(?array $crop = null): JSONResponse {
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);
Expand Down
1 change: 0 additions & 1 deletion core/Controller/WalledGardenController.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
use OCP\AppFramework\Http\Response;

class WalledGardenController extends Controller {

/**
* @PublicPage
* @NoCSRFRequired
Expand Down
1 change: 0 additions & 1 deletion core/Controller/WellKnownController.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
use OCP\IRequest;

class WellKnownController extends Controller {

/** @var RequestManager */
private $requestManager;

Expand Down
1 change: 0 additions & 1 deletion core/Controller/WhatsNewController.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
use OCP\L10N\IFactory;

class WhatsNewController extends OCSController {

/** @var IConfig */
protected $config;
/** @var IUserSession */
Expand Down
1 change: 0 additions & 1 deletion core/Controller/WipeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
use OCP\IRequest;

class WipeController extends Controller {

/** @var RemoteWipe */
private $remoteWipe;

Expand Down
1 change: 0 additions & 1 deletion core/Data/LoginFlowV2Tokens.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
namespace OC\Core\Data;

class LoginFlowV2Tokens {

/** @var string */
private $loginToken;
/** @var string */
Expand Down
1 change: 0 additions & 1 deletion core/Db/ProfileConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
* @method void setConfig(string $config)
*/
class ProfileConfig extends Entity implements JsonSerializable {

/**
* Visible to users, guests, and public access
*
Expand Down
1 change: 0 additions & 1 deletion core/Middleware/TwoFactorMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
use OCP\IUser;

class TwoFactorMiddleware extends Middleware {

/** @var Manager */
private $twoFactorManager;

Expand Down
1 change: 0 additions & 1 deletion core/Migrations/Version13000Date20170718121200.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
use OCP\Migration\SimpleMigrationStep;

class Version13000Date20170718121200 extends SimpleMigrationStep {

/** @var IDBConnection */
private $connection;

Expand Down
1 change: 0 additions & 1 deletion core/Migrations/Version13000Date20170814074715.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
use OCP\Migration\SimpleMigrationStep;

class Version13000Date20170814074715 extends SimpleMigrationStep {

/**
* @param IOutput $output
* @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
Expand Down
1 change: 0 additions & 1 deletion core/Migrations/Version13000Date20170919121250.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
* Auto-generated migration step: Please modify to your needs!
*/
class Version13000Date20170919121250 extends SimpleMigrationStep {

/**
* @param IOutput $output
* @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
Expand Down
1 change: 0 additions & 1 deletion core/Migrations/Version13000Date20170926101637.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
* 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'], ...]
Expand Down
1 change: 0 additions & 1 deletion core/Migrations/Version14000Date20180404140050.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
* Auto-generated migration step: Please modify to your needs!
*/
class Version14000Date20180404140050 extends SimpleMigrationStep {

/** @var IDBConnection */
private $connection;

Expand Down
1 change: 0 additions & 1 deletion core/Migrations/Version14000Date20180516101403.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
use OCP\Migration\SimpleMigrationStep;

class Version14000Date20180516101403 extends SimpleMigrationStep {

/**
* @param IOutput $output
* @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
Expand Down
1 change: 0 additions & 1 deletion core/Migrations/Version14000Date20180712153140.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
*/
class Version14000Date20180712153140 extends SimpleMigrationStep {
public function changeSchema(\OCP\Migration\IOutput $output, \Closure $schemaClosure, array $options) {

/** @var ISchemaWrapper $schema */
$schema = $schemaClosure();

Expand Down
1 change: 0 additions & 1 deletion core/Migrations/Version15000Date20180926101451.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
use OCP\Migration\SimpleMigrationStep;

class Version15000Date20180926101451 extends SimpleMigrationStep {

/**
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
Expand Down
1 change: 0 additions & 1 deletion core/Migrations/Version15000Date20181015062942.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
use OCP\Migration\SimpleMigrationStep;

class Version15000Date20181015062942 extends SimpleMigrationStep {

/**
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
Expand Down
1 change: 0 additions & 1 deletion core/Migrations/Version15000Date20181029084625.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
use OCP\Migration\SimpleMigrationStep;

class Version15000Date20181029084625 extends SimpleMigrationStep {

/**
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
Expand Down
2 changes: 0 additions & 2 deletions core/Migrations/Version16000Date20190207141427.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
use OCP\Migration\SimpleMigrationStep;

class Version16000Date20190207141427 extends SimpleMigrationStep {


/**
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
Expand Down
1 change: 0 additions & 1 deletion core/Migrations/Version16000Date20190427105638.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
use OCP\Migration\SimpleMigrationStep;

class Version16000Date20190427105638 extends SimpleMigrationStep {

/** @var IDBConnection */
private $connection;

Expand Down
1 change: 0 additions & 1 deletion core/Migrations/Version16000Date20190428150708.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
use OCP\Migration\SimpleMigrationStep;

class Version16000Date20190428150708 extends SimpleMigrationStep {

/**
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
Expand Down
1 change: 0 additions & 1 deletion core/Migrations/Version17000Date20190514105811.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
use OCP\Migration\SimpleMigrationStep;

class Version17000Date20190514105811 extends SimpleMigrationStep {

/**
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
Expand Down
1 change: 0 additions & 1 deletion core/Migrations/Version18000Date20190920085628.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
use OCP\Migration\SimpleMigrationStep;

class Version18000Date20190920085628 extends SimpleMigrationStep {

/** @var IDBConnection */
protected $connection;

Expand Down
1 change: 0 additions & 1 deletion core/Migrations/Version18000Date20191014105105.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
use OCP\Migration\IOutput;

class Version18000Date20191014105105 extends SimpleMigrationStep {

/** @var IDBConnection */
protected $connection;

Expand Down
1 change: 0 additions & 1 deletion core/Migrations/Version18000Date20191204114856.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
use OCP\Migration\IOutput;

class Version18000Date20191204114856 extends SimpleMigrationStep {

/** @var IDBConnection */
protected $connection;

Expand Down
1 change: 0 additions & 1 deletion core/Migrations/Version20000Date20201109081918.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
use OCP\Migration\SimpleMigrationStep;

class Version20000Date20201109081918 extends SimpleMigrationStep {

/** @var IDBConnection */
protected $connection;

Expand Down
1 change: 0 additions & 1 deletion core/Migrations/Version20000Date20201109081919.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
use OCP\Migration\SimpleMigrationStep;

class Version20000Date20201109081919 extends SimpleMigrationStep {

/**
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
Expand Down
1 change: 0 additions & 1 deletion core/Migrations/Version23000Date20210721100600.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
use OCP\Migration\IOutput;

class Version23000Date20210721100600 extends SimpleMigrationStep {

/**
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
Expand Down

0 comments on commit 3f231d6

Please sign in to comment.