Passed
Push — master ( 970f39...e4f050 )
by Joas
15:13 queued 12s
created
apps/files_external/lib/Lib/Backend/Swift.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -33,29 +33,29 @@
 block discarded – undo
33 33
 use OCP\IL10N;
34 34
 
35 35
 class Swift extends Backend {
36
-	use LegacyDependencyCheckPolyfill;
36
+    use LegacyDependencyCheckPolyfill;
37 37
 
38
-	public function __construct(IL10N $l, OpenStackV2 $openstackAuth, Rackspace $rackspaceAuth) {
39
-		$this
40
-			->setIdentifier('swift')
41
-			->addIdentifierAlias('\OC\Files\Storage\Swift') // legacy compat
42
-			->setStorageClass('\OCA\Files_External\Lib\Storage\Swift')
43
-			->setText($l->t('OpenStack Object Storage'))
44
-			->addParameters([
45
-				(new DefinitionParameter('service_name', $l->t('Service name')))
46
-					->setFlag(DefinitionParameter::FLAG_OPTIONAL),
47
-				new DefinitionParameter('region', $l->t('Region')),
48
-				new DefinitionParameter('bucket', $l->t('Bucket')),
49
-				(new DefinitionParameter('timeout', $l->t('Request timeout (seconds)')))
50
-					->setFlag(DefinitionParameter::FLAG_OPTIONAL),
51
-			])
52
-			->addAuthScheme(AuthMechanism::SCHEME_OPENSTACK)
53
-			->setLegacyAuthMechanismCallback(function (array $params) use ($openstackAuth, $rackspaceAuth) {
54
-				if (isset($params['options']['key']) && $params['options']['key']) {
55
-					return $rackspaceAuth;
56
-				}
57
-				return $openstackAuth;
58
-			})
59
-		;
60
-	}
38
+    public function __construct(IL10N $l, OpenStackV2 $openstackAuth, Rackspace $rackspaceAuth) {
39
+        $this
40
+            ->setIdentifier('swift')
41
+            ->addIdentifierAlias('\OC\Files\Storage\Swift') // legacy compat
42
+            ->setStorageClass('\OCA\Files_External\Lib\Storage\Swift')
43
+            ->setText($l->t('OpenStack Object Storage'))
44
+            ->addParameters([
45
+                (new DefinitionParameter('service_name', $l->t('Service name')))
46
+                    ->setFlag(DefinitionParameter::FLAG_OPTIONAL),
47
+                new DefinitionParameter('region', $l->t('Region')),
48
+                new DefinitionParameter('bucket', $l->t('Bucket')),
49
+                (new DefinitionParameter('timeout', $l->t('Request timeout (seconds)')))
50
+                    ->setFlag(DefinitionParameter::FLAG_OPTIONAL),
51
+            ])
52
+            ->addAuthScheme(AuthMechanism::SCHEME_OPENSTACK)
53
+            ->setLegacyAuthMechanismCallback(function (array $params) use ($openstackAuth, $rackspaceAuth) {
54
+                if (isset($params['options']['key']) && $params['options']['key']) {
55
+                    return $rackspaceAuth;
56
+                }
57
+                return $openstackAuth;
58
+            })
59
+        ;
60
+    }
61 61
 }
Please login to merge, or discard this patch.
apps/files_external/lib/Lib/Auth/OpenStack/OpenStackV3.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -36,19 +36,19 @@
 block discarded – undo
36 36
  * OpenStack Keystone authentication
37 37
  */
38 38
 class OpenStackV3 extends AuthMechanism {
39
-	public function __construct(IL10N $l) {
40
-		$this
41
-			->setIdentifier('openstack::openstackv3')
42
-			->setScheme(self::SCHEME_OPENSTACK)
43
-			->setText($l->t('OpenStack v3'))
44
-			->addParameters([
45
-				new DefinitionParameter('user', $l->t('Username')),
46
-				new DefinitionParameter('domain', $l->t('Domain')),
47
-				(new DefinitionParameter('password', $l->t('Password')))
48
-					->setType(DefinitionParameter::VALUE_PASSWORD),
49
-				new DefinitionParameter('tenant', $l->t('Tenant name')),
50
-				new DefinitionParameter('url', $l->t('Identity endpoint URL'))
51
-			])
52
-		;
53
-	}
39
+    public function __construct(IL10N $l) {
40
+        $this
41
+            ->setIdentifier('openstack::openstackv3')
42
+            ->setScheme(self::SCHEME_OPENSTACK)
43
+            ->setText($l->t('OpenStack v3'))
44
+            ->addParameters([
45
+                new DefinitionParameter('user', $l->t('Username')),
46
+                new DefinitionParameter('domain', $l->t('Domain')),
47
+                (new DefinitionParameter('password', $l->t('Password')))
48
+                    ->setType(DefinitionParameter::VALUE_PASSWORD),
49
+                new DefinitionParameter('tenant', $l->t('Tenant name')),
50
+                new DefinitionParameter('url', $l->t('Identity endpoint URL'))
51
+            ])
52
+        ;
53
+    }
54 54
 }
