Passed
Push — master ( 6fe0c7...cd5575 )
by Simon
14:57 queued 11:13
created
includes/DataObjects/Domain.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,8 @@
 block discarded – undo
86 86
         return $result;
87 87
     }
88 88
 
89
-    public static function getAll(PdoDatabase $database) {
89
+    public static function getAll(PdoDatabase $database)
90
+    {
90 91
         $statement = $database->prepare("SELECT * FROM domain;");
91 92
         $statement->execute();
92 93
 
Please login to merge, or discard this patch.
includes/Validation/RequestValidationHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
                 /** @var RequestQueue|false $targetQueue */
252 252
                 $targetQueue = RequestQueue::getById($ban->getTargetQueue(), $this->database);
253 253
 
254
-                if ($targetQueue === false ) {
254
+                if ($targetQueue === false) {
255 255
                     $comment = new Comment();
256 256
                     $comment->setDatabase($this->database);
257 257
                     $comment->setRequest($request->getId());
@@ -444,7 +444,7 @@  discard block
 block discarded – undo
444 444
     private function formOverride(Request $request)
445 445
     {
446 446
         $form = $request->getOriginFormObject();
447
-        if($form === null || $form->getOverrideQueue() === null) {
447
+        if ($form === null || $form->getOverrideQueue() === null) {
448 448
             return;
449 449
         }
450 450
 
Please login to merge, or discard this patch.
includes/Pages/PageRequestFormManagement.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,8 @@
 block discarded – undo
56 56
         $this->setTemplate('form-management/main.tpl');
57 57
     }
58 58
 
59
-    protected function preview() {
59
+    protected function preview()
60
+    {
60 61
         $previewContent = WebRequest::getSessionContext('preview');
61 62
 
62 63
         $renderer = new MarkdownRenderingHelper();
Please login to merge, or discard this patch.
includes/Fragments/NavigationMenuAccessControl.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -109,7 +109,8 @@
 block discarded – undo
109 109
      *
110 110
      * @return void
111 111
      */
112
-    public function setUpNavBarBadges(User $currentUser, PdoDatabase $database) {
112
+    public function setUpNavBarBadges(User $currentUser, PdoDatabase $database)
113
+    {
113 114
         // Set up some variables.
114 115
         // A size of 0 causes nothing to show up on the page (checked on navigation-menu.tpl) so leaving it 0 here is fine.
115 116
         $countOfFlagged = 0;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -117,13 +117,13 @@
 block discarded – undo
117 117
         $countOfJobQueue = 0;
118 118
 
119 119
         // Count of flagged comments:
120
-        if($this->barrierTest(RoleConfigurationBase::MAIN, $currentUser, PageListFlaggedComments::class)) {
120
+        if ($this->barrierTest(RoleConfigurationBase::MAIN, $currentUser, PageListFlaggedComments::class)) {
121 121
             // We want all flagged comments that haven't been acknowledged if we can visit the page.
122 122
             $countOfFlagged = sizeof(Comment::getFlaggedComments($database, 1)); // FIXME: domains
123 123
         }
124 124
 
125 125
         // Count of failed job queue changes:
126
-        if($this->barrierTest(RoleConfigurationBase::MAIN, $currentUser, PageJobQueue::class)) {
126
+        if ($this->barrierTest(RoleConfigurationBase::MAIN, $currentUser, PageJobQueue::class)) {
127 127
             // We want all failed jobs that haven't been acknowledged if we can visit the page.
128 128
             JobQueueSearchHelper::get($database, 1) // FIXME: domains
129 129
                 ->statusIn([JobQueue::STATUS_FAILED])
Please login to merge, or discard this patch.
includes/DataObjects/UserPreference.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      */
68 68
     public function save()
69 69
     {
70
-        if($this->isNew()) {
70
+        if ($this->isNew()) {
71 71
             // insert
72 72
             $statement = $this->dbObject->prepare(<<<SQL
73 73
                 INSERT INTO `userpreference` (
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
             else {
89 89
                 throw new Exception($statement->errorInfo());
90 90
             }
91
-        }else{
91
+        } else {
92 92
             // update
93 93
             $statement = $this->dbObject->prepare(<<<SQL
94 94
                 UPDATE `userpreference` SET 
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,7 +28,8 @@  discard block
 block discarded – undo
28 28
     /** @var ?mixed */
29 29
     private $value;
30 30
 
31
-    public static function getLocalPreference(PdoDatabase $database, int $user, string $preference, int $domain) {
31
+    public static function getLocalPreference(PdoDatabase $database, int $user, string $preference, int $domain)
32
+    {
32 33
         $statement = $database->prepare('SELECT * FROM userpreference WHERE preference = :preference AND USER = :user AND domain = :domain');
33 34
         $statement->execute([
34 35
             ':user' => $user,
@@ -45,7 +46,8 @@  discard block
 block discarded – undo
45 46
         return $resultObject;
46 47
     }
47 48
 
48
-    public static function getGlobalPreference(PdoDatabase $database, int $user, string $preference) {
49
+    public static function getGlobalPreference(PdoDatabase $database, int $user, string $preference)
50
+    {
49 51
         $statement = $database->prepare('SELECT * FROM userpreference WHERE preference = :preference AND USER = :user AND domain IS NULL');
50 52
         $statement->execute([
51 53
             ':user' => $user,
@@ -88,7 +90,8 @@  discard block
 block discarded – undo
88 90
             else {
89 91
                 throw new Exception($statement->errorInfo());
90 92
             }
91
-        }else{
93
+        }
94
+        else {
92 95
             // update
93 96
             $statement = $this->dbObject->prepare(<<<SQL
94 97
                 UPDATE `userpreference` SET 
Please login to merge, or discard this patch.
includes/Fragments/RequestData.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -274,8 +274,8 @@
 block discarded – undo
274 274
 
275 275
         $isClosed = $request->getStatus() === RequestStatus::CLOSED || $request->getStatus() === RequestStatus::JOBQUEUE;
276 276
         $this->assign('requestIsClosed', $isClosed);
277
-		$isHospital = $request->getStatus() === RequestStatus::HOSPITAL;
278
-		$this->assign('requestIsHospital', $isHospital);
277
+        $isHospital = $request->getStatus() === RequestStatus::HOSPITAL;
278
+        $this->assign('requestIsHospital', $isHospital);
279 279
     }
280 280
 
281 281
     /**
Please login to merge, or discard this patch.
includes/Pages/Request/PageRequestAccount.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -324,7 +324,7 @@
 block discarded – undo
324 324
         {
325 325
             $value = WebRequest::httpHeader($header);
326 326
 
327
-            if($value === null){
327
+            if ($value === null) {
328 328
                 continue;
329 329
             }
330 330
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -320,11 +320,10 @@
 block discarded – undo
320 320
 
321 321
     private function savePrivateData(Request $request)
322 322
     {
323
-        foreach ($this->getSiteConfiguration()->getAcceptClientHints() as $header)
324
-        {
323
+        foreach ($this->getSiteConfiguration()->getAcceptClientHints() as $header) {
325 324
             $value = WebRequest::httpHeader($header);
326 325
 
327
-            if($value === null){
326
+            if($value === null) {
328 327
                 continue;
329 328
             }
330 329
 
Please login to merge, or discard this patch.
includes/Pages/UserAuth/PagePreferences.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,9 +37,9 @@
 block discarded – undo
37 37
         if (WebRequest::wasPosted()) {
38 38
             $this->validateCSRFToken();
39 39
 
40
-            $this->setPreference($preferencesManager,PreferenceManager::PREF_EMAIL_SIGNATURE, 'emailSignature');
41
-            $this->setPreferenceWithValue($preferencesManager,PreferenceManager::PREF_SKIP_JS_ABORT, 'skipJsAbort', WebRequest::postBoolean('skipJsAbort') ? 1 : 0);
42
-            $this->setPreferenceWithValue($preferencesManager,PreferenceManager::PREF_QUEUE_HELP, 'showQueueHelp', WebRequest::postBoolean('showQueueHelp') ? 1 : 0);
40
+            $this->setPreference($preferencesManager, PreferenceManager::PREF_EMAIL_SIGNATURE, 'emailSignature');
41
+            $this->setPreferenceWithValue($preferencesManager, PreferenceManager::PREF_SKIP_JS_ABORT, 'skipJsAbort', WebRequest::postBoolean('skipJsAbort') ? 1 : 0);
42
+            $this->setPreferenceWithValue($preferencesManager, PreferenceManager::PREF_QUEUE_HELP, 'showQueueHelp', WebRequest::postBoolean('showQueueHelp') ? 1 : 0);
43 43
             $this->setCreationMode($user, $preferencesManager);
44 44
             $this->setSkin($preferencesManager);
45 45
             $preferencesManager->setGlobalPreference(PreferenceManager::PREF_DEFAULT_DOMAIN, WebRequest::postInt('defaultDomain'));
Please login to merge, or discard this patch.
includes/Pages/PageDomainSwitch.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
         try {
45 45
             $this->getDomainAccessManager()->switchDomain($currentUser, $newDomain);
46 46
         }
47
-        catch(DomainSwitchNotAllowedException $ex){
47
+        catch (DomainSwitchNotAllowedException $ex) {
48 48
             throw new AccessDeniedException($this->getSecurityManager(), $this->getDomainAccessManager());
49 49
         }
50 50
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         try {
45 45
             $this->getDomainAccessManager()->switchDomain($currentUser, $newDomain);
46 46
         }
47
-        catch(DomainSwitchNotAllowedException $ex){
47
+        catch(DomainSwitchNotAllowedException $ex) {
48 48
             throw new AccessDeniedException($this->getSecurityManager(), $this->getDomainAccessManager());
49 49
         }
50 50
 
@@ -58,7 +58,8 @@  discard block
 block discarded – undo
58 58
 
59 59
         if ($this->barrierTest($route[1], $currentUser, $route[0])) {
60 60
             $this->redirect('/' . $referrer);
61
-        } else {
61
+        }
62
+        else {
62 63
             $this->redirect('/');
63 64
         }
64 65
     }
Please login to merge, or discard this patch.