Completed
Branch master (9abb37)
by Patrick
03:30
created
api/v1/aws.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -12,6 +12,9 @@  discard block
 block discarded – undo
12 12
     $app->post('/test', 'testX');
13 13
 }
14 14
 
15
+/**
16
+ * @param string $function
17
+ */
15 18
 function sendToBackend($function, $payload)
16 19
 {
17 20
     $context = new ZMQContext();
@@ -72,6 +75,9 @@  discard block
 block discarded – undo
72 75
     }
73 76
 }
74 77
 
78
+/**
79
+ * @param string $test
80
+ */
75 81
 function endswith($string, $test)
76 82
 {
77 83
     $strlen = strlen($string);
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 {
80 80
     $strlen = strlen($string);
81 81
     $testlen = strlen($test);
82
-    if ($testlen > $strlen)
82
+    if($testlen > $strlen)
83 83
     {
84 84
         return false;
85 85
     }
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
 function getDestinationsForID($id)
90 90
 {
91
-    if(strcasecmp($id,'pboyd') === 0)
91
+    if(strcasecmp($id, 'pboyd') === 0)
92 92
     {
93 93
         return array('[email protected]');
94 94
     }
Please login to merge, or discard this patch.
oauth2callback.php 1 patch
Switch Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -24,18 +24,18 @@  discard block
 block discarded – undo
24 24
 
25 25
 switch($src)
26 26
 {
27
-    case 'google':
28
-        $google = $auth->getAuthenticator('Auth\GoogleAuthenticator');
29
-        if(!isset($_GET['code']))
30
-        {
31
-            $google->redirect();
32
-            die();
33
-        }
34
-        else
35
-        {
36
-            $res = $google->authenticate($_GET['code'], $current_user);
37
-            switch($res)
27
+        case 'google':
28
+            $google = $auth->getAuthenticator('Auth\GoogleAuthenticator');
29
+            if(!isset($_GET['code']))
30
+            {
31
+                $google->redirect();
32
+                die();
33
+            }
34
+            else
38 35
             {
36
+                $res = $google->authenticate($_GET['code'], $current_user);
37
+                switch($res)
38
+                {
39 39
                 case \Auth\Authenticator::SUCCESS:
40 40
                     header('Location: '.$ref);
41 41
                     die();
@@ -46,21 +46,21 @@  discard block
 block discarded – undo
46 46
                 case \Auth\Authenticator::ALREADY_PRESENT:
47 47
                     header('Location: user_exists.php?src=google&uid='.$current_user->getUid());
48 48
                     die();
49
-            }
49
+                }
50 50
         }
51 51
         break;
52
-    case 'twitter':
53
-        $twitter = $auth->getAuthenticator('Auth\TwitterAuthenticator');
54
-        if(!isset($_GET['oauth_token']) || !isset($_GET['oauth_verifier']))
55
-        {
56
-            $twitter->redirect();
57
-            die();
58
-        }
59
-        else
60
-        {
61
-            $twitter->authenticate($_GET['oauth_token'], $_GET['oauth_verifier'], $current_user);
62
-            switch($res)
52
+        case 'twitter':
53
+            $twitter = $auth->getAuthenticator('Auth\TwitterAuthenticator');
54
+            if(!isset($_GET['oauth_token']) || !isset($_GET['oauth_verifier']))
55
+            {
56
+                $twitter->redirect();
57
+                die();
58
+            }
59
+            else
63 60
             {
61
+                $twitter->authenticate($_GET['oauth_token'], $_GET['oauth_verifier'], $current_user);
62
+                switch($res)
63
+                {
64 64
                 case \Auth\Authenticator::SUCCESS:
65 65
                     header('Location: '.$ref);
66 66
                     die();
@@ -71,21 +71,21 @@  discard block
 block discarded – undo
71 71
                 case \Auth\Authenticator::ALREADY_PRESENT:
72 72
                     header('Location: user_exists.php?src=twitter&uid='.$current_user->getUid());
73 73
                     die();
74
-            }
74
+                }
75 75
         }
76 76
         break;
77
-    case 'gitlab':
78
-        $gitlab = $auth->getAuthenticator('Auth\OAuth2\GitLabAuthenticator');
79
-        if(!isset($_GET['code']))
80
-        {
81
-            $google->redirect();
82
-            die();
83
-        }
84
-        else
85
-        {
86
-            $res = $gitlab->authenticate($_GET['code'], $current_user);
87
-            switch($res)
77
+        case 'gitlab':
78
+            $gitlab = $auth->getAuthenticator('Auth\OAuth2\GitLabAuthenticator');
79
+            if(!isset($_GET['code']))
80
+            {
81
+                $google->redirect();
82
+                die();
83
+            }
84
+            else
88 85
             {
86
+                $res = $gitlab->authenticate($_GET['code'], $current_user);
87
+                switch($res)
88
+                {
89 89
                 case \Auth\Authenticator::SUCCESS:
90 90
                     header('Location: '.$ref);
91 91
                     die();
@@ -96,11 +96,11 @@  discard block
 block discarded – undo
96 96
                 case \Auth\Authenticator::ALREADY_PRESENT:
97 97
                     header('Location: user_exists.php?src=gitlab&uid='.$current_user->getUid());
98 98
                     die();
99
-            }
99
+                }
100 100
         }
101 101
     //Generic OAuth...
102
-    default:
103
-        print_r($_SERVER);
104
-        break;
102
+        default:
103
+            print_r($_SERVER);
104
+            break;
105 105
 }
106 106
 ?>
Please login to merge, or discard this patch.
lead/class.ProfilesLeadPage.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -42,24 +42,24 @@
 block discarded – undo
42 42
 
43 43
     function add_links()
44 44
     {
45
-         $dirMenu = array(
46
-             'All' => 'directory.php',
47
-             'AAR' => 'directory.php?filter=aar',
48
-             'AFs' => 'directory.php?filter=af',
49
-             'CC'  => 'directory.php?filter=cc',
50
-             '360/24/7 Department' => 'directory.php?filter=360',
51
-             'Art' => 'directory.php?filter=Art',
52
-             'City Planning' => 'directory.php?filter=CityPlanning',
53
-             'Communications' => 'directory.php?filter=Comm',
54
-             'Genesis' => 'directory.php?filter=Genesis',
55
-             'Safety' => 'directory.php?filter=Safety',
56
-             'Site-Ops' => 'directory.php?filter=site-ops',
57
-             'Site Prep' => 'directory.php?filter=siteprep',
58
-             'Site Sign-Off' => 'directory.php?filter=sign-off',
59
-             'Volunteer Coordinator' => 'directory.php?filter=vc'
60
-         );
61
-         $this->addLink('<span class="fa fa-dashboard"></span> Dashboard', 'index.php');
62
-         $this->addLink('<span class="fa fa-th-list"></span> Directory', false, $dirMenu);
45
+            $dirMenu = array(
46
+                'All' => 'directory.php',
47
+                'AAR' => 'directory.php?filter=aar',
48
+                'AFs' => 'directory.php?filter=af',
49
+                'CC'  => 'directory.php?filter=cc',
50
+                '360/24/7 Department' => 'directory.php?filter=360',
51
+                'Art' => 'directory.php?filter=Art',
52
+                'City Planning' => 'directory.php?filter=CityPlanning',
53
+                'Communications' => 'directory.php?filter=Comm',
54
+                'Genesis' => 'directory.php?filter=Genesis',
55
+                'Safety' => 'directory.php?filter=Safety',
56
+                'Site-Ops' => 'directory.php?filter=site-ops',
57
+                'Site Prep' => 'directory.php?filter=siteprep',
58
+                'Site Sign-Off' => 'directory.php?filter=sign-off',
59
+                'Volunteer Coordinator' => 'directory.php?filter=vc'
60
+            );
61
+            $this->addLink('<span class="fa fa-dashboard"></span> Dashboard', 'index.php');
62
+            $this->addLink('<span class="fa fa-th-list"></span> Directory', false, $dirMenu);
63 63
     }
64 64
 
65 65
     function add_header()
Please login to merge, or discard this patch.