Completed
Push — master ( b14354...ca1759 )
by Robbie
11s queued 10s
created
src/Control/LDAPDebugController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
      * @var array
33 33
      */
34 34
     private static $dependencies = [
35
-        'ldapService' => '%$' . LDAPService::class
35
+        'ldapService' => '%$'.LDAPService::class
36 36
     ];
37 37
 
38 38
     /**
Please login to merge, or discard this patch.
src/Forms/LDAPLoginForm.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,13 +45,13 @@  discard block
 block discarded – undo
45 45
         if (Config::inst()->get(LDAPAuthenticator::class, 'allow_email_login') === 'yes') {
46 46
             $loginField = TextField::create(
47 47
                 'Login',
48
-                _t(__CLASS__ . '.USERNAMEOREMAIL', 'Username or email'),
48
+                _t(__CLASS__.'.USERNAMEOREMAIL', 'Username or email'),
49 49
                 null,
50 50
                 null,
51 51
                 $this
52 52
             );
53 53
         } else {
54
-            $loginField = TextField::create('Login', _t(__CLASS__ . '.USERNAME', 'Username'), null, null, $this);
54
+            $loginField = TextField::create('Login', _t(__CLASS__.'.USERNAME', 'Username'), null, null, $this);
55 55
         }
56 56
 
57 57
         $this->Fields()->replaceField('Email', $loginField);
@@ -98,6 +98,6 @@  discard block
 block discarded – undo
98 98
      */
99 99
     public function getAuthenticatorName()
100 100
     {
101
-        return _t(__CLASS__ . '.AUTHENTICATORNAME', 'LDAP');
101
+        return _t(__CLASS__.'.AUTHENTICATORNAME', 'LDAP');
102 102
     }
103 103
 }
