Passed
Pull Request — master (#5)
by Tim
01:22
created
lib/Cas/Protocol/Cas20.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
     private function workAroundForBuggyJasigXmlParser($xmlString)
175 175
     {
176 176
         // when will people stop hand coding xml handling....?
177
-        return str_replace('><', '>' . PHP_EOL . '<', str_replace(PHP_EOL, '', $xmlString));
177
+        return str_replace('><', '>'.PHP_EOL.'<', str_replace(PHP_EOL, '', $xmlString));
178 178
     }
179 179
 
180 180
     private function generateCas20Attribute($xmlDocument, $attributeName, $attributeValue)
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
         $attributeValueNode = $xmlDocument->createTextNode($this->base64EncodeAttributes ?
183 183
             base64_encode($attributeValue) : $attributeValue);
184 184
 
185
-        $attributeElement = $xmlDocument->createElement('cas:' . $attributeName);
185
+        $attributeElement = $xmlDocument->createElement('cas:'.$attributeName);
186 186
 
187 187
         $attributeElement->appendChild($attributeValueNode);
188 188
 
Please login to merge, or discard this patch.
lib/Cas/Ticket/SQLTicketStore.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         $dsn = $storeConfig->getString('dsn');
40 40
         $username = $storeConfig->getString('username');
41 41
         $password = $storeConfig->getString('password');
42
-        $options =  $storeConfig->getArray('options', []);
42
+        $options = $storeConfig->getArray('options', []);
43 43
         $this->prefix = $storeConfig->getString('prefix', '');
44 44
 
45 45
         $this->pdo = new PDO($dsn, $username, $password, $options);
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         }
107 107
 
108 108
         while (($row = $fetchTableVersion->fetch(PDO::FETCH_ASSOC)) !== false) {
109
-            $this->tableVersions[$row['_name']] = (int)$row['_version'];
109
+            $this->tableVersions[$row['_name']] = (int) $row['_version'];
110 110
         }
111 111
     }
112 112
 
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
             $insertQuery->execute($data);
196 196
             return;
197 197
         } catch (\PDOException $e) {
198
-            $ecode = (string)$e->getCode();
198
+            $ecode = (string) $e->getCode();
199 199
             switch ($ecode) {
200 200
                 case '23505': /* PostgreSQL */
201 201
                     break;
Please login to merge, or discard this patch.
config-templates/module_casserver.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,13 +20,13 @@  discard block
 block discarded – undo
20 20
         ]
21 21
     ],
22 22
     'legal_service_urls' => [
23
-         //Any service url string matching any of the following prefixes is accepted
23
+            //Any service url string matching any of the following prefixes is accepted
24 24
         'http://host1.domain:1234/path1',
25 25
         'https://host2.domain:5678/path2/path3',
26 26
     ],
27 27
 
28 28
     'legal_target_service_urls' => [
29
-         //Any target service url string matching any of the following prefixes is accepted
29
+            //Any target service url string matching any of the following prefixes is accepted
30 30
         'http://host3.domain:4321/path4',
31 31
         'https://host4.domain:8765/path5/path6',
32 32
         // So is regex
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     ],
35 35
 
36 36
     'ticketstore' => [
37
-         //defaults to filesystem ticket store using the directory 'ticketcache'
37
+            //defaults to filesystem ticket store using the directory 'ticketcache'
38 38
         'class' => 'casserver:FileSystemTicketStore', //Not intended for production
39 39
         'directory' => 'ticketcache',
40 40
 
Please login to merge, or discard this patch.
www/logout.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 if (!$casconfig->getValue('enable_logout', false)) {
30 30
     $message = 'Logout not allowed';
31 31
 
32
-    \SimpleSAML\Logger::debug('casserver:' . $message);
32
+    \SimpleSAML\Logger::debug('casserver:'.$message);
33 33
 
34 34
     throw new \Exception($message);
35 35
 }
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 if ($skipLogoutPage && !array_key_exists('url', $_GET)) {
40 40
     $message = 'Required URL query parameter [url] not provided. (CAS Server)';
41 41
 
42
-    \SimpleSAML\Logger::debug('casserver:' . $message);
42
+    \SimpleSAML\Logger::debug('casserver:'.$message);
43 43
 
44 44
     throw new \Exception($message);
45 45
 }
Please login to merge, or discard this patch.
www/login.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@
 block discarded – undo
186 186
 
187 187
     \SimpleSAML\Utils\HTTP::redirectTrustedURL(\SimpleSAML\Utils\HTTP::addURLParameters($_GET['service'], $parameters));
188 188
 } else {
189
-   \ SimpleSAML\Utils\HTTP::redirectTrustedURL(
189
+    \ SimpleSAML\Utils\HTTP::redirectTrustedURL(
190 190
         \SimpleSAML\Utils\HTTP::addURLParameters(SimpleSAML\Module::getModuleURL('casserver/loggedIn.php'), $parameters)
191 191
     );
192 192
 }
Please login to merge, or discard this patch.
www/utility/validateTicket.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -79,8 +79,8 @@  discard block
 block discarded – undo
79 79
                             'sessionId' => $serviceTicket['sessionId']
80 80
                         ]);