Please login to merge, or discard this patch.
apps/files_versions/appinfo/routes.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -30,19 +30,19 @@
 block discarded – undo
30 30
 /** @var Application $application */
31 31
 $application = \OC::$server->query(Application::class);
32 32
 $application->registerRoutes($this, [
33
-	'routes' => [
34
-		[
35
-			'name' => 'Preview#getPreview',
36
-			'url' => '/preview',
37
-			'verb' => 'GET',
38
-		],
39
-	],
33
+    'routes' => [
34
+        [
35
+            'name' => 'Preview#getPreview',
36
+            'url' => '/preview',
37
+            'verb' => 'GET',
38
+        ],
39
+    ],
40 40
 ]);
41 41
 
42 42
 /** @var $this \OCP\Route\IRouter */
43 43
 $this->create('files_versions_download', 'apps/files_versions/download.php')
44
-	->actionInclude('files_versions/download.php');
44
+    ->actionInclude('files_versions/download.php');
45 45
 $this->create('files_versions_ajax_getVersions', 'apps/files_versions/ajax/getVersions.php')
46
-	->actionInclude('files_versions/ajax/getVersions.php');
46
+    ->actionInclude('files_versions/ajax/getVersions.php');
47 47
 $this->create('files_versions_ajax_rollbackVersion', 'apps/files_versions/ajax/rollbackVersion.php')
48
-	->actionInclude('files_versions/ajax/rollbackVersion.php');
48
+    ->actionInclude('files_versions/ajax/rollbackVersion.php');
Please login to merge, or discard this patch.
ocm-provider/index.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -29,12 +29,12 @@
 block discarded – undo
29 29
 $isEnabled = $server->getAppManager()->isEnabledForUser('cloud_federation_api');
30 30
 
31 31
 if ($isEnabled) {
32
-	// Make sure the routes are loaded
33
-	\OC_App::loadApp('cloud_federation_api');
34
-	$capabilities = new OCA\CloudFederationAPI\Capabilities($server->getURLGenerator());
35
-	header('Content-Type: application/json');
36
-	echo json_encode($capabilities->getCapabilities()['ocm']);
32
+    // Make sure the routes are loaded
33
+    \OC_App::loadApp('cloud_federation_api');
34
+    $capabilities = new OCA\CloudFederationAPI\Capabilities($server->getURLGenerator());
35
+    header('Content-Type: application/json');
36
+    echo json_encode($capabilities->getCapabilities()['ocm']);
37 37
 } else {
38
-	header($_SERVER["SERVER_PROTOCOL"]." 501 Not Implemented", true, 501);
39
-	exit("501 Not Implemented");
38
+    header($_SERVER["SERVER_PROTOCOL"]." 501 Not Implemented", true, 501);
39
+    exit("501 Not Implemented");
40 40
 }
Please login to merge, or discard this patch.
apps/user_ldap/lib/Mapping/GroupMapping.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,12 +29,12 @@
 block discarded – undo
29 29
  */
30 30
 class GroupMapping extends AbstractMapping {
31 31
 
32
-	/**
33
-	 * returns the DB table name which holds the mappings
34
-	 * @return string
35
-	 */
36
-	protected function getTableName(bool $includePrefix = true) {
37
-		$p = $includePrefix ? '*PREFIX*' : '';
38
-		return $p . 'ldap_group_mapping';
39
-	}
32
+    /**
33
+     * returns the DB table name which holds the mappings
34
+     * @return string
35
+     */
36
+    protected function getTableName(bool $includePrefix = true) {
37
+        $p = $includePrefix ? '*PREFIX*' : '';
38
+        return $p . 'ldap_group_mapping';
39
+    }
40 40
 }
Please login to merge, or discard this patch.
apps/dav/lib/Upload/UploadFile.php 1 patch
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -30,46 +30,46 @@
 block discarded – undo
30 30
 
