Passed
Pull Request — master (#6)
by
unknown
02:42
created
src/Forms/GridField/GridFieldDeleteRelationsButton.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -559,7 +559,7 @@
 block discarded – undo
559 559
         }
560 560
         $data = urldecode($data);
561 561
 
562
-        $data = preg_replace_callback('/(?:^|(?<=&))[^=[]+/', function ($match) {
562
+        $data = preg_replace_callback('/(?:^|(?<=&))[^=[]+/', function($match) {
563 563
             return bin2hex(urldecode($match[0]));
564 564
         }, $data);
565 565
 
Please login to merge, or discard this patch.
src/Controllers/CSPViolationsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@
 block discarded – undo
143 143
                         // Firefox doesn't report the disposition.
144 144
                         return 'unknown';
145 145
                     }
146
-                    return ;
146
+                    return;
147 147
                 case self::BLOCKED_URI:
148 148
                     return $cspReport['blocked-uri'];
149 149
                 case self::EFFECTIVE_DIRECTIVE:
Please login to merge, or discard this patch.
tests/SecurityHeaderMiddlewareTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
                     ],
100 100
                 ],
101 101
             ],
102
-            function () use ($testURI) {
102
+            function() use ($testURI) {
103 103
                 $defaultUri = Director::absoluteURL(SecurityHeaderMiddleware::config()->get('report_uri'));
104 104
                 $response = $this->getResponse();
105 105
                 $csp = $response->getHeader('Content-Security-Policy');
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
                     'use_report_to' => true,
130 130
                 ],
131 131
             ],
132
-            function () {
132
+            function() {
133 133
                 $response = $this->getResponse();
134 134
                 $csp = $response->getHeader('Content-Security-Policy');
135 135
                 $reportHeaderExists = $response->getHeader('Report-To') !== null;
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
                     'use_report_to' => true,
175 175
                 ],
176 176
             ],
177
-            function () {
177
+            function() {
178 178
                 $defaultEndpoint = SecurityHeaderMiddleware::config()->get('report_to_group');
179 179
                 $defaultUri = Director::absoluteURL(SecurityHeaderMiddleware::config()->get('report_uri'));
180 180
                 $response = $this->getResponse();
Please login to merge, or discard this patch.
src/Middleware/SecurityHeaderMiddleware.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
      */
135 135
     public function disableCSP()
136 136
     {
137
-        if (SiteConfig::current_site_config()->CSPReportingOnly == '3'){
137
+        if (SiteConfig::current_site_config()->CSPReportingOnly == '3') {
138 138
             return true;
139 139
         }
140 140
 
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
      */
149 149
     public function disableReporting()
150 150
     {
151
-        if (SiteConfig::current_site_config()->CSPReportingOnly == '2'){
151
+        if (SiteConfig::current_site_config()->CSPReportingOnly == '2') {
152 152
             return true;
153 153
         }
154 154
 
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
             'max_age' => 1800,
211 211
             'endpoints' => [[
212 212
                 'url' => $this->getReportURI(),
213
-            ],],
213
+            ], ],
214 214
             'include_subdomains' => $this->getIncludeSubdomains(),
215 215
         ];
216 216
         return json_encode($header);
Please login to merge, or discard this patch.