Passed
Push — main ( fd0a18...f48e09 )
by Thomas
13:11
created
src/Sanitizer.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,6 @@
 block discarded – undo
23 23
 
24 24
         // also remove empty lines
25 25
         return $removeEmptyLines ?
26
-            preg_replace("/(^[\r\n]*|[\r\n]+)[\\s\t]*[\r\n]+/", PHP_EOL, $result) :
27
-            $result;
26
+            preg_replace("/(^[\r\n]*|[\r\n]+)[\\s\t]*[\r\n]+/", PHP_EOL, $result) : $result;
28 27
     }
29 28
 }
Please login to merge, or discard this patch.
src/LayoutValue.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
      */
12 12
     public function __construct(
13 13
         public readonly string $layout,
14
-        public readonly ?array $context = null
14
+        public readonly ? array $context = null
15 15
     ) {
16 16
     }
17 17
 }
Please login to merge, or discard this patch.
src/CustomMethods.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,6 @@
 block discarded – undo
20 20
     public function get(string $name): callable
21 21
     {
22 22
         return array_key_exists($name, $this->methods) ?
23
-            $this->methods[$name] :
24
-            throw new UnexpectedValueException("Custom method '{$name}' does not exist");
23
+            $this->methods[$name] : throw new UnexpectedValueException("Custom method '{$name}' does not exist");
25 24
     }
26 25
 }
Please login to merge, or discard this patch.
src/Value.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
     {
19 19
         return htmlspecialchars(
20 20
             (string)$this->value,
21
-            ENT_QUOTES | ENT_SUBSTITUTE,
21
+            ENT_QUOTES|ENT_SUBSTITUTE,
22 22
             'UTF-8',
23 23
         );
24 24
     }
Please login to merge, or discard this patch.
src/Template.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     {
100 100
         $templateContext = $this->templateContext($context, $whitelist, $autoescape);
101 101
 
102
-        $load = function (string $templatePath, array $context = []): void {
102
+        $load = function(string $templatePath, array $context = []): void {
103 103
             // Hide $templatePath. Could be overwritten if $context['templatePath'] exists.
104 104
             $____template_path____ = $templatePath;
105 105
 
@@ -119,8 +119,7 @@  discard block
 block discarded – undo
119 119
             $load(
120 120
                 $this->path,
121 121
                 $autoescape ?
122
-                    $templateContext->context() :
123
-                    $context
122
+                    $templateContext->context() : $context
124 123
             );
125 124
 
126 125
             return ob_get_clean();
Please login to merge, or discard this patch.
src/TemplateContext.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 /** @psalm-api */
10 10
 class TemplateContext
11 11
 {
12
-    private const ESCAPE_FLAGS = ENT_QUOTES | ENT_SUBSTITUTE;
12
+    private const ESCAPE_FLAGS = ENT_QUOTES|ENT_SUBSTITUTE;
13 13
     private const ESCAPE_ENCODING = 'UTF-8';
14 14
 
15 15
     /**
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     public function context(array $values = []): array
34 34
     {
35 35
         return array_map(
36
-            function ($value): mixed {
36
+            function($value): mixed {
37 37
                 if (is_object($value)) {
38 38
                     foreach ($this->whitelist as $whitelisted) {
39 39
                         if (
Please login to merge, or discard this patch.