Passed
Push — master ( 773e28...7e8ddc )
by Joas
13:16 queued 11s
created
apps/files_external/lib/Lib/Backend/SMB_OC.php 1 patch
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -37,35 +37,35 @@
 block discarded – undo
37 37
  * Deprecated SMB_OC class - use SMB with the password::sessioncredentials auth mechanism
38 38
  */
39 39
 class SMB_OC extends Backend {
40
-	use LegacyDependencyCheckPolyfill;
40
+    use LegacyDependencyCheckPolyfill;
41 41
 
42
-	public function __construct(IL10N $l, SessionCredentials $legacyAuth, SMB $smbBackend) {
43
-		$this
44
-			->setIdentifier('\OC\Files\Storage\SMB_OC')
45
-			->setStorageClass('\OCA\Files_External\Lib\Storage\SMB')
46
-			->setText($l->t('SMB/CIFS using OC login'))
47
-			->addParameters([
48
-				new DefinitionParameter('host', $l->t('Host')),
49
-				(new DefinitionParameter('username_as_share', $l->t('Username as share')))
50
-					->setType(DefinitionParameter::VALUE_BOOLEAN),
51
-				(new DefinitionParameter('share', $l->t('Share')))
52
-					->setFlag(DefinitionParameter::FLAG_OPTIONAL),
53
-				(new DefinitionParameter('root', $l->t('Remote subfolder')))
54
-					->setFlag(DefinitionParameter::FLAG_OPTIONAL),
55
-			])
56
-			->setPriority(BackendService::PRIORITY_DEFAULT - 10)
57
-			->addAuthScheme(AuthMechanism::SCHEME_PASSWORD)
58
-			->setLegacyAuthMechanism($legacyAuth)
59
-			->deprecateTo($smbBackend)
60
-		;
61
-	}
42
+    public function __construct(IL10N $l, SessionCredentials $legacyAuth, SMB $smbBackend) {
43
+        $this
44
+            ->setIdentifier('\OC\Files\Storage\SMB_OC')
45
+            ->setStorageClass('\OCA\Files_External\Lib\Storage\SMB')
46
+            ->setText($l->t('SMB/CIFS using OC login'))
47
+            ->addParameters([
48
+                new DefinitionParameter('host', $l->t('Host')),
49
+                (new DefinitionParameter('username_as_share', $l->t('Username as share')))
50
+                    ->setType(DefinitionParameter::VALUE_BOOLEAN),
51
+                (new DefinitionParameter('share', $l->t('Share')))
52
+                    ->setFlag(DefinitionParameter::FLAG_OPTIONAL),
53
+                (new DefinitionParameter('root', $l->t('Remote subfolder')))
54
+                    ->setFlag(DefinitionParameter::FLAG_OPTIONAL),
55
+            ])
56
+            ->setPriority(BackendService::PRIORITY_DEFAULT - 10)
57
+            ->addAuthScheme(AuthMechanism::SCHEME_PASSWORD)
58
+            ->setLegacyAuthMechanism($legacyAuth)
59
+            ->deprecateTo($smbBackend)
60
+        ;
61
+    }
62 62
 
63
-	public function manipulateStorageConfig(StorageConfig &$storage, IUser $user = null) {
64
-		$username_as_share = ($storage->getBackendOption('username_as_share') === true);
63
+    public function manipulateStorageConfig(StorageConfig &$storage, IUser $user = null) {
64
+        $username_as_share = ($storage->getBackendOption('username_as_share') === true);
65 65
 
66
-		if ($username_as_share) {
67
-			$share = '/' . $storage->getBackendOption('user');
68
-			$storage->setBackendOption('share', $share);
69
-		}
70
-	}
66
+        if ($username_as_share) {
67
+            $share = '/' . $storage->getBackendOption('user');
68
+            $storage->setBackendOption('share', $share);
69
+        }
70
+    }
71 71
 }
Please login to merge, or discard this patch.
apps/files_external/lib/Lib/Backend/SMB.php 1 patch
Indentation   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -38,59 +38,59 @@
 block discarded – undo
38 38
 use OCP\IUser;
39 39
 
