Completed
Pull Request — master (#135)
by Stig
01:15
created
code/model/LDAPUtil.php 1 patch
Doc Comments   +8 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
     /**
10 10
      * Checks if the string is a valid guid in the format of A98C5A1E-A742-4808-96FA-6F409E799937
11 11
      *
12
-     * @param $guid
12
+     * @param string $guid
13 13
      * @return bool
14 14
      */
15 15
     public static function validGuid($guid)
@@ -41,6 +41,9 @@  discard block
 block discarded – undo
41 41
         return strtoupper($hex_guid_to_guid_str);
42 42
     }
43 43
 
44
+    /**
45
+     * @param string $str_guid
46
+     */
44 47
     public static function str_to_hex_guid($str_guid, $escape = false)
45 48
     {
46 49
         $str_guid = str_replace('-', '', $str_guid);
@@ -87,6 +90,10 @@  discard block
 block discarded – undo
87 90
     }
88 91
 
89 92
     // Converts a little-endian hex-number to one, that 'hexdec' can convert
93
+
94
+    /**
95
+     * @param string $hex
96
+     */
90 97
     public static function little_endian($hex)
91 98
     {
92 99
         $result = '';
Please login to merge, or discard this patch.
code/tasks/LDAPMigrateExistingMembersTask.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -52,6 +52,9 @@
 block discarded – undo
52 52
         $this->log(sprintf('Done. Migrated %s Member records. Duration: %s seconds', $count, round($end, 0)));
53 53
     }
54 54
 
55
+    /**
56
+     * @param string $message
57
+     */
55 58
     protected function log($message)
56 59
     {
57 60
         $message = sprintf('[%s] ', date('Y-m-d H:i:s')) . $message;
Please login to merge, or discard this patch.
code/tasks/LDAPGroupSyncTask.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -115,6 +115,9 @@
 block discarded – undo
115 115
         ));
116 116
     }
117 117
 
118
+    /**
119
+     * @param string $message
120
+     */
118 121
     protected function log($message)
119 122
     {
120 123
         $message = sprintf('[%s] ', date('Y-m-d H:i:s')) . $message;
Please login to merge, or discard this patch.
code/tasks/LDAPMemberSyncTask.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -115,6 +115,9 @@
 block discarded – undo
115 115
         ));
116 116
     }
117 117
 
118
+    /**
119
+     * @param string $message
120
+     */
118 121
     protected function log($message)
119 122
     {
120 123
         $message = sprintf('[%s] ', date('Y-m-d H:i:s')) . $message;
Please login to merge, or discard this patch.
code/control/LDAPSecurityController.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     /**
39 39
      * Factory method for the lost password form
40 40
      *
41
-     * @return Form Returns the lost password form
41
+     * @return Object Returns the lost password form
42 42
      */
43 43
     public function ChangePasswordForm()
44 44
     {
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
     }
102 102
 
103 103
     /**
104
-     * @param null $action
104
+     * @param string $action
105 105
      * @return String
106 106
      */
107 107
     public function Link($action = null)
Please login to merge, or discard this patch.
code/services/LDAPService.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
      * Get the cache objecgt used for LDAP results. Note that the default lifetime set here
84 84
      * is 8 hours, but you can change that by calling SS_Cache::set_lifetime('ldap', <lifetime in seconds>)
85 85
      *
86
-     * @return Zend_Cache_Frontend
86
+     * @return Zend_Cache_Core
87 87
      */
88 88
     public static function get_cache()
89 89
     {
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
      * Note that these get cached in-memory per-request for performance to avoid re-querying for the same results.
238 238
      *
239 239
      * @param string $dn
240
-     * @param array $attributes List of specific AD attributes to return. Empty array means return everything.
240
+     * @param string[] $attributes List of specific AD attributes to return. Empty array means return everything.
241 241
      * @return array
242 242
      */
243 243
     public function getNestedGroups($dn, $attributes = [])
@@ -444,7 +444,7 @@  discard block
 block discarded – undo
444 444
      * @param Member
445 445
      * @param array|null $data If passed, this is pre-existing AD attribute data to update the Member with.
446 446
      *            If not given, the data will be looked up by the user's GUID.
447
-     * @return bool
447
+     * @return false|null
448 448
      */
449 449
     public function updateMemberFromLDAP(Member $member, $data = null)
450 450
     {
@@ -619,7 +619,7 @@  discard block
 block discarded – undo
619 619
      * @param Group $group An existing Group or a new Group object
620 620
      * @param array $data LDAP group object data
621 621
      *
622
-     * @return bool
622
+     * @return false|null
623 623
      */
624 624
     public function updateGroupFromLDAP(Group $group, $data)
625 625
     {
Please login to merge, or discard this patch.
code/authenticators/LDAPAuthenticator.php 1 patch
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      *
68 68
      * @throws SS_HTTPResponse_Exception
69 69
      *
70
-     * @return bool|Member|void
70
+     * @return null|Member
71 71
      */
72 72
     public static function authenticate($data, Form $form = null)
73 73
     {
@@ -145,6 +145,9 @@  discard block
 block discarded – undo
145 145
         );
146 146
     }
147 147
 
148
+    /**
149
+     * @param null|Form $form
150
+     */
148 151
     private static function form_error_msg($form, $message)
149 152
     {
150 153
         if (!$form) {
Please login to merge, or discard this patch.