Failed Conditions
Pull Request — oauthcreation (#531)
by Simon
06:20
created
includes/Tasks/ApiPageBase.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
             $CORSallowed = $this->getSiteConfiguration()->getCrossOriginResourceSharingHosts();
70 70
 
71 71
             if (in_array($httpOrigin, $CORSallowed)) {
72
-                header("Access-Control-Allow-Origin: " . $httpOrigin);
72
+                header("Access-Control-Allow-Origin: ".$httpOrigin);
73 73
             }
74 74
         }
75 75
 
Please login to merge, or discard this patch.
includes/Pages/PageTeam.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
      */
20 20
     protected function main()
21 21
     {
22
-        $path = $this->getSiteConfiguration()->getFilePath() . '/team.json';
22
+        $path = $this->getSiteConfiguration()->getFilePath().'/team.json';
23 23
         $json = file_get_contents($path);
24 24
 
25 25
         $teamData = json_decode($json, true);
Please login to merge, or discard this patch.
includes/Pages/Statistics/StatsUsers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
         }
63 63
 
64 64
         $safeUsername = htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8');
65
-        $this->setHtmlTitle($safeUsername . ' :: Users :: Statistics');
65
+        $this->setHtmlTitle($safeUsername.' :: Users :: Statistics');
66 66
 
67 67
         $activitySummary = $database->prepare(<<<SQL
68 68
 SELECT COALESCE(closes.mail_desc, log.action) AS action, COUNT(*) AS count
Please login to merge, or discard this patch.
includes/Pages/RequestAction/PageComment.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,8 +48,8 @@
 block discarded – undo
48 48
         }
49 49
 
50 50
         //Look for and detect IPv4/IPv6 addresses in comment text, and warn the commenter.
51
-        $ipv4Regex = '/\b' . RegexConstants::IPV4 . '\b/';
52
-        $ipv6Regex = '/\b' . RegexConstants::IPV6 . '\b/';
51
+        $ipv4Regex = '/\b'.RegexConstants::IPV4.'\b/';
52
+        $ipv6Regex = '/\b'.RegexConstants::IPV6.'\b/';
53 53
 
54 54
         $overridePolicy = WebRequest::postBoolean('privpol-check-override');
55 55
 
Please login to merge, or discard this patch.
includes/PdoDatabase.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
             }
51 51
             catch (PDOException $ex) {
52 52
                 // wrap around any potential stack traces which may include passwords
53
-                throw new EnvironmentException("Error connecting to database '$connectionName': " . $ex->getMessage());
53
+                throw new EnvironmentException("Error connecting to database '$connectionName': ".$ex->getMessage());
54 54
             }
55 55
 
56 56
             $databaseObject->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
Please login to merge, or discard this patch.
includes/ExceptionHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
         $errorId = sha1($state);
59 59
 
60 60
         // Save the error for later analysis
61
-        file_put_contents($siteConfiguration->getErrorLog() . '/' . $errorId . '.log', $state);
61
+        file_put_contents($siteConfiguration->getErrorLog().'/'.$errorId.'.log', $state);
62 62
 
63 63
         // clear and discard any content that's been saved to the output buffer
64 64
         if (ob_get_level() > 0) {
Please login to merge, or discard this patch.
includes/Validation/RequestValidationHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@
 block discarded – undo
120 120
         }
121 121
 
122 122
         // username can't contain #@/<>[]|{}