31 31
 class UploadFile implements IFile {
32 32
 
33
-	/**  @var File */
34
-	private $file;
33
+    /**  @var File */
34
+    private $file;
35 35
 
36
-	public function __construct(File $file) {
37
-		$this->file = $file;
38
-	}
36
+    public function __construct(File $file) {
37
+        $this->file = $file;
38
+    }
39 39
 
40
-	public function put($data) {
41
-		return $this->file->put($data);
42
-	}
40
+    public function put($data) {
41
+        return $this->file->put($data);
42
+    }
43 43
 
44
-	public function get() {
45
-		return $this->file->get();
46
-	}
44
+    public function get() {
45
+        return $this->file->get();
46
+    }
47 47
 
48
-	public function getContentType() {
49
-		return $this->file->getContentType();
50
-	}
48
+    public function getContentType() {
49
+        return $this->file->getContentType();
50
+    }
51 51
 
52
-	public function getETag() {
53
-		return $this->file->getETag();
54
-	}
52
+    public function getETag() {
53
+        return $this->file->getETag();
54
+    }
55 55
 
56
-	public function getSize() {
57
-		return $this->file->getSize();
58
-	}
56
+    public function getSize() {
57
+        return $this->file->getSize();
58
+    }
59 59
 
60
-	public function delete() {
61
-		$this->file->delete();
62
-	}
60
+    public function delete() {
61
+        $this->file->delete();
62
+    }
63 63
 
64
-	public function getName() {
65
-		return $this->file->getName();
66
-	}
64
+    public function getName() {
65
+        return $this->file->getName();
66
+    }
67 67
 
68
-	public function setName($name) {
69
-		$this->file->setName($name);
70
-	}
68
+    public function setName($name) {
69
+        $this->file->setName($name);
70
+    }
71 71
 
72
-	public function getLastModified() {
73
-		return $this->file->getLastModified();
74
-	}
72
+    public function getLastModified() {
73
+        return $this->file->getLastModified();
74
+    }
75 75
 }
Please login to merge, or discard this patch.
apps/dav/lib/Upload/UploadFolder.php 1 patch
Indentation   +64 added lines, -64 removed lines patch added patch discarded remove patch
@@ -30,68 +30,68 @@
 block discarded – undo
30 30
 
31 31
 class UploadFolder implements ICollection {
32 32
 
33
-	/** @var Directory */
34
-	private $node;
35
-	/** @var CleanupService */
36
-	private $cleanupService;
37
-
38
-	public function __construct(Directory $node, CleanupService $cleanupService) {
39
-		$this->node = $node;
40
-		$this->cleanupService = $cleanupService;
41
-	}
42
-
43
-	public function createFile($name, $data = null) {
44
-		// TODO: verify name - should be a simple number
45
-		$this->node->createFile($name, $data);
46
-	}
47
-
48
-	public function createDirectory($name) {
49
-		throw new Forbidden('Permission denied to create file (filename ' . $name . ')');
50
-	}
51
-
52
-	public function getChild($name) {
53
-		if ($name === '.file') {
54
-			return new FutureFile($this->node, '.file');
55
-		}
56
-		return new UploadFile($this->node->getChild($name));
57
-	}
58
-
59
-	public function getChildren() {
60
-		$tmpChildren = $this->node->getChildren();
61
-
62
-		$children = [];
63
-		$children[] = new FutureFile($this->node, '.file');
64
-
65
-		foreach ($tmpChildren as $child) {
66
-			$children[] = new UploadFile($child);
67
-		}
68
-
69
-		return $children;
70
-	}
71
-
72
-	public function childExists($name) {
73
-		if ($name === '.file') {
74
-			return true;
75
-		}
76
-		return $this->node->childExists($name);
77
-	}
78
-
79
-	public function delete() {
80
-		$this->node->delete();
81
-
82
-		// Background cleanup job is not needed anymore
83
-		$this->cleanupService->removeJob($this->getName());
84
-	}
85
-
86
-	public function getName() {
87
-		return $this->node->getName();
88
-	}
89
-
90
-	public function setName($name) {
91
-		throw new Forbidden('Permission denied to rename this folder');
92
-	}
93
-
94
-	public function getLastModified() {
95
-		return $this->node->getLastModified();
96
-	}
33
+    /** @var Directory */
34
+    private $node;
35
+    /** @var CleanupService */
36
+    private $cleanupService;
37
+
38
+    public function __construct(Directory $node, CleanupService $cleanupService) {
39
+        $this->node = $node;
40
+        $this->cleanupService = $cleanupService;
41
+    }
42
+
43
+    public function createFile($name, $data = null) {
44
+        // TODO: verify name - should be a simple number
45
+        $this->node->createFile($name, $data);
46
+    }
47
+
48
+    public function createDirectory($name) {
49
+        throw new Forbidden('Permission denied to create file (filename ' . $name . ')');
50
+    }
51
+
52
+    public function getChild($name) {
53
+        if ($name === '.file') {
54
+            return new FutureFile($this->node, '.file');
55
+        }
56
+        return new UploadFile($this->node->getChild($name));
57
+    }
58
+
59
+    public function getChildren() {
60
+        $tmpChildren = $this->node->getChildren();
61
+
62
+        $children = [];
63
+        $children[] = new FutureFile($this->node, '.file');
64
+
65
+        foreach ($tmpChildren as $child) {
66
+            $children[] = new UploadFile($child);
67
+        }
68
+
69
+        return $children;
70
+    }
71
+
72
+    public function childExists($name) {
73
+        if ($name === '.file') {
74
+            return true;
75
+        }
76
+        return $this->node->childExists($name);
77
+    }
78
+
79
+    public function delete() {
80
+        $this->node->delete();
81
+
82
+        // Background cleanup job is not needed anymore
83
+        $this->cleanupService->removeJob($this->getName());
84
+    }
85
+
86
+    public function getName() {
87
+        return $this->node->getName();
88
+    }
89
+
90
+    public function setName($name) {
91
+        throw new Forbidden('Permission denied to rename this folder');
92
+    }
93
+
94
+    public function getLastModified() {
95
+        return $this->node->getLastModified();
96
+    }
97 97
 }
