GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Pull Request — master (#78)
by Leonhard
02:29
created
app/sog/Dashboard/GuestControllerProvider.php 1 patch
Braces   +8 added lines, -5 removed lines patch added patch discarded remove patch
@@ -85,7 +85,9 @@  discard block
 block discarded – undo
85 85
             $ownedGroups = $app['ldap']->getOwnedGroups($user->getAttributes()['dn'])->toArray();
86 86
 
87 87
             $selGroup = $request->request->get('ou');
88
-            if (!isset($selGroup)) $selGroup = $ownedGroups[0]['ou'][0];
88
+            if (!isset($selGroup)) {
89
+                $selGroup = $ownedGroups[0]['ou'][0];
90
+            }
89 91
             $selGroupDN = sprintf('ou=%s,%s', $selGroup, $app['config']['ldap.subtrees']['groups']);
90 92
 
91 93
             foreach ($ownedGroups as $og) {
@@ -151,9 +153,10 @@  discard block
 block discarded – undo
151 153
     private function retrieveGuestByMail($mail)
152 154
     {
153 155
         $info = $this->app['ldap']->getMemberByMail($mail, 'mail');
154
-        if (is_array($info))
155
-            return $info['dn'];
156
-        else
157
-            return false;
156
+        if (is_array($info)) {
157
+                    return $info['dn'];
158
+        } else {
159
+                    return false;
160
+        }
158 161
     }
159 162
 }
160 163
\ No newline at end of file
Please login to merge, or discard this patch.
app/sog/Dashboard/LdapAdapter.php 1 patch
Braces   +7 added lines, -5 removed lines patch added patch discarded remove patch
@@ -32,7 +32,8 @@  discard block
 block discarded – undo
32 32
      * @param $subtrees
33 33
      * @throws LdapException
34 34
      */
35
-    public function __construct($options, $subtrees) {
35
+    public function __construct($options, $subtrees)
36
+    {
36 37
         parent::__construct($options);
37 38
         $this->subtrees = $subtrees;
38 39
     }
@@ -200,10 +201,11 @@  discard block
 block discarded – undo
200 201
             ['dn', 'uid', 'cn', 'displayName', $attribute],
201 202
             'dn'
202 203
         );
203
-        if ($results->count() > 0)
204
-            return $results->getFirst();
205
-        else
206
-            return false;
204
+        if ($results->count() > 0) {
205
+                    return $results->getFirst();
206
+        } else {
207
+                    return false;
208
+        }
207 209
     }
208 210
 
209 211
     /**
Please login to merge, or discard this patch.
public/index.php 1 patch
Braces   +31 added lines, -11 removed lines patch added patch discarded remove patch
@@ -66,7 +66,8 @@  discard block
 block discarded – undo
66 66
             $groupDN = sprintf('ou=%s,%s', $groupOU, $app['config']['ldap.subtrees']['groups']);
67 67
             $groupAttr = $app['ldap']->getEntry($groupDN, ['cn', 'owner']);
68 68
 
69
-            switch ($action) {
69
+            switch ($action)
70
+            {
70 71
                 case 'quit':
71 72
                     try {
72 73
                         if (in_array($userDN, $groupAttr['owner'])) {
@@ -113,15 +114,23 @@  discard block
 block discarded – undo
113 114
         $groupList = [];
114 115
         foreach ($groups as $g) {
115 116
             $roles = [];
116
-            if (isset($g['owner']) && in_array($userDN, $g['owner'])) $roles[] = 'owner';
117
-            if (isset($g['member']) && in_array($userDN, $g['member'])) $roles[] = 'member';
118
-            if (isset($g['pending']) && in_array($userDN, $g['pending'])) $roles[] = 'pending';
117
+            if (isset($g['owner']) && in_array($userDN, $g['owner'])) {
118
+                $roles[] = 'owner';
119
+            }
120
+            if (isset($g['member']) && in_array($userDN, $g['member'])) {
121
+                $roles[] = 'member';
122
+            }
123
+            if (isset($g['pending']) && in_array($userDN, $g['pending'])) {
124
+                $roles[] = 'pending';
125
+            }
119 126
 
120 127
             $owners = [];
121 128
             if (isset($g['owner'])) {
122 129
                 for ($j = 0; $j < count($g['owner']); $j++) {
123 130
                     $o = $app['ldap']->getEntry($g['owner'][$j], ['cn', 'mail']);
124
-                    if (isset($o)) $owners[] = $o;
131
+                    if (isset($o)) {
132
+                        $owners[] = $o;
133
+                    }
125 134
                 }
126 135
             }
127 136
 
@@ -156,7 +165,9 @@  discard block
 block discarded – undo
156 165
             return new \Symfony\Component\HttpFoundation\RedirectResponse('/members/Benutzerdaten');
157 166
         }
158 167
 
159
-        if (!isset($selGroup)) $selGroup = $ownedGroups[0]['ou'][0];
168
+        if (!isset($selGroup)) {
169
+            $selGroup = $ownedGroups[0]['ou'][0];
170
+        }
160 171
         $selGroupDN = sprintf('ou=%s,%s', $selGroup, $app['config']['ldap.subtrees']['groups']);
161 172
 
162 173
         $action = $request->request->get('manage-action');
@@ -179,7 +190,8 @@  discard block
 block discarded – undo
179 190
 
180 191
                 $groupAttr = $app['ldap']->getEntry($selGroupDN, ['owner']);
181 192
 
182
-                switch ($action) {
193
+                switch ($action)
194
+                {
183 195
                     case 'activate':
184 196
                         try {
185 197
                             $app['ldap']->activateMember($userID);
@@ -232,11 +244,19 @@  discard block
 block discarded – undo
232 244
         $memberList = [];
233 245
         foreach ($allUsers as $u) {
234 246
             $roles = [];
235
-            if (isset($groupAttr['owner']) && in_array($u['dn'], $groupAttr['owner'])) $roles[] = 'owner';
236
-            if (isset($groupAttr['member']) && in_array($u['dn'], $groupAttr['member'])) $roles[] = 'member';
237
-            if (isset($groupAttr['pending']) && in_array($u['dn'], $groupAttr['pending'])) $roles[] = 'pending';
247
+            if (isset($groupAttr['owner']) && in_array($u['dn'], $groupAttr['owner'])) {
248
+                $roles[] = 'owner';
249
+            }
250
+            if (isset($groupAttr['member']) && in_array($u['dn'], $groupAttr['member'])) {
251
+                $roles[] = 'member';
252
+            }
253
+            if (isset($groupAttr['pending']) && in_array($u['dn'], $groupAttr['pending'])) {
254
+                $roles[] = 'pending';
255
+            }
238 256
             // we handle inactive members like the other cases, the UI is just so similar
239
-            if (strstr($u['dn'], 'ou=inactive')) $roles[] = 'inactive';
257
+            if (strstr($u['dn'], 'ou=inactive')) {
258
+                $roles[] = 'inactive';
259
+            }
240 260
 
241 261
             $listentry = array(
242 262
                 'name' => $u['cn'][0],
Please login to merge, or discard this patch.