123
-        if (preg_match("/[" . preg_quote("#@/<>[]|{}", "/") . "]/", $this->request->getName()) === 1) {
123
+        if (preg_match("/[".preg_quote("#@/<>[]|{}", "/")."]/", $this->request->getName()) === 1) {
124 124
             $errorList[ValidationError::NAME_INVALIDCHAR] = new ValidationError(ValidationError::NAME_INVALIDCHAR);
125 125
         }
126 126
 
Please login to merge, or discard this patch.
includes/Router/RequestRouter.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -358,7 +358,7 @@
 block discarded – undo
358 358
         $routeMap = $this->routePathSegments($classSegment, $requestedAction);
359 359
 
360 360
         if ($routeMap[0] === Page404::class) {
361
-            $routeMap = $this->routeSinglePathSegment($classSegment . '/' . $requestedAction);
361
+            $routeMap = $this->routeSinglePathSegment($classSegment.'/'.$requestedAction);
362 362
         }
363 363
 
364 364
         return $routeMap;
Please login to merge, or discard this patch.
Unused Use Statements   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -15,30 +15,20 @@  discard block
 block discarded – undo
15 15
 use Waca\Pages\PageEmailManagement;
16 16
 use Waca\Pages\PageExpandedRequestList;
17 17
 use Waca\Pages\PageJobQueue;
18
-use Waca\Pages\RequestAction\PageCreateRequest;
19
-use Waca\Pages\UserAuth\Login\PageOtpLogin;
20
-use Waca\Pages\UserAuth\Login\PagePasswordLogin;
21
-use Waca\Pages\UserAuth\Login\PageU2FLogin;
22
-use Waca\Pages\UserAuth\PageChangePassword;
23
-use Waca\Pages\UserAuth\PageForgotPassword;
24 18
 use Waca\Pages\PageLog;
25
-use Waca\Pages\UserAuth\PageLogout;
26 19
 use Waca\Pages\PageMain;
27
-use Waca\Pages\UserAuth\MultiFactor\PageMultiFactor;
28
-use Waca\Pages\UserAuth\PageOAuth;
29
-use Waca\Pages\UserAuth\PageOAuthCallback;
30
-use Waca\Pages\UserAuth\PagePreferences;
31
-use Waca\Pages\Registration\PageRegisterStandard;
32
-use Waca\Pages\Registration\PageRegisterOption;
33 20
 use Waca\Pages\PageSearch;
34 21
 use Waca\Pages\PageSiteNotice;
35 22
 use Waca\Pages\PageTeam;
36 23
 use Waca\Pages\PageUserManagement;
37 24
 use Waca\Pages\PageViewRequest;
38 25
 use Waca\Pages\PageWelcomeTemplateManagement;
26
+use Waca\Pages\Registration\PageRegisterOption;
27
+use Waca\Pages\Registration\PageRegisterStandard;
39 28
 use Waca\Pages\RequestAction\PageBreakReservation;
40 29
 use Waca\Pages\RequestAction\PageCloseRequest;
41 30
 use Waca\Pages\RequestAction\PageComment;
31
+use Waca\Pages\RequestAction\PageCreateRequest;
42 32
 use Waca\Pages\RequestAction\PageCustomClose;
43 33
 use Waca\Pages\RequestAction\PageDeferRequest;
44 34
 use Waca\Pages\RequestAction\PageDropRequest;
@@ -52,6 +42,16 @@  discard block
 block discarded – undo
52 42
 use Waca\Pages\Statistics\StatsTemplateStats;
53 43
 use Waca\Pages\Statistics\StatsTopCreators;
54 44
 use Waca\Pages\Statistics\StatsUsers;
45
+use Waca\Pages\UserAuth\Login\PageOtpLogin;
46
+use Waca\Pages\UserAuth\Login\PagePasswordLogin;
47
+use Waca\Pages\UserAuth\Login\PageU2FLogin;
48
+use Waca\Pages\UserAuth\MultiFactor\PageMultiFactor;
49
+use Waca\Pages\UserAuth\PageChangePassword;
50
+use Waca\Pages\UserAuth\PageForgotPassword;
51
+use Waca\Pages\UserAuth\PageLogout;
52
+use Waca\Pages\UserAuth\PageOAuth;
53
+use Waca\Pages\UserAuth\PageOAuthCallback;
54
+use Waca\Pages\UserAuth\PagePreferences;
55 55
 use Waca\Tasks\IRoutedTask;
56 56
 use Waca\WebRequest;
57 57
 
Please login to merge, or discard this patch.
includes/AutoLoader.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -25,14 +25,14 @@
 block discarded – undo
25 25
         }
26 26
 
27 27
         $paths = array(
28
-            __DIR__ . '/' . $class . ".php",
29
-            __DIR__ . '/DataObjects/' . $class . ".php",
30
-            __DIR__ . '/Providers/' . $class . ".php",
31
-            __DIR__ . '/Providers/Interfaces/' . $class . ".php",
32
-            __DIR__ . '/Validation/' . $class . ".php",
33
-            __DIR__ . '/Helpers/' . $class . ".php",
34
-            __DIR__ . '/Helpers/Interfaces/' . $class . ".php",
35
-            __DIR__ . '/' . $class . ".php",
28
+            __DIR__.'/'.$class.".php",
29
+            __DIR__.'/DataObjects/'.$class.".php",
30
+            __DIR__.'/Providers/'.$class.".php",
31
+            __DIR__.'/Providers/Interfaces/'.$class.".php",
32
+            __DIR__.'/Validation/'.$class.".php",
33
+            __DIR__.'/Helpers/'.$class.".php",
34
+            __DIR__.'/Helpers/Interfaces/'.$class.".php",
35
+            __DIR__.'/'.$class.".php",
36 36
         );
37 37
 
38 38
         foreach ($paths as $file) {
Please login to merge, or discard this patch.