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/templates/part.wizard-loginfilter.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,29 +1,29 @@  discard block
 block discarded – undo
1 1
 <fieldset id="ldapWizard3">
2 2
 	<div>
3 3
 		<p>
4
-			<?php p($l->t('When logging in, %s will find the user based on the following attributes:', [$theme->getName()]));?>
4
+			<?php p($l->t('When logging in, %s will find the user based on the following attributes:', [$theme->getName()])); ?>
5 5
 		</p>
6 6
 		<p>
7 7
 			<label for="ldap_loginfilter_username">
8
-				<?php p($l->t('LDAP/AD Username:'));?>
8
+				<?php p($l->t('LDAP/AD Username:')); ?>
9 9
 			</label>
10 10
 
11 11
 			<input type="checkbox" id="ldap_loginfilter_username"
12
-				   title="<?php p($l->t('Allows login against the LDAP/AD username, which is either "uid" or "sAMAccountName" and will be detected.'));?>"
12
+				   title="<?php p($l->t('Allows login against the LDAP/AD username, which is either "uid" or "sAMAccountName" and will be detected.')); ?>"
13 13
 				   name="ldap_loginfilter_username" value="1" />
14 14
 		</p>
15 15
 		<p>
16 16
 			<label for="ldap_loginfilter_email">
17
-				<?php p($l->t('LDAP/AD Email Address:'));?>
17
+				<?php p($l->t('LDAP/AD Email Address:')); ?>
18 18
 			</label>
19 19
 
20 20
 			<input type="checkbox" id="ldap_loginfilter_email"
21
-				   title="<?php p($l->t('Allows login against an email attribute. "mail" and "mailPrimaryAddress" allowed.'));?>"
21
+				   title="<?php p($l->t('Allows login against an email attribute. "mail" and "mailPrimaryAddress" allowed.')); ?>"
22 22
 				   name="ldap_loginfilter_email" value="1" />
23 23
 		</p>
24 24
 		<p>
25 25
 			<label for="ldap_loginfilter_attributes">
26
-				<?php p($l->t('Other Attributes:'));?>
26
+				<?php p($l->t('Other Attributes:')); ?>
27 27
 			</label>
28 28
 
29 29
 			<select id="ldap_loginfilter_attributes" multiple="multiple"
@@ -31,17 +31,17 @@  discard block
 block discarded – undo
31 31
 			</select>
32 32
 		</p>
33 33
 		<p>
34
-			<label><a id='toggleRawLoginFilter' class='ldapToggle'>↓ <?php p($l->t('Edit LDAP Query'));?></a></label>
34
+			<label><a id='toggleRawLoginFilter' class='ldapToggle'>↓ <?php p($l->t('Edit LDAP Query')); ?></a></label>
35 35
 		</p>
36 36
 		<p id="ldapReadOnlyLoginFilterContainer" class="hidden ldapReadOnlyFilterContainer">
37
-			<label><?php p($l->t('LDAP Filter:'));?></label>
37
+			<label><?php p($l->t('LDAP Filter:')); ?></label>
38 38
 			<span class="ldapFilterReadOnlyElement ldapInputColElement"></span>
39 39
 		</p>
40 40
 		<p id="rawLoginFilterContainer" class="invisible">
41 41
 			<textarea type="text" id="ldap_login_filter" name="ldap_login_filter"
42 42
 				class="ldapFilterInputElement"
43
-				placeholder="<?php p($l->t('Edit LDAP Query'));?>"
44
-				title="<?php p($l->t('Defines the filter to apply, when login is attempted. "%%uid" replaces the username in the login action. Example: "uid=%%uid"'));?>">
43
+				placeholder="<?php p($l->t('Edit LDAP Query')); ?>"
44
+				title="<?php p($l->t('Defines the filter to apply, when login is attempted. "%%uid" replaces the username in the login action. Example: "uid=%%uid"')); ?>">
45 45
 			</textarea>
46 46
 		</p>
47 47
 		<p>
@@ -49,11 +49,11 @@  discard block
 block discarded – undo
49 49
 		</p>
50 50
 		<p class="ldap_verify">
51 51
 			<input type="text" id="ldap_test_loginname" name="ldap_test_loginname"
52
-				   placeholder="<?php p($l->t('Test Loginname'));?>"
52
+				   placeholder="<?php p($l->t('Test Loginname')); ?>"
53 53
 				   class="ldapVerifyInput"
54 54
 				   title="Attempts to receive a DN for the given loginname and the current login filter"/>
55 55
 			<button class="ldapVerifyLoginName" name="ldapTestLoginSettings" type="button" disabled="disabled">
56
-				<?php p($l->t('Verify settings'));?>
56
+				<?php p($l->t('Verify settings')); ?>
57 57
 			</button>
58 58
 		</p>
59 59
 		<?php print_unescaped($_['wizardControls']); ?>
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.