Test Failed
Pull Request — master (#896)
by Alexander
09:18
created
src/Prototype/tests/UtilsTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,9 +31,9 @@
 block discarded – undo
31 31
     public function trailingProvider(): array
32 32
     {
33 33
         return [
34
-            ['name7', 7, 'name',],
35
-            ['name', 0, 'name',],
36
-            ['name0', 0, 'name',],
34
+            ['name7', 7, 'name', ],
35
+            ['name', 0, 'name', ],
36
+            ['name0', 0, 'name', ],
37 37
             ['name1', 1, 'name'],
38 38
             ['name-1', 1, 'name-'],
39 39
             ['name-1', -1, 'name'],
Please login to merge, or discard this patch.
src/Prototype/tests/Storage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,11 +26,11 @@
 block discarded – undo
26 26
 
27 27
     public function store(string $name): void
28 28
     {
29
-        $this->storage[$name] = file_get_contents($this->dir . $name);
29
+        $this->storage[$name] = file_get_contents($this->dir.$name);
30 30
     }
31 31
 
32 32
     public function restore(string $name): void
33 33
     {
34
-        file_put_contents($this->dir . $name, $this->storage[$name]);
34
+        file_put_contents($this->dir.$name, $this->storage[$name]);
35 35
     }
36 36
 }
Please login to merge, or discard this patch.
src/Stempler/src/Loader/Source.php 2 patches
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,12 +57,15 @@
 block discarded – undo
57 57
     {
58 58
         $line = 0;
59 59
 
60
-        for ($i = 0; $i < $offset; $i++) {
61
-            if (!isset($content[$i])) {
60
+        for ($i = 0; $i < $offset; $i++)
61
+        {
62
+            if (!isset($content[$i]))
63
+            {
62 64
                 break;
63 65
             }
64 66
 
65
-            if ($content[$i] === "\n") {
67
+            if ($content[$i] === "\n")
68
+            {
66 69
                 $line++;
67 70
             }
68 71
         }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
     public function __construct(
13 13
         private readonly string $content,
14 14
         private readonly ?string $filename = null
15
-    ) {
15
+    ){
16 16
     }
17 17
 
18 18
     public function getContent(): string
@@ -29,12 +29,12 @@  discard block
 block discarded – undo
29 29
     {
30 30
         $line = 0;
31 31
 
32
-        for ($i = 0; $i < $offset; $i++) {
33
-            if (!isset($content[$i])) {
32
+        for ($i = 0; $i < $offset; $i++){
33
+            if (!isset($content[$i])){
34 34
                 break;
35 35
             }
36 36
 
37
-            if ($content[$i] === "\n") {
37
+            if ($content[$i] === "\n"){
38 38
                 $line++;
39 39
             }
40 40
         }
Please login to merge, or discard this patch.
src/Stempler/src/Lexer/StringStream.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,8 @@
 block discarded – undo
53 53
      */
54 54
     public function peak(): ?string
55 55
     {
56
-        if ($this->offset + 1 > $this->length) {
56
+        if ($this->offset + 1 > $this->length)
57
+        {
57 58
             return null;
58 59
         }
59 60
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 
14 14
     public function __construct(
15 15
         private readonly string $source
16
-    ) {
16
+    ){
17 17
         $this->length = \strlen($source);
18 18
         $this->offset = 0;
19 19
     }
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      */
34 34
     public function peak(): ?string
35 35
     {
36
-        if ($this->offset + 1 > $this->length) {
36
+        if ($this->offset + 1 > $this->length){
37 37
             return null;
38 38
         }
39 39
 
Please login to merge, or discard this patch.
src/Stempler/src/Lexer/Grammar/RawGrammar.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -27,9 +27,9 @@  discard block
 block discarded – undo
27 27
         $buffer = null;
28 28
         $bufferOffset = 0;
29 29
 
30
-        foreach ($src as $n) {
31
-            if ($n instanceof Byte) {
32
-                if ($buffer === null) {
30
+        foreach ($src as $n){
31
+            if ($n instanceof Byte){
32
+                if ($buffer === null){
33 33
                     $buffer = '';
34 34
                     $bufferOffset = $n->offset;
35 35
                 }
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
                 continue;
39 39
             }
40 40
 
41
-            if ($buffer !== null) {
41
+            if ($buffer !== null){
42 42
                 yield new Token(Token::TYPE_RAW, $bufferOffset, $buffer);
43 43
                 $buffer = null;
44 44
             }
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
             yield $n;
47 47
         }
48 48
 
49
-        if ($buffer !== null) {
49
+        if ($buffer !== null){
50 50
             yield new Token(Token::TYPE_RAW, $bufferOffset, $buffer);
51 51
         }
52 52
     }
Please login to merge, or discard this patch.
Braces   +10 added lines, -5 removed lines patch added patch discarded remove patch
@@ -27,9 +27,12 @@  discard block
 block discarded – undo
27 27
         $buffer = null;
28 28
         $bufferOffset = 0;
29 29
 
30
-        foreach ($src as $n) {
31
-            if ($n instanceof Byte) {
32
-                if ($buffer === null) {
30
+        foreach ($src as $n)
31
+        {
32
+            if ($n instanceof Byte)
33
+            {
34
+                if ($buffer === null)
35
+                {
33 36
                     $buffer = '';
34 37
                     $bufferOffset = $n->offset;
35 38
                 }
@@ -38,7 +41,8 @@  discard block
 block discarded – undo
38 41
                 continue;
39 42
             }
40 43
 
41
-            if ($buffer !== null) {
44
+            if ($buffer !== null)
45
+            {
42 46
                 yield new Token(Token::TYPE_RAW, $bufferOffset, $buffer);
43 47
                 $buffer = null;
44 48
             }
@@ -46,7 +50,8 @@  discard block
 block discarded – undo
46 50
             yield $n;
47 51
         }
48 52
 
49
-        if ($buffer !== null) {
53
+        if ($buffer !== null)
54
+        {
50 55
             yield new Token(Token::TYPE_RAW, $bufferOffset, $buffer);
51 56
         }
52 57
     }
Please login to merge, or discard this patch.
src/Stempler/tests/Transform/BaseTest.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 {
35 35
     protected function compile(string $source, array $visitors = [], LoaderInterface $loader = null)
36 36
     {
37
-        if ($loader === null) {
37
+        if ($loader === null){
38 38
             $loader = new StringLoader();
39 39
             $loader->set('root', $source);
40 40
         }
@@ -69,11 +69,11 @@  discard block
 block discarded – undo
69 69
         $builder->getCompiler()->addRenderer(new DynamicRenderer(new DirectiveGroup()));
70 70
         $builder->getCompiler()->addRenderer(new HTMLRenderer());
71 71
 
72
-        foreach ($this->getVisitors() as $visitor) {
72
+        foreach ($this->getVisitors() as $visitor){
73 73
             $builder->addVisitor($visitor);
74 74
         }
75 75
 
76
-        foreach ($visitors as $visitor) {
76
+        foreach ($visitors as $visitor){
77 77
             $builder->addVisitor($visitor);
78 78
         }
79 79
 
@@ -90,6 +90,6 @@  discard block
 block discarded – undo
90 90
      */
91 91
     protected function getFixtureLoader(): LoaderInterface
92 92
     {
93
-        return new DirectoryLoader(__DIR__ . '/../fixtures');
93
+        return new DirectoryLoader(__DIR__.'/../fixtures');
94 94
     }
95 95
 }
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,7 +34,8 @@  discard block
 block discarded – undo
34 34
 {
35 35
     protected function compile(string $source, array $visitors = [], LoaderInterface $loader = null)
36 36
     {
37
-        if ($loader === null) {
37
+        if ($loader === null)
38
+        {
38 39
             $loader = new StringLoader();
39 40
             $loader->set('root', $source);
40 41
         }
@@ -69,11 +70,13 @@  discard block
 block discarded – undo
69 70
         $builder->getCompiler()->addRenderer(new DynamicRenderer(new DirectiveGroup()));
70 71
         $builder->getCompiler()->addRenderer(new HTMLRenderer());
71 72
 
72
-        foreach ($this->getVisitors() as $visitor) {
73
+        foreach ($this->getVisitors() as $visitor)
74
+        {
73 75
             $builder->addVisitor($visitor);
74 76
         }
75 77
 
76
-        foreach ($visitors as $visitor) {
78
+        foreach ($visitors as $visitor)
79
+        {
77 80
             $builder->addVisitor($visitor);
78 81
         }
79 82
 
Please login to merge, or discard this patch.
src/Stempler/tests/Transform/DynamicToPHPTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
     public function testVerbatim4(): void
105 105
     {
106 106
         $this->assertSame(
107
-            '<script>alert(<?php echo json_encode' .
107
+            '<script>alert(<?php echo json_encode'.
108 108
             '("hello\' \'world", JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT, 512); ?>)</script>',
109 109
             $res = $this->compile('<script>alert({{ "hello\' \'world" }})</script>')->getContent()
110 110
         );
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
     {
128 128
         ob_start();
129 129
 
130
-        eval('?>' . $body);
130
+        eval('?>'.$body);
131 131
 
132 132
         return ob_get_clean();
133 133
     }
Please login to merge, or discard this patch.
src/Stempler/tests/Transform/ImportedStackTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
         );
148 148
 
149 149
         $loader->set(
150
-            'grid' . DIRECTORY_SEPARATOR . 'render',
150
+            'grid'.DIRECTORY_SEPARATOR.'render',
151 151
             '
152 152
 <table>
153 153
 <thead>
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
         );
163 163
 
164 164
         $loader->set(
165
-            'grid' . DIRECTORY_SEPARATOR . 'cell',
165
+            'grid'.DIRECTORY_SEPARATOR.'cell',
166 166
             '
167 167
 <stack:push name="head"><tr>${title}</tr></stack:push>
168 168
 <stack:push name="body"><td>${context}</td></stack:push>
Please login to merge, or discard this patch.
src/Stempler/tests/Compiler/BaseTest.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     protected function compile(Template $document): string
35 35
     {
36 36
         $compiler = new Compiler();
37
-        foreach (static::RENDERS as $renderer) {
37
+        foreach (static::RENDERS as $renderer){
38 38
             $compiler->addRenderer(new $renderer());
39 39
         }
40 40
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     {
50 50
         $parser = new Parser();
51 51
 
52
-        foreach (static::GRAMMARS as $grammar => $syntax) {
52
+        foreach (static::GRAMMARS as $grammar => $syntax){
53 53
             $parser->addSyntax(new $grammar(), new $syntax());
54 54
         }
55 55
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,7 +34,8 @@  discard block
 block discarded – undo
34 34
     protected function compile(Template $document): string
35 35
     {
36 36
         $compiler = new Compiler();
37
-        foreach (static::RENDERS as $renderer) {
37
+        foreach (static::RENDERS as $renderer)
38
+        {
38 39
             $compiler->addRenderer(new $renderer());
39 40
         }
40 41
 
@@ -49,7 +50,8 @@  discard block
 block discarded – undo
49 50
     {
50 51
         $parser = new Parser();
51 52
 
52
-        foreach (static::GRAMMARS as $grammar => $syntax) {
53
+        foreach (static::GRAMMARS as $grammar => $syntax)
54
+        {
53 55
             $parser->addSyntax(new $grammar(), new $syntax());
54 56
         }
55 57
 
Please login to merge, or discard this patch.