Please login to merge, or discard this patch.
apps/dav/lib/Storage/PublicOwnerWrapper.php 1 patch
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -29,27 +29,27 @@
 block discarded – undo
29 29
 
30 30
 class PublicOwnerWrapper extends Wrapper {
31 31
 
32
-	/** @var string */
33
-	private $owner;
34
-
35
-	/**
36
-	 * @param array $arguments ['storage' => $storage, 'owner' => $owner]
37
-	 *
38
-	 * $storage: The storage the permissions mask should be applied on
39
-	 * $owner: The owner to use in case no owner is found
40
-	 */
41
-	public function __construct($arguments) {
42
-		parent::__construct($arguments);
43
-		$this->owner = $arguments['owner'];
44
-	}
45
-
46
-	public function getOwner($path) {
47
-		$owner = parent::getOwner($path);
48
-
49
-		if ($owner === null || $owner === false) {
50
-			return $this->owner;
51
-		}
52
-
53
-		return $owner;
54
-	}
32
+    /** @var string */
33
+    private $owner;
34
+
35
+    /**
36
+     * @param array $arguments ['storage' => $storage, 'owner' => $owner]
37
+     *
38
+     * $storage: The storage the permissions mask should be applied on
39
+     * $owner: The owner to use in case no owner is found
40
+     */
41
+    public function __construct($arguments) {
42
+        parent::__construct($arguments);
43
+        $this->owner = $arguments['owner'];
44
+    }
45
+
46
+    public function getOwner($path) {
47
+        $owner = parent::getOwner($path);
48
+
49
+        if ($owner === null || $owner === false) {
50
+            return $this->owner;
51
+        }
52
+
53
+        return $owner;
54
+    }
55 55
 }
Please login to merge, or discard this patch.
lib/public/AppFramework/Services/IAppConfig.php 1 patch
Indentation   +70 added lines, -70 removed lines patch added patch discarded remove patch
@@ -31,81 +31,81 @@
 block discarded – undo
31 31
  * @since 20.0.0
32 32
  */
