Completed
Push — develop ( 36bd7b...b93987 )
by Patrick
01:35
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.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.
api/v1/class.AreasAPI.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,12 +32,12 @@
 block discarded – undo
32 32
         if($args['name'] === '*')
33 33
         {
34 34
             $leads = $dataTable->read($odata->filter, $odata->select, $odata->top,
35
-                                  $odata->skip, $odata->orderby);
35
+                                    $odata->skip, $odata->orderby);
36 36
         }
37 37
         else
38 38
         {
39 39
             $leads = $dataTable->read(new \Data\Filter("area eq '".$args['name']."'"), $odata->select, $odata->top,
40
-                                  $odata->skip, $odata->orderby);
40
+                                    $odata->skip, $odata->orderby);
41 41
         }
42 42
         if(empty($leads))
43 43
         {
Please login to merge, or discard this patch.
profile.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,21 +36,21 @@
 block discarded – undo
36 36
 {
37 37
     $mails = $page->user->allMail;
38 38
     $count = count($mails);
39
-    $page->body.='
39
+    $page->body .= '
40 40
             <label for="allMail" class="col-sm-2 control-label">Registered Emails:</label>
41 41
             <div class="col-sm-10">';
42 42
     for($i = 0; $i < $count; $i++)
43 43
     {
44
-        $page->body.='<div class="input-group">
44
+        $page->body .= '<div class="input-group">
45 45
                         <input type="text" class="form-control" value="'.$mails[$i].'" readonly>
46 46
                         <div class="input-group-append">
47 47
                           <button class="btn btn-outline-danger" type="button" onClick="removeEmail(\''.$mails[$i].'\')"><i class="fas fa-minus"></i></button>
48 48
                         </div>
49 49
                       </div>';
50 50
     }
51
-    $page->body.='</div>';
51
+    $page->body .= '</div>';
52 52
 }
53
-$page->body.='
53
+$page->body .= '
54 54
             <label for="mail" class="col-sm-2 control-label">Email:</label>
55 55
             <div class="col-sm-10">
56 56
                 <input class="form-control" id="mail" name="mail" type="text" readonly/>
Please login to merge, or discard this patch.
Autoload.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -9,22 +9,22 @@  discard block
 block discarded – undo
9 9
 * @license http://www.apache.org/licenses/ Apache 2.0 License
10 10
  */
11 11
 
12
-if(file_exists(__DIR__ . '/vendor/autoload.php'))
12
+if(file_exists(__DIR__.'/vendor/autoload.php'))
13 13
 {
14
-    require(__DIR__ . '/vendor/autoload.php');
14
+    require(__DIR__.'/vendor/autoload.php');
15 15
 }
16 16
 
17
-spl_autoload_register(function ($class) {
17
+spl_autoload_register(function($class) {
18 18
 
19 19
     // project-specific namespace prefix
20 20
     $prefix = 'Flipside\\Profiles\\';
21 21
 
22 22
     // base directory for the namespace prefix
23
-    $base_dir = __DIR__ . '/';
23
+    $base_dir = __DIR__.'/';
24 24
 
25 25
     // does the class use the namespace prefix?
26 26
     $len = strlen($prefix);
27
-    if (strncmp($prefix, $class, $len) !== 0) {
27
+    if(strncmp($prefix, $class, $len) !== 0) {
28 28
         // no, move to the next registered autoloader
29 29
         return;
30 30
     }
@@ -35,10 +35,10 @@  discard block
 block discarded – undo
35 35
     // replace the namespace prefix with the base directory, replace namespace
36 36
     // separators with directory separators in the relative class name, append
37 37
     // with .php
38
-    $file = $base_dir . str_replace('\\', '/', $relative_class) . '.php';
38
+    $file = $base_dir.str_replace('\\', '/', $relative_class).'.php';
39 39
 
40 40
     // if the file exists, require it
41
-    if (file_exists($file)) {
41
+    if(file_exists($file)) {
42 42
         require $file;
43 43
     }
44 44
 });
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,7 +14,8 @@  discard block
 block discarded – undo
14 14
     require(__DIR__ . '/vendor/autoload.php');
15 15
 }
16 16
 
17
-spl_autoload_register(function ($class) {
17
+spl_autoload_register(function ($class)
18
+{
18 19
 
19 20
     // project-specific namespace prefix
20 21
     $prefix = 'Flipside\\Profiles\\';
@@ -24,7 +25,8 @@  discard block
 block discarded – undo
24 25
 
25 26
     // does the class use the namespace prefix?
26 27
     $len = strlen($prefix);
27
-    if (strncmp($prefix, $class, $len) !== 0) {
28
+    if (strncmp($prefix, $class, $len) !== 0)
29
+    {
28 30
         // no, move to the next registered autoloader
29 31
         return;
30 32
     }
@@ -38,7 +40,8 @@  discard block
 block discarded – undo
38 40
     $file = $base_dir . str_replace('\\', '/', $relative_class) . '.php';
39 41
 
40 42
     // if the file exists, require it
41
-    if (file_exists($file)) {
43
+    if (file_exists($file))
44
+    {
42 45
         require $file;
43 46
     }
44 47
 });
Please login to merge, or discard this patch.
lead/index.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,17 +18,17 @@
 block discarded – undo
18 18
 $aar_count = 0;
19 19
 if($aarGroup !== false)
20 20
 {
21
-    $aar_count  = $aarGroup->member_count();
21
+    $aar_count = $aarGroup->member_count();
22 22
 }
23 23
 $af_count = 0;
24 24
 if($afGroup !== false)
25 25
 {
26
-    $af_count   = $afGroup->member_count();
26
+    $af_count = $afGroup->member_count();
27 27
 }
28 28
 $cc_count = 0;
29 29
 if($ccGroup !== false)
30 30
 {
31
-    $cc_count   = $ccGroup->member_count();
31
+    $cc_count = $ccGroup->member_count();
32 32
 }
33 33
 
34 34
 $page->content['cards'] = array();
Please login to merge, or discard this patch.