40 40
 class SMB extends Backend {
41
-	use LegacyDependencyCheckPolyfill;
41
+    use LegacyDependencyCheckPolyfill;
42 42
 
43
-	public function __construct(IL10N $l, Password $legacyAuth) {
44
-		$this
45
-			->setIdentifier('smb')
46
-			->addIdentifierAlias('\OC\Files\Storage\SMB')// legacy compat
47
-			->setStorageClass('\OCA\Files_External\Lib\Storage\SMB')
48
-			->setText($l->t('SMB/CIFS'))
49
-			->addParameters([
50
-				new DefinitionParameter('host', $l->t('Host')),
51
-				new DefinitionParameter('share', $l->t('Share')),
52
-				(new DefinitionParameter('root', $l->t('Remote subfolder')))
53
-					->setFlag(DefinitionParameter::FLAG_OPTIONAL),
54
-				(new DefinitionParameter('domain', $l->t('Domain')))
55
-					->setFlag(DefinitionParameter::FLAG_OPTIONAL),
56
-				(new DefinitionParameter('show_hidden', $l->t('Show hidden files')))
57
-					->setType(DefinitionParameter::VALUE_BOOLEAN)
58
-					->setFlag(DefinitionParameter::FLAG_OPTIONAL),
59
-				(new DefinitionParameter('check_acl', $l->t('Verify ACL access when listing files')))
60
-					->setType(DefinitionParameter::VALUE_BOOLEAN)
61
-					->setFlag(DefinitionParameter::FLAG_OPTIONAL)
62
-					->setTooltip($l->t("Check the ACL's of each file or folder inside a directory to filter out items where the user has no read permissions, comes with a performance penalty")),
63
-				(new DefinitionParameter('timeout', $l->t('Timeout')))
64
-					->setType(DefinitionParameter::VALUE_HIDDEN)
65
-					->setFlag(DefinitionParameter::FLAG_OPTIONAL),
66
-			])
67
-			->addAuthScheme(AuthMechanism::SCHEME_PASSWORD)
68
-			->addAuthScheme(AuthMechanism::SCHEME_SMB)
69
-			->setLegacyAuthMechanism($legacyAuth);
70
-	}
43
+    public function __construct(IL10N $l, Password $legacyAuth) {
44
+        $this
45
+            ->setIdentifier('smb')
46
+            ->addIdentifierAlias('\OC\Files\Storage\SMB')// legacy compat
47
+            ->setStorageClass('\OCA\Files_External\Lib\Storage\SMB')
48
+            ->setText($l->t('SMB/CIFS'))
49
+            ->addParameters([
50
+                new DefinitionParameter('host', $l->t('Host')),
51
+                new DefinitionParameter('share', $l->t('Share')),
52
+                (new DefinitionParameter('root', $l->t('Remote subfolder')))
53
+                    ->setFlag(DefinitionParameter::FLAG_OPTIONAL),
54
+                (new DefinitionParameter('domain', $l->t('Domain')))
55
+                    ->setFlag(DefinitionParameter::FLAG_OPTIONAL),
56
+                (new DefinitionParameter('show_hidden', $l->t('Show hidden files')))
57
+                    ->setType(DefinitionParameter::VALUE_BOOLEAN)
58
+                    ->setFlag(DefinitionParameter::FLAG_OPTIONAL),
59
+                (new DefinitionParameter('check_acl', $l->t('Verify ACL access when listing files')))
60
+                    ->setType(DefinitionParameter::VALUE_BOOLEAN)
61
+                    ->setFlag(DefinitionParameter::FLAG_OPTIONAL)
62
+                    ->setTooltip($l->t("Check the ACL's of each file or folder inside a directory to filter out items where the user has no read permissions, comes with a performance penalty")),
63
+                (new DefinitionParameter('timeout', $l->t('Timeout')))
64
+                    ->setType(DefinitionParameter::VALUE_HIDDEN)
65
+                    ->setFlag(DefinitionParameter::FLAG_OPTIONAL),
66
+            ])
67
+            ->addAuthScheme(AuthMechanism::SCHEME_PASSWORD)
68
+            ->addAuthScheme(AuthMechanism::SCHEME_SMB)
69
+            ->setLegacyAuthMechanism($legacyAuth);
70
+    }
71 71
 
72
-	/**
73
-	 * @param StorageConfig $storage
74
-	 * @param IUser $user
75
-	 */
76
-	public function manipulateStorageConfig(StorageConfig &$storage, IUser $user = null) {
77
-		$auth = $storage->getAuthMechanism();
78
-		if ($auth->getScheme() === AuthMechanism::SCHEME_PASSWORD) {
79
-			$smbAuth = new BasicAuth(
80
-				$storage->getBackendOption('user'),
81
-				$storage->getBackendOption('domain'),
82
-				$storage->getBackendOption('password')
83
-			);
84
-		} else {
85
-			switch ($auth->getIdentifier()) {
86
-				case 'smb::kerberos':
87
-					$smbAuth = new KerberosAuth();
88
-					break;
89
-				default:
90
-					throw new \InvalidArgumentException('unknown authentication backend');
91
-			}
92
-		}
72
+    /**
73
+     * @param StorageConfig $storage
74
+     * @param IUser $user
75
+     */
76
+    public function manipulateStorageConfig(StorageConfig &$storage, IUser $user = null) {
77
+        $auth = $storage->getAuthMechanism();
78
+        if ($auth->getScheme() === AuthMechanism::SCHEME_PASSWORD) {
79
+            $smbAuth = new BasicAuth(
80
+                $storage->getBackendOption('user'),
81
+                $storage->getBackendOption('domain'),
82
+                $storage->getBackendOption('password')
83
+            );
84
+        } else {
85
+            switch ($auth->getIdentifier()) {
86
+                case 'smb::kerberos':
87
+                    $smbAuth = new KerberosAuth();
88
+                    break;
89
+                default:
90
+                    throw new \InvalidArgumentException('unknown authentication backend');
91
+            }
92
+        }
93 93
 
94
-		$storage->setBackendOption('auth', $smbAuth);
95
-	}
94
+        $storage->setBackendOption('auth', $smbAuth);
95
+    }
96 96
 }
