Completed
Pull Request — master (#6025)
by Thomas
12:42
created
apps/files_external/lib/Lib/Auth/OpenStack/Rackspace.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -31,17 +31,17 @@
 block discarded – undo
31 31
  */
32 32
 class Rackspace extends AuthMechanism {
33 33
 
34
-	public function __construct(IL10N $l) {
35
-		$this
36
-			->setIdentifier('openstack::rackspace')
37
-			->setScheme(self::SCHEME_OPENSTACK)
38
-			->setText($l->t('Rackspace'))
39
-			->addParameters([
40
-				(new DefinitionParameter('user', $l->t('Username'))),
41
-				(new DefinitionParameter('key', $l->t('API key')))
42
-					->setType(DefinitionParameter::VALUE_PASSWORD),
43
-			])
44
-		;
45
-	}
34
+    public function __construct(IL10N $l) {
35
+        $this
36
+            ->setIdentifier('openstack::rackspace')
37
+            ->setScheme(self::SCHEME_OPENSTACK)
38
+            ->setText($l->t('Rackspace'))
39
+            ->addParameters([
40
+                (new DefinitionParameter('user', $l->t('Username'))),
41
+                (new DefinitionParameter('key', $l->t('API key')))
42
+                    ->setType(DefinitionParameter::VALUE_PASSWORD),
43
+            ])
44
+        ;
45
+    }
46 46
 
47 47
 }
Please login to merge, or discard this patch.
apps/files_external/lib/Lib/Auth/OpenStack/OpenStack.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -31,19 +31,19 @@
 block discarded – undo
31 31
  */
32 32
 class OpenStack extends AuthMechanism {
33 33
 
34
-	public function __construct(IL10N $l) {
35
-		$this
36
-			->setIdentifier('openstack::openstack')
37
-			->setScheme(self::SCHEME_OPENSTACK)
38
-			->setText($l->t('OpenStack'))
39
-			->addParameters([
40
-				(new DefinitionParameter('user', $l->t('Username'))),
41
-				(new DefinitionParameter('password', $l->t('Password')))
42
-					->setType(DefinitionParameter::VALUE_PASSWORD),
43
-				(new DefinitionParameter('tenant', $l->t('Tenant name'))),
44
-				(new DefinitionParameter('url', $l->t('Identity endpoint URL'))),
45
-			])
46
-		;
47
-	}
34
+    public function __construct(IL10N $l) {
35
+        $this
36
+            ->setIdentifier('openstack::openstack')
37
+            ->setScheme(self::SCHEME_OPENSTACK)
38
+            ->setText($l->t('OpenStack'))
39
+            ->addParameters([
40
+                (new DefinitionParameter('user', $l->t('Username'))),
41
+                (new DefinitionParameter('password', $l->t('Password')))
42
+                    ->setType(DefinitionParameter::VALUE_PASSWORD),
43
+                (new DefinitionParameter('tenant', $l->t('Tenant name'))),
44
+                (new DefinitionParameter('url', $l->t('Identity endpoint URL'))),
45
+            ])
46
+        ;
47
+    }
48 48
 
49 49
 }
Please login to merge, or discard this patch.
apps/files_external/lib/Lib/Auth/PublicKey/RSA.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
 		;
58 58
 	}
59 59
 
