Completed
Pull Request — master (#140)
by Christopher
03:07 queued 55s
created
src/classes/Controller/CalendarController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 
77 77
     public function getRevokeCalendar(ServerRequestInterface $request, ResponseInterface $response, $args)
78 78
     {
79
-        $this->logger->info("Fetch settings GET '/user/me/calendar/".$args['id']."/revoke'");
79
+        $this->logger->info("Fetch settings GET '/user/me/calendar/" . $args['id'] . "/revoke'");
80 80
 
81 81
         $auth = $this->auth;
82 82
         $u = $auth->currentUser();
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 
102 102
     public function getRenderedCalendar(ServerRequestInterface $request, ResponseInterface $response, $args)
103 103
     {
104
-        $this->logger->info("Fetch calendar GET '/calendar/".$args['token'].'.'.$args['format']."'");
104
+        $this->logger->info("Fetch calendar GET '/calendar/" . $args['token'] . '.' . $args['format'] . "'");
105 105
 
106 106
         $c = CalendarTokenQuery::create()
107 107
             ->filterByToken($args['token'])
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
     {
119 119
         $getParameters = $request->getQueryParams();
120 120
 
121
-        $this->logger->info("Fetch -LEGACY- calendar GET '/calendar.php?user=".$getParameters['user'].'&token='.$getParameters['token'].'&format='.$getParameters['format']."'");
121
+        $this->logger->info("Fetch -LEGACY- calendar GET '/calendar.php?user=" . $getParameters['user'] . '&token=' . $getParameters['token'] . '&format=' . $getParameters['format'] . "'");
122 122
 
123 123
         $userId = filter_var($getParameters['user'], FILTER_VALIDATE_INT);
124 124
         $token = $getParameters['token'];
Please login to merge, or discard this patch.
src/classes/EmailAddress.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
         if (filter_var(trim($email), FILTER_VALIDATE_EMAIL)) {
14 14
             $this->email = filter_var(trim($email), FILTER_SANITIZE_EMAIL);
15 15
         } else {
16
-            throw new InvalidArgumentException('Invalid email address: '.$email);
16
+            throw new InvalidArgumentException('Invalid email address: ' . $email);
17 17
         }
18 18
     }
19 19
 
Please login to merge, or discard this patch.
public/old/includes/functions.password.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,12 +42,12 @@
 block discarded – undo
42 42
 
43 43
     $ret = '';
44 44
 
45
-    $chars = 26 * 2 + 10;   //26 (a-z) + 26 (A-Z) + 10 (0-9)
45
+    $chars = 26 * 2 + 10; //26 (a-z) + 26 (A-Z) + 10 (0-9)
46 46
     //a-z = 97-122
47 47
     //A-Z = 65-90
48 48
     //0-9 = 48-57
49 49
 
50
-    srand(make_seed());     //Seed with microseconds
50
+    srand(make_seed()); //Seed with microseconds
51 51
     //if you don't need this, you can just use srand(time());
52 52
 
53 53
     for ($i = 1; $i <= $length; $i++) {
Please login to merge, or discard this patch.
public/old/includes/functions.facebook.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -38,21 +38,21 @@  discard block
 block discarded – undo
38 38
         echo var_dump($accessToken);
39 39
     } catch (Facebook\Exceptions\FacebookResponseException $e) {
40 40
         // When Graph returns an error
41
-        echo 'Graph returned an error: '.$e->getMessage();
41
+        echo 'Graph returned an error: ' . $e->getMessage();
42 42
         exit;
43 43
     } catch (Facebook\Exceptions\FacebookSDKException $e) {
44 44
         // When validation fails or other local issues
45
-        echo 'Facebook SDK returned an error: '.$e->getMessage();
45
+        echo 'Facebook SDK returned an error: ' . $e->getMessage();
46 46
         exit;
47 47
     }
48 48
 
49 49
     if (!isset($accessToken)) {
50 50
         if ($helper->getError()) {
51 51
             header('HTTP/1.0 401 Unauthorized');
52
-            echo 'Error: '.$helper->getError()."\n";
53
-            echo 'Error Code: '.$helper->getErrorCode()."\n";
54
-            echo 'Error Reason: '.$helper->getErrorReason()."\n";
55
-            echo 'Error Description: '.$helper->getErrorDescription()."\n";
52
+            echo 'Error: ' . $helper->getError() . "\n";
53
+            echo 'Error Code: ' . $helper->getErrorCode() . "\n";
54
+            echo 'Error Reason: ' . $helper->getErrorReason() . "\n";
55
+            echo 'Error Description: ' . $helper->getErrorDescription() . "\n";
56 56
         } else {
57 57
             header('HTTP/1.0 400 Bad Request');
58 58
             echo 'Bad request';
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         try {
77 77
             $accessToken = $oAuth2Client->getLongLivedAccessToken($accessToken);
78 78
         } catch (Facebook\Exceptions\FacebookSDKException $e) {
79
-            echo '<p>Error getting long-lived access token: '.$helper->getMessage()."</p>\n\n";
79
+            echo '<p>Error getting long-lived access token: ' . $helper->getMessage() . "</p>\n\n";
80 80
             exit;
81 81
         }
82 82
     }
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
         return false;
122 122
     }
123
-    $sendNotif = $fb->post('/'.$facebookUserId.'/notifications', ['href' => $url, 'template' => $message], $appAccessToken);
123
+    $sendNotif = $fb->post('/' . $facebookUserId . '/notifications', ['href' => $url, 'template' => $message], $appAccessToken);
124 124
 
125 125
     if ($sendNotif->getHttpStatusCode() == 200) {
126 126
         return true;
Please login to merge, or discard this patch.
public/old/emailEvent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
         $statusMessage = 'Sent successfully';
54 54
     } else {
55 55
         foreach ($sent as $errorMessage) {
56
-            $statusMessage .= '<p>'.$errorMessage.'</p>';
56
+            $statusMessage .= '<p>' . $errorMessage . '</p>';
57 57
         }
58 58
     }
59 59
 
Please login to merge, or discard this patch.
public/old/plugins/datatables/extensions/Scroller/examples/data/ssp.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -29,11 +29,11 @@
 block discarded – undo
29 29
 // parameter represents the DataTables column identifier. In this case simple
30 30
 // indexes
31 31
 $columns = [
32
-    ['db' => 'id',         'dt' => 0],
33
-    ['db' => 'firstname',  'dt' => 1],
34
-    ['db' => 'surname',    'dt' => 2],
35
-    ['db' => 'zip',        'dt' => 3],
36
-    ['db' => 'country',    'dt' => 4],
32
+    ['db' => 'id', 'dt' => 0],
33
+    ['db' => 'firstname', 'dt' => 1],
34
+    ['db' => 'surname', 'dt' => 2],
35
+    ['db' => 'zip', 'dt' => 3],
36
+    ['db' => 'country', 'dt' => 4],
37 37
 ];
38 38
 
39 39
 // SQL server connection information
Please login to merge, or discard this patch.
public/old/notification.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 } else {
34 34
     $notificationId = getQueryStringForKey('id');
35 35
     $referer = getQueryStringForKey('click');
36
-    $_SESSION['redirectUrl'] = siteSettings()->getSiteUrl().'/notification.php?id='.$notificationId.'&click='.$referer;
36
+    $_SESSION['redirectUrl'] = siteSettings()->getSiteUrl() . '/notification.php?id=' . $notificationId . '&click=' . $referer;
37 37
     header('Location: login.php');
38 38
     exit;
39 39
 }
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     // redir if notification has URL
61 61
     $redir = notificationLink($notificationId);
62 62
     if (!empty($redir)) {
63
-        header('Location: '.$redir);
63
+        header('Location: ' . $redir);
64 64
     }
65 65
 
66 66
     // find notification
Please login to merge, or discard this patch.
src/classes/Controller/UserController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
     public function getUserEditForm(ServerRequestInterface $request, ResponseInterface $response, $args)
99 99
     {
100
-        $this->logger->info("Fetch user GET '/user/".$args['id']."/edit'");
100
+        $this->logger->info("Fetch user GET '/user/" . $args['id'] . "/edit'");
101 101
         $u = UserQuery::create()->findPK($args['id']);
102 102
 
103 103
         if (is_null($u)) {
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 
113 113
     public function getUser(ServerRequestInterface $request, ResponseInterface $response, $args)
114 114
     {
115
-        $this->logger->info("Fetch user GET '/user/".$args['id']."'");
115
+        $this->logger->info("Fetch user GET '/user/" . $args['id'] . "'");
116 116
         $u = UserQuery::create()->findPK($args['id']);
117 117
 
118 118
         if (is_null($u)) {
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 
128 128
     public function getUserWidgetOnly(ServerRequestInterface $request, ResponseInterface $response, $args)
129 129
     {
130
-        $this->logger->info("Fetch user GET '/user/".$args['id']."'");
130
+        $this->logger->info("Fetch user GET '/user/" . $args['id'] . "'");
131 131
         $u = UserQuery::create()->findPK($args['id']);
132 132
 
133 133
         if (is_null($u)) {
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 
143 143
     public function getUserPasswordForm(ServerRequestInterface $request, ResponseInterface $response, $args)
144 144
     {
145
-        $this->logger->info("Fetch user GET '/user/".$args['id']."/password'");
145
+        $this->logger->info("Fetch user GET '/user/" . $args['id'] . "/password'");
146 146
         $u = UserQuery::create()->findPK($args['id']);
147 147
 
148 148
         if (is_null($u)) {
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 
158 158
     public function postUserPasswordChange(ServerRequestInterface $request, ResponseInterface $response, $args)
159 159
     {
160
-        $this->logger->info("Create user POST '/user/".$args['id']."/password'");
160
+        $this->logger->info("Create user POST '/user/" . $args['id'] . "/password'");
161 161
 
162 162
         $data = $request->getParsedBody();
163 163
 
Please login to merge, or discard this patch.
src/classes/AuthProvider/Callback/FacebookAuth.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
         $path = $this->router->pathFor('login-callback', ['provider' => $this->getAuthProviderSlug()]);
45 45
 
46
-        $url = $this->baseUrl.$path;
46
+        $url = $this->baseUrl . $path;
47 47
 
48 48
         return $helper->getLoginUrl($url, $this->permissions);
49 49
     }
@@ -56,12 +56,12 @@  discard block
 block discarded – undo
56 56
             $accessToken = $helper->getAccessToken();
57 57
         } catch (FacebookResponseException $e) {
58 58
             // When Graph returns an error
59
-            echo 'Graph returned an error: '.$e->getMessage();
59
+            echo 'Graph returned an error: ' . $e->getMessage();
60 60
 
61 61
             return false;
62 62
         } catch (FacebookSDKException $e) {
63 63
             // When validation fails or other local issues
64
-            echo 'Facebook SDK returned an error: '.$e->getMessage();
64
+            echo 'Facebook SDK returned an error: ' . $e->getMessage();
65 65
 
66 66
             return false;
67 67
         }
@@ -69,10 +69,10 @@  discard block
 block discarded – undo
69 69
         if (!isset($accessToken)) {
70 70
             if ($helper->getError()) {
71 71
                 header('HTTP/1.0 401 Unauthorized');
72
-                echo 'Error: '.$helper->getError()."\n";
73
-                echo 'Error Code: '.$helper->getErrorCode()."\n";
74
-                echo 'Error Reason: '.$helper->getErrorReason()."\n";
75
-                echo 'Error Description: '.$helper->getErrorDescription()."\n";
72
+                echo 'Error: ' . $helper->getError() . "\n";
73
+                echo 'Error Code: ' . $helper->getErrorCode() . "\n";
74
+                echo 'Error Reason: ' . $helper->getErrorReason() . "\n";
75
+                echo 'Error Description: ' . $helper->getErrorDescription() . "\n";
76 76
             } else {
77 77
                 header('HTTP/1.0 400 Bad Request');
78 78
                 echo 'Bad request';
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
             try {
99 99
                 $accessToken = $oAuth2Client->getLongLivedAccessToken($accessToken);
100 100
             } catch (FacebookSDKException $e) {
101
-                echo '<p>Error getting long-lived access token: '.$helper->getMessage()."</p>\n\n";
101
+                echo '<p>Error getting long-lived access token: ' . $helper->getMessage() . "</p>\n\n";
102 102
 
103 103
                 return false;
104 104
             }
@@ -122,10 +122,10 @@  discard block
 block discarded – undo
122 122
             // Returns a `Facebook\FacebookResponse` object
123 123
             $response = $this->facebook->get('/me?fields=id,name,email', $accessToken);
124 124
         } catch (Facebook\Exceptions\FacebookResponseException $e) {
125
-            echo 'Graph returned an error: '.$e->getMessage();
125
+            echo 'Graph returned an error: ' . $e->getMessage();
126 126
             exit;
127 127
         } catch (Facebook\Exceptions\FacebookSDKException $e) {
128
-            echo 'Facebook SDK returned an error: '.$e->getMessage();
128
+            echo 'Facebook SDK returned an error: ' . $e->getMessage();
129 129
             exit;
130 130
         }
131 131
 
Please login to merge, or discard this patch.