Please login to merge, or discard this patch.
apps/user_ldap/lib/Settings/Section.php 1 patch
Indentation   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -30,55 +30,55 @@
 block discarded – undo
30 30
 use OCP\Settings\IIconSection;
31 31
 
32 32
 class Section implements IIconSection {
33
-	/** @var IL10N */
34
-	private $l;
35
-	/** @var IURLGenerator */
36
-	private $url;
33
+    /** @var IL10N */
34
+    private $l;
35
+    /** @var IURLGenerator */
36
+    private $url;
37 37
 
38
-	/**
39
-	 * @param IURLGenerator $url
40
-	 * @param IL10N $l
41
-	 */
42
-	public function __construct(IURLGenerator $url, IL10N $l) {
43
-		$this->url = $url;
44
-		$this->l = $l;
45
-	}
38
+    /**
39
+     * @param IURLGenerator $url
40
+     * @param IL10N $l
41
+     */
42
+    public function __construct(IURLGenerator $url, IL10N $l) {
43
+        $this->url = $url;
44
+        $this->l = $l;
45
+    }
46 46
 
47
-	/**
48
-	 * returns the ID of the section. It is supposed to be a lower case string,
49
-	 * e.g. 'ldap'
50
-	 *
51
-	 * @returns string
52
-	 */
53
-	public function getID() {
54
-		return 'ldap';
55
-	}
47
+    /**
48
+     * returns the ID of the section. It is supposed to be a lower case string,
49
+     * e.g. 'ldap'
50
+     *
51
+     * @returns string
52
+     */
53
+    public function getID() {
54
+        return 'ldap';
55
+    }
56 56
 
57
-	/**
58
-	 * returns the translated name as it should be displayed, e.g. 'LDAP/AD
59
-	 * integration'. Use the L10N service to translate it.
60
-	 *
61
-	 * @return string
62
-	 */
63
-	public function getName() {
64
-		return $this->l->t('LDAP/AD integration');
65
-	}
57
+    /**
58
+     * returns the translated name as it should be displayed, e.g. 'LDAP/AD
59
+     * integration'. Use the L10N service to translate it.
60
+     *
61
+     * @return string
62
+     */
63
+    public function getName() {
64
+        return $this->l->t('LDAP/AD integration');
65
+    }
66 66
 
67
-	/**
68
-	 * @return int whether the form should be rather on the top or bottom of
69
-	 * the settings navigation. The sections are arranged in ascending order of
70
-	 * the priority values. It is required to return a value between 0 and 99.
71
-	 *
72
-	 * E.g.: 70
73
-	 */
74
-	public function getPriority() {
75
-		return 25;
76
-	}
67
+    /**
68
+     * @return int whether the form should be rather on the top or bottom of
69
+     * the settings navigation. The sections are arranged in ascending order of
70
+     * the priority values. It is required to return a value between 0 and 99.
71
+     *
72
+     * E.g.: 70
73
+     */
74
+    public function getPriority() {
75
+        return 25;
76
+    }
77 77
 
78
-	/**
79
-	 * {@inheritdoc}
80
-	 */
81
-	public function getIcon() {
82
-		return $this->url->imagePath('user_ldap', 'app-dark.svg');
83
-	}
78
+    /**
79
+     * {@inheritdoc}
80
+     */
81
+    public function getIcon() {
82
+        return $this->url->imagePath('user_ldap', 'app-dark.svg');
83
+    }
84 84
 }
Please login to merge, or discard this patch.