33 33
 interface IAppConfig {
34
-	/**
35
-	 * Get all keys stored for this app
36
-	 *
37
-	 * @return string[] the keys stored for the app
38
-	 * @since 20.0.0
39
-	 */
40
-	public function getAppKeys(): array ;
34
+    /**
35
+     * Get all keys stored for this app
36
+     *
37
+     * @return string[] the keys stored for the app
38
+     * @since 20.0.0
39
+     */
40
+    public function getAppKeys(): array ;
41 41
 
42
-	/**
43
-	 * Writes a new app wide value
44
-	 *
45
-	 * @param string $key the key of the value, under which will be saved
46
-	 * @param string $value the value that should be stored
47
-	 * @return void
48
-	 * @since 20.0.0
49
-	 */
50
-	public function setAppValue(string $key, string $value): void;
42
+    /**
43
+     * Writes a new app wide value
44
+     *
45
+     * @param string $key the key of the value, under which will be saved
46
+     * @param string $value the value that should be stored
47
+     * @return void
48
+     * @since 20.0.0
49
+     */
50
+    public function setAppValue(string $key, string $value): void;
51 51
 
52
-	/**
53
-	 * Looks up an app wide defined value
54
-	 *
55
-	 * @param string $key the key of the value, under which it was saved
56
-	 * @param string $default the default value to be returned if the value isn't set
57
-	 * @return string the saved value
58
-	 * @since 20.0.0
59
-	 */
60
-	public function getAppValue(string $key, string $default = ''): string;
52
+    /**
53
+     * Looks up an app wide defined value
54
+     *
55
+     * @param string $key the key of the value, under which it was saved
56
+     * @param string $default the default value to be returned if the value isn't set
57
+     * @return string the saved value
58
+     * @since 20.0.0
59
+     */
60
+    public function getAppValue(string $key, string $default = ''): string;
61 61
 
62
-	/**
63
-	 * Delete an app wide defined value
64
-	 *
65
-	 * @param string $key the key of the value, under which it was saved
66
-	 * @return void
67
-	 * @since 20.0.0
68
-	 */
69
-	public function deleteAppValue(string $key): void;
62
+    /**
63
+     * Delete an app wide defined value
64
+     *
65
+     * @param string $key the key of the value, under which it was saved
66
+     * @return void
67
+     * @since 20.0.0
68
+     */
69
+    public function deleteAppValue(string $key): void;
70 70
 
71
-	/**
72
-	 * Removes all keys in appconfig belonging to the app
73
-	 *
74
-	 * @return void
75
-	 * @since 20.0.0
76
-	 */
77
-	public function deleteAppValues(): void;
71
+    /**
72
+     * Removes all keys in appconfig belonging to the app
73
+     *
74
+     * @return void
75
+     * @since 20.0.0
76
+     */
77
+    public function deleteAppValues(): void;
78 78
 
79
-	/**
80
-	 * Set a user defined value
81
-	 *
82
-	 * @param string $userId the userId of the user that we want to store the value under
83
-	 * @param string $key the key under which the value is being stored
84
-	 * @param string $value the value that you want to store
85
-	 * @param string $preCondition only update if the config value was previously the value passed as $preCondition
86
-	 * @throws \OCP\PreConditionNotMetException if a precondition is specified and is not met
87
-	 * @throws \UnexpectedValueException when trying to store an unexpected value
88
-	 * @since 20.0.0
89
-	 */
90
-	public function setUserValue(string $userId, string $key, string $value, ?string $preCondition = null): void;
79
+    /**
80
+     * Set a user defined value
81
+     *
82
+     * @param string $userId the userId of the user that we want to store the value under
83
+     * @param string $key the key under which the value is being stored
84
+     * @param string $value the value that you want to store
85
+     * @param string $preCondition only update if the config value was previously the value passed as $preCondition
86
+     * @throws \OCP\PreConditionNotMetException if a precondition is specified and is not met
87
+     * @throws \UnexpectedValueException when trying to store an unexpected value
88
+     * @since 20.0.0
89
+     */
90
+    public function setUserValue(string $userId, string $key, string $value, ?string $preCondition = null): void;
91 91
 
92
-	/**
93
-	 * Shortcut for getting a user defined value
94
-	 *
95
-	 * @param string $userId the userId of the user that we want to store the value under
96
-	 * @param string $key the key under which the value is being stored
97
-	 * @param mixed $default the default value to be returned if the value isn't set
98
-	 * @return string
99
-	 * @since 20.0.0
100
-	 */
101
-	public function getUserValue(string $userId, string $key, string $default = ''): string;
92
+    /**
93
+     * Shortcut for getting a user defined value
94
+     *
95
+     * @param string $userId the userId of the user that we want to store the value under
96
+     * @param string $key the key under which the value is being stored
97
+     * @param mixed $default the default value to be returned if the value isn't set
98
+     * @return string
99
+     * @since 20.0.0
100
+     */
101
+    public function getUserValue(string $userId, string $key, string $default = ''): string;
102 102
 
103
-	/**
104
-	 * Delete a user value
105
-	 *
106
-	 * @param string $userId the userId of the user that we want to store the value under
107
-	 * @param string $key the key under which the value is being stored
108
-	 * @since 20.0.0
109
-	 */
110
-	public function deleteUserValue(string $userId, string $key): void;
103
+    /**
104
+     * Delete a user value
105
+     *
106
+     * @param string $userId the userId of the user that we want to store the value under
107
+     * @param string $key the key under which the value is being stored
108
+     * @since 20.0.0
109
+     */
110
+    public function deleteUserValue(string $userId, string $key): void;
111 111
 }
Please login to merge, or discard this patch.