Please login to merge, or discard this patch.
src/Forms/LDAPChangePasswordForm.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         ) {
60 60
             $emailField = TextField::create(
61 61
                 'Email',
62
-                _t(__CLASS__ . '.USERNAMEOREMAIL', 'Email'),
62
+                _t(__CLASS__.'.USERNAMEOREMAIL', 'Email'),
63 63
                 $member->Email,
64 64
                 null,
65 65
                 $this
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         if (!empty($data['samaccountname'])) {
69 69
             $usernameField = TextField::create(
70 70
                 'Username',
71
-                _t(__CLASS__ . '.USERNAME', 'Username'),
71
+                _t(__CLASS__.'.USERNAME', 'Username'),
72 72
                 $data['samaccountname'],
73 73
                 null,
74 74
                 $this
Please login to merge, or discard this patch.
src/Jobs/LDAPAllSyncJob.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
      */
47 47
     public function getTitle()
48 48
     {
49
-        return _t(__CLASS__ . '.SYNCTITLE', 'Sync all groups and users from Active Directory, and set mappings up.');
49
+        return _t(__CLASS__.'.SYNCTITLE', 'Sync all groups and users from Active Directory, and set mappings up.');
50 50
     }
51 51
 
52 52
     /**
Please login to merge, or discard this patch.
src/Jobs/LDAPMemberSyncJob.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
      */
46 46
     public function getTitle()
47 47
     {
48
-        return _t(__CLASS__ . '.SYNCTITLE', 'Sync all users from Active Directory');
48
+        return _t(__CLASS__.'.SYNCTITLE', 'Sync all users from Active Directory');
49 49
     }
50 50
 
51 51
     /**
Please login to merge, or discard this patch.
src/Tasks/LDAPMigrateExistingMembersTask.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
      * @var array
28 28
      */
29 29
     private static $dependencies = [
30
-        'ldapService' => '%$' . LDAPService::class,
30
+        'ldapService' => '%$'.LDAPService::class,
31 31
     ];
32 32
 
33 33
     /**
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      */
36 36
     public function getTitle()
37 37
     {
38
-        return _t(__CLASS__ . '.TITLE', 'Migrate existing members in SilverStripe into LDAP members');
38
+        return _t(__CLASS__.'.TITLE', 'Migrate existing members in SilverStripe into LDAP members');
39 39
     }
40 40
 
41 41
     /**
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
      */
89 89
     protected function log($message)
90 90
     {
91
-        $message = sprintf('[%s] ', date('Y-m-d H:i:s')) . $message;
92
-        echo Director::is_cli() ? ($message . PHP_EOL) : ($message . '<br>');
91
+        $message = sprintf('[%s] ', date('Y-m-d H:i:s')).$message;
92
+        echo Director::is_cli() ? ($message.PHP_EOL) : ($message.'<br>');
93 93
     }
94 94
 }
Please login to merge, or discard this patch.
src/Model/LDAPGroupMapping.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      * @var array
48 48
      */
49 49
     private static $dependencies = [
50
-        'ldapService' => '%$' . LDAPService::class,
50
+        'ldapService' => '%$'.LDAPService::class,
51 51
     ];
52 52
 
53 53
     private static $singular_name = 'LDAP Group Mapping';
@@ -63,8 +63,8 @@  discard block
 block discarded – undo
63 63
         $fields = parent::getCMSFields();
64 64
         $fields->removeByName('DN');
65 65
 
66
-        $field = DropdownField::create('DN', _t(__CLASS__ . '.LDAPGROUP', 'LDAP Group'));
67
-        $field->setEmptyString(_t(__CLASS__ . '.SELECTONE', 'Select one'));
66
+        $field = DropdownField::create('DN', _t(__CLASS__.'.LDAPGROUP', 'LDAP Group'));
67
+        $field->setEmptyString(_t(__CLASS__.'.SELECTONE', 'Select one'));
68 68
         $groups = $this->ldapService->getGroups(true, ['dn', 'name']);
69 69
         $source = [];
70 70
         if ($groups) {
@@ -79,12 +79,12 @@  discard block
 block discarded – undo
79 79
         $fields->removeByName('Scope');
80 80
         $fields->addFieldToTab(
81 81
             'Root.Main',
82
-            DropdownField::create('Scope', _t(__CLASS__ . '.SCOPE', 'Scope'), [
82
+            DropdownField::create('Scope', _t(__CLASS__.'.SCOPE', 'Scope'), [
83 83
                 'Subtree' => _t(
84
-                    __CLASS__ . '.SUBTREE_DESCRIPTION',
84
+                    __CLASS__.'.SUBTREE_DESCRIPTION',
85 85
                     'Users within this group and all nested groups within'
86 86
                 ),
87
-                'OneLevel' => _t(__CLASS__ . '.ONELEVEL_DESCRIPTION', 'Only users within this group'),
87
+                'OneLevel' => _t(__CLASS__.'.ONELEVEL_DESCRIPTION', 'Only users within this group'),
88 88
             ])
89 89
         );
90 90
 
Please login to merge, or discard this patch.
src/Extensions/LDAPGroupExtension.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
             'Root.LDAP',
65 65
             ReadonlyField::create(
66 66
                 'LastSynced',
67
-                _t(__CLASS__ . '.LASTSYNCED', 'Last synced')
67
+                _t(__CLASS__.'.LASTSYNCED', 'Last synced')
68 68
             )
69 69
         );
70 70
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
             $fields->addFieldToTab('Root.Members', ReadonlyField::create('Code'), 'Members');
76 76
 
77 77
             $message = _t(
78
-                __CLASS__ . '.INFOIMPORTED',
78
+                __CLASS__.'.INFOIMPORTED',
79 79
                 'This group is automatically imported from LDAP.'
80 80
             );
81 81
             $fields->addFieldToTab(
@@ -89,18 +89,18 @@  discard block
 block discarded – undo
89 89
 
90 90
             $fields->addFieldToTab('Root.LDAP', ReadonlyField::create(
91 91
                 'LDAPGroupMappingsRO',
92
-                _t(__CLASS__ . '.AUTOMAPPEDGROUPS', 'Automatically mapped LDAP Groups'),
92
+                _t(__CLASS__.'.AUTOMAPPEDGROUPS', 'Automatically mapped LDAP Groups'),
93 93
                 implode('; ', $this->owner->LDAPGroupMappings()->column('DN'))
94 94
             ));
95 95
         } else {
96 96
             $field = GridField::create(
97 97
                 'LDAPGroupMappings',
98
-                _t(__CLASS__ . '.MAPPEDGROUPS', 'Mapped LDAP Groups'),
98
+                _t(__CLASS__.'.MAPPEDGROUPS', 'Mapped LDAP Groups'),
99 99
                 $this->owner->LDAPGroupMappings()
100 100
             );
101 101
             $config = GridFieldConfig_RecordEditor::create();
102 102
             $config->getComponentByType(GridFieldAddNewButton::class)
103
-                ->setButtonName(_t(__CLASS__ . '.ADDMAPPEDGROUP', 'Add LDAP group mapping'));
103
+                ->setButtonName(_t(__CLASS__.'.ADDMAPPEDGROUP', 'Add LDAP group mapping'));
104 104
 
105 105
             $field->setConfig($config);
106 106
             $fields->addFieldToTab('Root.LDAP', $field);
Please login to merge, or discard this patch.
src/Authenticators/LDAPLostPasswordHandler.php 1 patch
Spacing   +7 added lines, -8 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     ];
38 38
 
39 39
     private static $dependencies = [
40
-        'service' => '%$' . LDAPService::class,
40
+        'service' => '%$'.LDAPService::class,
41 41
     ];
42 42
 
43 43
     /**
@@ -136,8 +136,7 @@  discard block
 block discarded – undo
136 136
     public function lostPasswordForm()
137 137
     {
138 138
         $loginFieldLabel = (Config::inst()->get(LDAPAuthenticator::class, 'allow_email_login') === 'yes') ?
139
-            _t('SilverStripe\\LDAP\\Forms\\LDAPLoginForm.USERNAMEOREMAIL', 'Username or email') :
140
-            _t('SilverStripe\\LDAP\\Forms\\LDAPLoginForm.USERNAME', 'Username');
139
+            _t('SilverStripe\\LDAP\\Forms\\LDAPLoginForm.USERNAMEOREMAIL', 'Username or email') : _t('SilverStripe\\LDAP\\Forms\\LDAPLoginForm.USERNAME', 'Username');
141 140
         $loginField = TextField::create('Login', $loginFieldLabel);
142 141
 
143 142
         $action = FormAction::create(
@@ -158,13 +157,13 @@  discard block
 block discarded – undo
158 157
     {
159 158
         if (Config::inst()->get(LDAPAuthenticator::class, 'allow_email_login') === 'yes') {
160 159
             $message = _t(
161
-                __CLASS__ . '.NOTERESETPASSWORDUSERNAMEOREMAIL',
160
+                __CLASS__.'.NOTERESETPASSWORDUSERNAMEOREMAIL',
162 161
                 'Enter your username or your email address and we will send you a link with which '
163 162
                 . 'you can reset your password'
164 163
             );
165 164
         } else {
166 165
             $message = _t(
167
-                __CLASS__ . '.NOTERESETPASSWORDUSERNAME',
166
+                __CLASS__.'.NOTERESETPASSWORDUSERNAME',
168 167
                 'Enter your username and we will send you a link with which you can reset your password'
169 168
             );
170 169
         }
@@ -180,17 +179,17 @@  discard block
 block discarded – undo
180 179
         $username = Convert::raw2xml(
181 180
             rawurldecode($this->getRequest()->param('OtherID'))
182 181
         );
183
-        $username .= ($extension = $this->getRequest()->getExtension()) ? '.' . $extension : '';
182
+        $username .= ($extension = $this->getRequest()->getExtension()) ? '.'.$extension : '';
184 183
 
185 184
         return [
186 185
             'Title' => _t(
187
-                __CLASS__ . '.PASSWORDSENTHEADER',
186
+                __CLASS__.'.PASSWORDSENTHEADER',
188 187
                 "Password reset link sent to '{username}'",
189 188
                 ['username' => $username]
190 189
             ),
191 190
             'Content' =>
192 191
                 _t(
193
-                    __CLASS__ . '.PASSWORDSENTTEXT',
192
+                    __CLASS__.'.PASSWORDSENTTEXT',
194 193
                     "Thank you! A reset link has been sent to '{username}', provided an account exists.",
195 194
                     ['username' => $username]
196 195
                 ),
Please login to merge, or discard this patch.