81 81
                         try {
82
-                            \SimpleSAML\Utils\HTTP::fetch($pgtUrl . '?pgtIou=' . $proxyGrantingTicket['iou']
83
-                                . '&pgtId=' . $proxyGrantingTicket['id']);
82
+                            \SimpleSAML\Utils\HTTP::fetch($pgtUrl.'?pgtIou='.$proxyGrantingTicket['iou']
83
+                                . '&pgtId='.$proxyGrantingTicket['id']);
84 84
 
85 85
                             $protocol->setProxyGrantingTicketIOU($proxyGrantingTicket['iou']);
86 86
 
@@ -93,29 +93,29 @@  discard block
 block discarded – undo
93 93
                 echo $protocol->getValidateSuccessResponse($serviceTicket['userName']);
94 94
             } else {
95 95
                 if ($ticketFactory->isExpired($serviceTicket)) {
96
-                    $message = 'Ticket ' . var_export($_GET['ticket'], true) . ' has expired';
96
+                    $message = 'Ticket '.var_export($_GET['ticket'], true).' has expired';
97 97
 
98
-                    \SimpleSAML\Logger::debug('casserver:' . $message);
98
+                    \SimpleSAML\Logger::debug('casserver:'.$message);
99 99
 
100 100
                     echo $protocol->getValidateFailureResponse('INVALID_TICKET', $message);
101 101
                 } else {
102 102
                     if (sanitize($serviceTicket['service']) != sanitize($_GET['service'])) {
103 103
                         $message = 'Mismatching service parameters: expected '
104 104
                             . var_export($serviceTicket['service'], true)
105
-                            . ' but was: ' . var_export($_GET['service'], true);
105
+                            . ' but was: '.var_export($_GET['service'], true);
106 106
 
107
-                        \SimpleSAML\Logger::debug('casserver:' . $message);
107
+                        \SimpleSAML\Logger::debug('casserver:'.$message);
108 108
 
109 109
                         echo $protocol->getValidateFailureResponse('INVALID_SERVICE', $message);
110 110
                     } else {
111 111
                         if ($serviceTicket['forceAuthn'] != $forceAuthn) {
112 112
                             $message = 'Ticket was issue from single sign on session';
113 113
 
114
-                            \SimpleSAML\Logger::debug('casserver:' . $message);
114
+                            \SimpleSAML\Logger::debug('casserver:'.$message);
115 115
 
116 116
                             echo $protocol->getValidateFailureResponse('INVALID_TICKET', $message);
117 117
                         } else {
118
-                            \SimpleSAML\Logger::error('casserver:' . $method . ': internal server error.');
118
+                            \SimpleSAML\Logger::error('casserver:'.$method.': internal server error.');
119 119
 
120 120
                             echo $protocol->getValidateFailureResponse('INTERNAL_ERROR', 'Unknown internal error');
121 121
                         }
@@ -124,23 +124,23 @@  discard block
 block discarded – undo
124 124
             }
125 125
         } else {
126 126
             if (is_null($serviceTicket)) {
127
-                $message = 'Ticket ' . var_export($_GET['ticket'], true) . ' not recognized';
127
+                $message = 'Ticket '.var_export($_GET['ticket'], true).' not recognized';
128 128
 
129
-                \SimpleSAML\Logger::debug('casserver:' . $message);
129
+                \SimpleSAML\Logger::debug('casserver:'.$message);
130 130
 
131 131
                 echo $protocol->getValidateFailureResponse('INVALID_TICKET', $message);
132 132
             } else {
133 133
                 if ($ticketFactory->isProxyTicket($serviceTicket) && $method == 'serviceValidate') {
134
-                    $message = 'Ticket ' . var_export($_GET['ticket'], true)
134
+                    $message = 'Ticket '.var_export($_GET['ticket'], true)
135 135
                         . ' is a proxy ticket. Use proxyValidate instead.';
136 136
 
137
-                    \SimpleSAML\Logger::debug('casserver:' . $message);
137
+                    \SimpleSAML\Logger::debug('casserver:'.$message);
138 138
 
139 139
                     echo $protocol->getValidateFailureResponse('INVALID_TICKET', $message);
140 140
                 } else {
141
-                    $message = 'Ticket ' . var_export($_GET['ticket'], true) . ' is not a service ticket';
141
+                    $message = 'Ticket '.var_export($_GET['ticket'], true).' is not a service ticket';
142 142
 
143
-                    \SimpleSAML\Logger::debug('casserver:' . $message);
143
+                    \SimpleSAML\Logger::debug('casserver:'.$message);
144 144
 
145 145
                     echo $protocol->getValidateFailureResponse('INVALID_TICKET', $message);
146 146
                 }
@@ -157,13 +157,13 @@  discard block
 block discarded – undo
157 157
     if (!array_key_exists('service', $_GET)) {
158 158
         $message = 'Missing service parameter: [service]';
159 159
 
160
-        \SimpleSAML\Logger::debug('casserver:' . $message);
160
+        \SimpleSAML\Logger::debug('casserver:'.$message);
161 161
 
162 162
         echo $protocol->getValidateFailureResponse('INVALID_REQUEST', $message);
163 163
     } else {
164 164
         $message = 'Missing ticket parameter: [ticket]';
165 165
 
166
-        \SimpleSAML\Logger::debug('casserver:' . $message);
166
+        \SimpleSAML\Logger::debug('casserver:'.$message);
167 167
 
168 168
         echo $protocol->getValidateFailureResponse('INVALID_REQUEST', $message);
169 169
     }
Please login to merge, or discard this patch.
www/utility/urlUtils.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
         }
31 31
         if (!ctype_alnum($legalUrl[0])) {
32 32
             // Probably a regex. Suppress errors incase the format is invalid
33
-            $result =  @preg_match($legalUrl, $service);
33
+            $result = @preg_match($legalUrl, $service);
34 34
             if ($result === 1) {
35 35
                 return true;
36 36
             } elseif ($result === false) {
Please login to merge, or discard this patch.