Passed
Push — main ( 2cb152...6ff26f )
by TARIQ
23:50
created
brighty/system/Pager/Pager.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      */
117 117
     protected function displayLinks(string $group, string $template): string
118 118
     {
119
-        if (! array_key_exists($template, $this->config->templates)) {
119
+        if (!array_key_exists($template, $this->config->templates)) {
120 120
             throw PagerException::forInvalidTemplate($template);
121 121
         }
122 122
 
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
     {
230 230
         $this->ensureGroup($group);
231 231
 
232
-        if (! is_numeric($this->groups[$group]['total']) || ! is_numeric($this->groups[$group]['perPage'])) {
232
+        if (!is_numeric($this->groups[$group]['total']) || !is_numeric($this->groups[$group]['perPage'])) {
233 233
             return null;
234 234
         }
235 235
 
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
         if ($this->only) {
273 273
             $query = array_intersect_key($_GET, array_flip($this->only));
274 274
 
275
-            if (! $segment) {
275
+            if (!$segment) {
276 276
                 $query[$this->groups[$group]['pageSelector']] = $page;
277 277
             }
278 278
 
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
         $curr = $this->getCurrentPage($group);
296 296
         $page = null;
297 297
 
298
-        if (! empty($last) && ! empty($curr) && $last === $curr) {
298
+        if (!empty($last) && !empty($curr) && $last === $curr) {
299 299
             return null;
300 300
         }
301 301
 
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
         $curr  = $this->getCurrentPage($group);
320 320
         $page  = null;
321 321
 
322
-        if (! empty($first) && ! empty($curr) && $first === $curr) {
322
+        if (!empty($first) && !empty($curr) && $first === $curr) {
323 323
             return null;
324 324
         }
325 325
 
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
      */
349 349
     public function getDetails(string $group = 'default'): array
350 350
     {
351
-        if (! array_key_exists($group, $this->groups)) {
351
+        if (!array_key_exists($group, $this->groups)) {
352 352
             throw PagerException::forInvalidPaginationGroup($group);
353 353
         }
354 354
 
Please login to merge, or discard this patch.
brighty/system/Typography/Typography.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
         }
166 166
 
167 167
         // No opening block level tag? Add it if needed.
168
-        if (! preg_match('/^\s*<(?:' . $this->blockElements . ')/i', $str)) {
168
+        if (!preg_match('/^\s*<(?:' . $this->blockElements . ')/i', $str)) {
169 169
             $str = preg_replace('/^(.*?)<(' . $this->blockElements . ')/i', '<p>$1</p><$2', $str);
170 170
         }
171 171
 
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
     {
231 231
         static $table;
232 232
 
233
-        if (! isset($table)) {
233
+        if (!isset($table)) {
234 234
             $table = [
235 235
                 // nested smart quotes, opening and closing
236 236
                 // note that rules for grammar (English) allow only for two levels deep
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
      */
280 280
     protected function formatNewLines(string $str): string
281 281
     {
282
-        if ($str === '' || (strpos($str, "\n") === false && ! in_array($this->lastBlockElement, $this->innerBlockRequired, true))) {
282
+        if ($str === '' || (strpos($str, "\n") === false && !in_array($this->lastBlockElement, $this->innerBlockRequired, true))) {
283 283
             return $str;
284 284
         }
285 285
 
Please login to merge, or discard this patch.
brighty/system/Filters/CSRF.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
         try {
53 53
             $security->verify($request);
54 54
         } catch (SecurityException $e) {
55
-            if ($security->shouldRedirect() && ! $request->isAJAX()) {
55
+            if ($security->shouldRedirect() && !$request->isAJAX()) {
56 56
                 return redirect()->back()->with('error', $e->getMessage());
57 57
             }
58 58
 
Please login to merge, or discard this patch.
brighty/system/Filters/Filters.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
         foreach ($this->filtersClass[$position] as $className) {
166 166
             $class = new $className();
167 167
 
168
-            if (! $class instanceof FilterInterface) {
168
+            if (!$class instanceof FilterInterface) {
169 169
                 throw FilterException::forIncorrectInterface(get_class($class));
170 170
             }
171 171
 
@@ -294,11 +294,11 @@  discard block
 block discarded – undo
294 294
     {
295 295
         $alias = $alias ?? md5($class);
296 296
 
297
-        if (! isset($this->config->{$section})) {
297
+        if (!isset($this->config->{$section})) {
298 298
             $this->config->{$section} = [];
299 299
         }
300 300
 
301
-        if (! isset($this->config->{$section}[$when])) {
301
+        if (!isset($this->config->{$section}[$when])) {
302 302
             $this->config->{$section}[$when] = [];
303 303
         }
304 304
 
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
             [$name, $params] = explode(':', $name);
328 328
 
329 329
             $params = explode(',', $params);
330
-            array_walk($params, static function (&$item) {
330
+            array_walk($params, static function(&$item) {
331 331
                 $item = trim($item);
332 332
             });
333 333
 
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
 
337 337
         if (class_exists($name)) {
338 338
             $this->config->aliases[$name] = $name;
339
-        } elseif (! array_key_exists($name, $this->config->aliases)) {
339
+        } elseif (!array_key_exists($name, $this->config->aliases)) {
340 340
             throw FilterException::forNoAlias($name);
341 341
         }
342 342
 
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
             $this->argumentsClass[$className] = $this->arguments[$name] ?? null;
347 347
         }
348 348
 
349
-        if (! isset($this->filters[$when][$name])) {
349
+        if (!isset($this->filters[$when][$name])) {
350 350
             $this->filters[$when][]    = $name;
351 351
             $this->filtersClass[$when] = array_merge($this->filtersClass[$when], $classNames);
352 352
         }
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
      */
394 394
     protected function processGlobals(?string $uri = null)
395 395
     {
396
-        if (! isset($this->config->globals) || ! is_array($this->config->globals)) {
396
+        if (!isset($this->config->globals) || !is_array($this->config->globals)) {
397 397
             return;
398 398
         }
399 399
 
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
      */
434 434
     protected function processMethods()
435 435
     {
436
-        if (! isset($this->config->methods) || ! is_array($this->config->methods)) {
436
+        if (!isset($this->config->methods) || !is_array($this->config->methods)) {
437 437
             return;
438 438
         }
439 439
 
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
      */
453 453
     protected function processFilters(?string $uri = null)
454 454
     {
455
-        if (! isset($this->config->filters) || ! $this->config->filters) {
455
+        if (!isset($this->config->filters) || !$this->config->filters) {
456 456
             return;
457 457
         }
458 458
 
@@ -489,7 +489,7 @@  discard block
 block discarded – undo
489 489
                 $alias = $rules;
490 490
             }
491 491
 
492
-            if (! array_key_exists($alias, $this->config->aliases)) {
492
+            if (!array_key_exists($alias, $this->config->aliases)) {
493 493
                 throw FilterException::forNoAlias($alias);
494 494
             }
495 495
 
Please login to merge, or discard this patch.
brighty/system/Honeypot/Honeypot.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     {
38 38
         $this->config = $config;
39 39
 
40
-        if (! $this->config->hidden) {
40
+        if (!$this->config->hidden) {
41 41
             throw HoneypotException::forNoHiddenValue();
42 42
         }
43 43
 
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      */
60 60
     public function hasContent(RequestInterface $request)
61 61
     {
62
-        return ! empty($request->getPost($this->config->name));
62
+        return !empty($request->getPost($this->config->name));
63 63
     }
64 64
 
65 65
     /**
Please login to merge, or discard this patch.
brighty/system/ThirdParty/Escaper/Escaper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
             }
144 144
 
145 145
             $encoding = strtolower($encoding);
146
-            if (! in_array($encoding, $this->supportedEncodings)) {
146
+            if (!in_array($encoding, $this->supportedEncodings)) {
147 147
                 throw new Exception\InvalidArgumentException(
148 148
                     'Value of \'' . $encoding . '\' passed to ' . static::class
149 149
                     . ' constructor parameter is invalid. Provide an encoding supported by htmlspecialchars()'
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
             $result = $this->convertEncoding($string, 'UTF-8', $this->getEncoding());
357 357
         }
358 358
 
359
-        if (! $this->isUtf8($result)) {
359
+        if (!$this->isUtf8($result)) {
360 360
             throw new Exception\RuntimeException(
361 361
                 sprintf('String to be escaped was not valid UTF-8 or could not be converted: %s', $result)
362 362
             );
Please login to merge, or discard this patch.
brighty/system/ThirdParty/Kint/init.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,5 +60,5 @@
 block discarded – undo
60 60
 }
61 61
 
62 62
 if (!\defined('KINT_SKIP_HELPERS') || !KINT_SKIP_HELPERS) {
63
-    require_once __DIR__.'/init_helpers.php';
63
+    require_once __DIR__ . '/init_helpers.php';
64 64
 }
Please login to merge, or discard this patch.
brighty/system/ThirdParty/Kint/CallFinder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -320,7 +320,7 @@
 block discarded – undo
320 320
                         $paramrealtokens = false;
321 321
                         $param_start = $offset + 1;
322 322
                     } elseif (T_CONSTANT_ENCAPSED_STRING === $token[0] && \strlen($token[1]) > 2) {
323
-                        $shortparam[] = $token[1][0].'...'.$token[1][0];
323
+                        $shortparam[] = $token[1][0] . '...' . $token[1][0];
324 324
                     } else {
325 325
                         $shortparam[] = $token;
326 326
                     }
Please login to merge, or discard this patch.
brighty/system/ThirdParty/Kint/Zval/ThrowableValue.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
     public function getValueShort()
49 49
     {
50 50
         if (\strlen($this->message)) {
51
-            return '"'.$this->message.'"';
51
+            return '"' . $this->message . '"';
52 52
         }
53 53
     }
54 54
 }
Please login to merge, or discard this patch.