Completed
Push — master ( d16af1...c982ac )
by Patrick
01:47
created
api/v1/class.GroupsAPI.php 3 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -49,6 +49,9 @@
 block discarded – undo
49 49
         return $response->withJson($groups);
50 50
     }
51 51
 
52
+    /**
53
+     * @param boolean $directOnly
54
+     */
52 55
     private function expandGroupMembers($group, $odata, $directOnly)
53 56
     {
54 57
         if($odata->expand !== false && in_array('member', $odata->expand))
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
         $auth = AuthProvider::getInstance();
46 46
         $odata = $request->getAttribute('odata', new \ODataParams(array()));
47 47
         $groups = $auth->getGroupsByFilter($odata->filter, $odata->select, $odata->top, $odata->skip, 
48
-                                           $odata->orderby);
48
+                                            $odata->orderby);
49 49
         return $response->withJson($groups);
50 50
     }
51 51
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
104 104
         return $response->withJson($group);
105 105
     }
106 106
 
107
-    protected function serializeArray(&$res, $array, $keys, $type=false)
107
+    protected function serializeArray(&$res, $array, $keys, $type = false)
108 108
     {
109 109
         $count = count($array);
110 110
         for($i = 0; $i < $count; $i++)
Please login to merge, or discard this patch.
api/v1/class.AreasAPI.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
         $dataTable = DataSetFactory::getDataTableByNames('profiles', 'position');
44 44
         $odata = $request->getAttribute('odata', new \ODataParams(array()));
45 45
         $leads = $dataTable->read(new \Data\Filter("area eq '".$args['name']."'"), $odata->select, $odata->top,
46
-                                  $odata->skip, $odata->orderby);
46
+                                    $odata->skip, $odata->orderby);
47 47
         if(empty($leads))
48 48
         {
49 49
             return $response->withStatus(404);
Please login to merge, or discard this patch.
api/v1/class.UsersAPI.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
         {
48 48
             $auth = AuthProvider::getInstance();
49 49
             $users = $auth->getUsersByFilter($odata->filter, $odata->select, $odata->top, $odata->skip, 
50
-                                             $odata->orderby);
50
+                                                $odata->orderby);
51 51
         }
52 52
         return $response->withJson($users);
53 53
     }
Please login to merge, or discard this patch.
Doc Comments   +10 added lines patch added patch discarded remove patch
@@ -54,6 +54,9 @@  discard block
 block discarded – undo
54 54
         return $response->withJson($users);
55 55
     }
56 56
 
57
+    /**
58
+     * @param boolean $message
59
+     */
57 60
     protected function validateCanCreateUser($proposedUser, $auth, &$message)
58 61
     {
59 62
         $user = $auth->getUsersByFilter(new \Data\Filter('mail eq '.$proposedUser['mail']));
@@ -224,6 +227,9 @@  discard block
 block discarded – undo
224 227
         }
225 228
     }
226 229
 
230
+    /**
231
+     * @param Exception $e
232
+     */
227 233
     protected function exceptionCodeToHttpCode($e)
228 234
     {
229 235
         if($e->getCode() === 3)
@@ -370,6 +376,10 @@  discard block
 block discarded – undo
370 376
         return $response->withJson(array('success'=>true));
371 377
     }
372 378
 
379
+    /**
380
+     * @param Data\Filter $filter
381
+     * @param boolean $pending
382
+     */
373 383
     protected function getAllUsersByFilter($filter, &$pending)
374 384
     {
375 385
         $auth = AuthProvider::getInstance();
Please login to merge, or discard this patch.
oauth2callback.php 1 patch
Switch Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -52,21 +52,21 @@  discard block
 block discarded – undo
52 52
 
53 53
 switch($src)
54 54
 {
55
-    case 'google':
56
-        doAuthByType('Auth\GoogleAuthenticator', $src, $auth, $ref);
57
-        break;
58
-    case 'twitter':
59
-        $twitter = $auth->getMethodByName('Auth\TwitterAuthenticator');
60
-        if(!isset($_GET['oauth_token']) || !isset($_GET['oauth_verifier']))
61
-        {
62
-            $twitter->redirect();
63
-            die();
64
-        }
65
-        else
66
-        {
67
-            $twitter->authenticate($_GET['oauth_token'], $_GET['oauth_verifier'], $current_user);
68
-            switch($res)
55
+        case 'google':
56
+            doAuthByType('Auth\GoogleAuthenticator', $src, $auth, $ref);
57
+            break;
58
+        case 'twitter':
59
+            $twitter = $auth->getMethodByName('Auth\TwitterAuthenticator');
60
+            if(!isset($_GET['oauth_token']) || !isset($_GET['oauth_verifier']))
61
+            {
62
+                $twitter->redirect();
63
+                die();
64
+            }
65
+            else
69 66
             {
67
+                $twitter->authenticate($_GET['oauth_token'], $_GET['oauth_verifier'], $current_user);
68
+                switch($res)
69
+                {
70 70
                 case \Auth\Authenticator::SUCCESS:
71 71
                     header('Location: '.$ref);
72 72
                     die();
@@ -77,15 +77,15 @@  discard block
 block discarded – undo
77 77
                 case \Auth\Authenticator::ALREADY_PRESENT:
78 78
                     header('Location: user_exists.php?src=twitter&uid='.$current_user->uid);
79 79
                     die();
80
-            }
80
+                }
81 81
         }
82 82
         break;
83
-    case 'gitlab':
84
-        doAuthByType('Auth\OAuth2\GitLabAuthenticator', $src, $auth, $ref);
85
-        break;
86
-        //Generic OAuth...
87
-    default:
88
-        print_r($_SERVER);
89
-        break;
83
+        case 'gitlab':
84
+            doAuthByType('Auth\OAuth2\GitLabAuthenticator', $src, $auth, $ref);
85
+            break;
86
+            //Generic OAuth...
87
+        default:
88
+            print_r($_SERVER);
89
+            break;
90 90
 }
91 91
 /* vim: set tabstop=4 shiftwidth=4 expandtab: */
Please login to merge, or discard this patch.