60
-	public function manipulateStorageConfig(StorageConfig &$storage, IUser $user = null) {
60
+	public function manipulateStorageConfig(StorageConfig & $storage, IUser $user = null) {
61 61
 		$auth = new RSACrypt();
62 62
 		$auth->setPassword($this->config->getSystemValue('secret', ''));
63 63
 		if (!$auth->loadKey($storage->getBackendOption('private_key'))) {
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
 	/**
70 70
 	 * Generate a keypair
71 71
 	 *
72
-	 * @param int $keyLenth
72
+	 * @param integer $keyLength
73 73
 	 * @return array ['privatekey' => $privateKey, 'publickey' => $publicKey]
74 74
 	 */
75 75
 	public function createKey($keyLength) {
Please login to merge, or discard this patch.
Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -35,51 +35,51 @@
 block discarded – undo
35 35
  */
36 36
 class RSA extends AuthMechanism {
37 37
 
38
-	/** @var IConfig */
39
-	private $config;
38
+    /** @var IConfig */
39
+    private $config;
40 40
 
41
-	public function __construct(IL10N $l, IConfig $config) {
42
-		$this->config = $config;
41
+    public function __construct(IL10N $l, IConfig $config) {
42
+        $this->config = $config;
43 43
 
44
-		$this
45
-			->setIdentifier('publickey::rsa')
46
-			->setScheme(self::SCHEME_PUBLICKEY)
47
-			->setText($l->t('RSA public key'))
48
-			->addParameters([
49
-				(new DefinitionParameter('user', $l->t('Username'))),
50
-				(new DefinitionParameter('public_key', $l->t('Public key'))),
51
-				(new DefinitionParameter('private_key', 'private_key'))
52
-					->setType(DefinitionParameter::VALUE_HIDDEN),
53
-			])
54
-			->addCustomJs('public_key')
55
-		;
56
-	}
44
+        $this
45
+            ->setIdentifier('publickey::rsa')
46
+            ->setScheme(self::SCHEME_PUBLICKEY)
47
+            ->setText($l->t('RSA public key'))
48
+            ->addParameters([
49
+                (new DefinitionParameter('user', $l->t('Username'))),
50
+                (new DefinitionParameter('public_key', $l->t('Public key'))),
51
+                (new DefinitionParameter('private_key', 'private_key'))
52
+                    ->setType(DefinitionParameter::VALUE_HIDDEN),
53
+            ])
54
+            ->addCustomJs('public_key')
55
+        ;
56
+    }
57 57
 
58
-	public function manipulateStorageConfig(StorageConfig &$storage, IUser $user = null) {
59
-		$auth = new RSACrypt();
60
-		$auth->setPassword($this->config->getSystemValue('secret', ''));
61
-		if (!$auth->loadKey($storage->getBackendOption('private_key'))) {
62
-			throw new \RuntimeException('unable to load private key');
63
-		}
64
-		$storage->setBackendOption('public_key_auth', $auth);
65
-	}
58
+    public function manipulateStorageConfig(StorageConfig &$storage, IUser $user = null) {
59
+        $auth = new RSACrypt();
60
+        $auth->setPassword($this->config->getSystemValue('secret', ''));
61
+        if (!$auth->loadKey($storage->getBackendOption('private_key'))) {
62
+            throw new \RuntimeException('unable to load private key');
63
+        }
64
+        $storage->setBackendOption('public_key_auth', $auth);
65
+    }
66 66
 
67
-	/**
68
-	 * Generate a keypair
69
-	 *
70
-	 * @param int $keyLenth
71
-	 * @return array ['privatekey' => $privateKey, 'publickey' => $publicKey]
72
-	 */
73
-	public function createKey($keyLength) {
74
-		$rsa = new RSACrypt();
75
-		$rsa->setPublicKeyFormat(RSACrypt::PUBLIC_FORMAT_OPENSSH);
76
-		$rsa->setPassword($this->config->getSystemValue('secret', ''));
67
+    /**
68
+     * Generate a keypair
69
+     *
70
+     * @param int $keyLenth
71
+     * @return array ['privatekey' => $privateKey, 'publickey' => $publicKey]
72
+     */
73
+    public function createKey($keyLength) {
74
+        $rsa = new RSACrypt();
75
+        $rsa->setPublicKeyFormat(RSACrypt::PUBLIC_FORMAT_OPENSSH);
76
+        $rsa->setPassword($this->config->getSystemValue('secret', ''));
77 77
 
78
-		if ($keyLength !== 1024 && $keyLength !== 2048 && $keyLength !== 4096) {
79
-			$keyLength = 1024;
80
-		}
78
+        if ($keyLength !== 1024 && $keyLength !== 2048 && $keyLength !== 4096) {
79
+            $keyLength = 1024;
80
+        }
81 81
 
82
-		return $rsa->createKey($keyLength);
83
-	}
82
+        return $rsa->createKey($keyLength);
83
+    }
84 84
 
85 85
 }
Please login to merge, or discard this patch.
apps/files_external/lib/Lib/Auth/Builtin.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
  */
30 30
 class Builtin extends AuthMechanism {
31 31
 
32
-	public function __construct(IL10N $l) {
33
-		$this
34
-			->setIdentifier('builtin::builtin')
35
-			->setScheme(self::SCHEME_BUILTIN)
36
-			->setText($l->t('Builtin'))
37
-		;
38
-	}
32
+    public function __construct(IL10N $l) {
33
+        $this
34
+            ->setIdentifier('builtin::builtin')
35
+            ->setScheme(self::SCHEME_BUILTIN)
36
+            ->setText($l->t('Builtin'))
37
+        ;
38
+    }
39 39
 
40 40
 }
Please login to merge, or discard this patch.
apps/files_external/lib/Lib/Auth/NullMechanism.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
  */
30 30
 class NullMechanism extends AuthMechanism {
31 31
 
32
-	public function __construct(IL10N $l) {
33
-		$this
34
-			->setIdentifier('null::null')
35
-			->setScheme(self::SCHEME_NULL)
36
-			->setText($l->t('None'))
37
-		;
38
-	}
32
+    public function __construct(IL10N $l) {
33
+        $this
34
+            ->setIdentifier('null::null')
35
+            ->setScheme(self::SCHEME_NULL)
36
+            ->setText($l->t('None'))
37
+        ;
38
+    }
39 39
 
40 40
 }
Please login to merge, or discard this patch.
apps/files_external/lib/Lib/PriorityTrait.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -29,33 +29,33 @@
 block discarded – undo
29 29
  */
30 30
 trait PriorityTrait {
31 31
 
32
-	/** @var int initial priority */
33
-	protected $priority = BackendService::PRIORITY_DEFAULT;
34
-
35
-	/**
36
-	 * @return int
37
-	 */
38
-	public function getPriority() {
39
-		return $this->priority;
40
-	}
41
-
42
-	/**
43
-	 * @param int $priority
44
-	 * @return self
45
-	 */
46
-	public function setPriority($priority) {
47
-		$this->priority = $priority;
48
-		return $this;
49
-	}
50
-
51
-	/**
52
-	 * @param PriorityTrait $a
53
-	 * @param PriorityTrait $b
54
-	 * @return int
55
-	 */
56
-	public static function priorityCompare(PriorityTrait $a, PriorityTrait $b) {
57
-		return ($a->getPriority() - $b->getPriority());
58
-	}
32
+    /** @var int initial priority */
33
+    protected $priority = BackendService::PRIORITY_DEFAULT;
34
+
35
+    /**
36
+     * @return int
37
+     */
38
+    public function getPriority() {
39
+        return $this->priority;
40
+    }
41
+
42
+    /**
43
+     * @param int $priority
44
+     * @return self
45
+     */
46
+    public function setPriority($priority) {
47
+        $this->priority = $priority;
48
+        return $this;
49
+    }
50
+
51
+    /**
52
+     * @param PriorityTrait $a
53
+     * @param PriorityTrait $b
54
+     * @return int
55
+     */
56
+    public static function priorityCompare(PriorityTrait $a, PriorityTrait $b) {
57
+        return ($a->getPriority() - $b->getPriority());
58
+    }
59 59
 
60 60
 }
61 61
 
Please login to merge, or discard this patch.
apps/files_external/lib/Lib/Config/IBackendProvider.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -30,10 +30,10 @@
 block discarded – undo
30 30
  */
31 31
 interface IBackendProvider {
32 32
 
33
-	/**
34
-	 * @since 9.1.0
35
-	 * @return Backend[]
36
-	 */
37
-	public function getBackends();
33
+    /**
34
+     * @since 9.1.0
35
+     * @return Backend[]
36
+     */
37
+    public function getBackends();
38 38
 
39 39
 }
Please login to merge, or discard this patch.
apps/files_external/lib/Lib/Config/IAuthMechanismProvider.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -30,10 +30,10 @@
 block discarded – undo
30 30
  */
31 31
 interface IAuthMechanismProvider {
32 32
 
33
-	/**
34
-	 * @since 9.1.0
35
-	 * @return AuthMechanism[]
36
-	 */
37
-	public function getAuthMechanisms();
33
+    /**
34
+     * @since 9.1.0
35
+     * @return AuthMechanism[]
36
+     */
37
+    public function getAuthMechanisms();
38 38
 
39 39
 }
Please login to merge, or discard this patch.
apps/files_external/lib/Lib/SessionStorageWrapper.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -31,14 +31,14 @@
 block discarded – undo
31 31
  */
32 32
 class SessionStorageWrapper extends PermissionsMask {
33 33
 
34
-	/**
35
-	 * @param array $arguments ['storage' => $storage]
36
-	 */
37
-	public function __construct($arguments) {
38
-		// disable sharing permission
39
-		$arguments['mask'] = Constants::PERMISSION_ALL & ~Constants::PERMISSION_SHARE;
40
-		parent::__construct($arguments);
41
-	}
34
+    /**
35
+     * @param array $arguments ['storage' => $storage]
36
+     */
37
+    public function __construct($arguments) {
38
+        // disable sharing permission
39
+        $arguments['mask'] = Constants::PERMISSION_ALL & ~Constants::PERMISSION_SHARE;
40
+        parent::__construct($arguments);
41
+    }
42 42
 
43 43
 }
44 44
 
Please login to merge, or discard this patch.