Passed
Push — master ( 1d6cd7...f498cd )
by Aleksei
06:14
created
src/Stempler/src/Parser/Syntax/DynamicSyntax.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      */
37 37
     public function handle(Parser $parser, Assembler $asm, Token $token): void
38 38
     {
39
-        switch ($token->type) {
39
+        switch ($token->type){
40 40
             case DynamicGrammar::TYPE_DIRECTIVE:
41 41
                 $this->directive = new Directive(new Parser\Context($token, $parser->getPath()));
42 42
                 $asm->push($this->directive);
@@ -61,20 +61,20 @@  discard block
 block discarded – undo
61 61
                 break;
62 62
 
63 63
             case DynamicGrammar::TYPE_KEYWORD:
64
-                if ($this->directive !== null) {
64
+                if ($this->directive !== null){
65 65
                     $this->directive->name = $token->content;
66 66
                 }
67 67
                 break;
68 68
 
69 69
             case DynamicGrammar::TYPE_BODY:
70
-                if ($this->directive !== null) {
70
+                if ($this->directive !== null){
71 71
                     $this->directive->body = $token->content;
72 72
                     $this->directive->values = $this->fetchValues($this->directive->body);
73 73
 
74 74
                     $this->directive = null;
75 75
                 }
76 76
 
77
-                if ($this->output !== null) {
77
+                if ($this->output !== null){
78 78
                     $this->output->body = $token->content;
79 79
                 }
80 80
 
@@ -95,31 +95,31 @@  discard block
 block discarded – undo
95 95
 
96 96
         $src = new StringStream($body);
97 97
 
98
-        while ($n = $src->peak()) {
99
-            if (in_array($n, ['"', '"'])) {
98
+        while ($n = $src->peak()){
99
+            if (in_array($n, ['"', '"'])){
100 100
                 $values[count($values) - 1] .= $n;
101
-                while ($nn = $src->peak()) {
101
+                while ($nn = $src->peak()){
102 102
                     $values[count($values) - 1] .= $nn;
103
-                    if ($nn === $n) {
103
+                    if ($nn === $n){
104 104
                         break;
105 105
                     }
106 106
                 }
107 107
                 continue;
108 108
             }
109 109
 
110
-            if ($n === ',' && $level === 0) {
110
+            if ($n === ',' && $level === 0){
111 111
                 $values[] = '';
112 112
                 continue;
113 113
             }
114 114
 
115 115
             $values[count($values) - 1] .= $n;
116 116
 
117
-            if ($n === '(' || $n === '[' || $n === '{') {
117
+            if ($n === '(' || $n === '[' || $n === '{'){
118 118
                 $level++;
119 119
                 continue;
120 120
             }
121 121
 
122
-            if ($n === ')' || $n === ']' || $n === '}') {
122
+            if ($n === ')' || $n === ']' || $n === '}'){
123 123
                 $level--;
124 124
             }
125 125
         }
Please login to merge, or discard this patch.
Braces   +22 added lines, -11 removed lines patch added patch discarded remove patch
@@ -36,7 +36,8 @@  discard block
 block discarded – undo
36 36
      */
37 37
     public function handle(Parser $parser, Assembler $asm, Token $token): void
38 38
     {
39
-        switch ($token->type) {
39
+        switch ($token->type)
40
+        {
40 41
             case DynamicGrammar::TYPE_DIRECTIVE:
41 42
                 $this->directive = new Directive(new Parser\Context($token, $parser->getPath()));
42 43
                 $asm->push($this->directive);
@@ -61,20 +62,23 @@  discard block
 block discarded – undo
61 62
                 break;
62 63
 
63 64
             case DynamicGrammar::TYPE_KEYWORD:
64
-                if ($this->directive !== null) {
65
+                if ($this->directive !== null)
66
+                {
65 67
                     $this->directive->name = $token->content;
66 68
                 }
67 69
                 break;
68 70
 
69 71
             case DynamicGrammar::TYPE_BODY:
70
-                if ($this->directive !== null) {
72
+                if ($this->directive !== null)
73
+                {
71 74
                     $this->directive->body = $token->content;
72 75
                     $this->directive->values = $this->fetchValues($this->directive->body);
73 76
 
74 77
                     $this->directive = null;
75 78
                 }
76 79
 
77
-                if ($this->output !== null) {
80
+                if ($this->output !== null)
81
+                {
78 82
                     $this->output->body = $token->content;
79 83
                 }
80 84
 
@@ -95,31 +99,38 @@  discard block
 block discarded – undo
95 99
 
96 100
         $src = new StringStream($body);
97 101
 
98
-        while ($n = $src->peak()) {
99
-            if (in_array($n, ['"', '"'])) {
102
+        while ($n = $src->peak())
103
+        {
104
+            if (in_array($n, ['"', '"']))
105
+            {
100 106
                 $values[count($values) - 1] .= $n;
101
-                while ($nn = $src->peak()) {
107
+                while ($nn = $src->peak())
108
+                {
102 109
                     $values[count($values) - 1] .= $nn;
103
-                    if ($nn === $n) {
110
+                    if ($nn === $n)
111
+                    {
104 112
                         break;
105 113
                     }
106 114
                 }
107 115
                 continue;
108 116
             }
109 117
 
110
-            if ($n === ',' && $level === 0) {
118
+            if ($n === ',' && $level === 0)
119
+            {
111 120
                 $values[] = '';
112 121
                 continue;
113 122
             }
114 123
 
115 124
             $values[count($values) - 1] .= $n;
116 125
 
117
-            if ($n === '(' || $n === '[' || $n === '{') {
126
+            if ($n === '(' || $n === '[' || $n === '{')
127
+            {
118 128
                 $level++;
119 129
                 continue;
120 130
             }
121 131
 
122
-            if ($n === ')' || $n === ']' || $n === '}') {
132
+            if ($n === ')' || $n === ']' || $n === '}')
133
+            {
123 134
                 $level--;
124 135
             }
125 136
         }
Please login to merge, or discard this patch.
src/Stempler/src/Parser/Syntax/Traits/MixinTrait.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@
 block discarded – undo
26 26
      */
27 27
     private function parseToken(Parser $parser, Token $token)
28 28
     {
29
-        if ($token->tokens === []) {
30
-            if ($token->type === Token::TYPE_RAW) {
29
+        if ($token->tokens === []){
30
+            if ($token->type === Token::TYPE_RAW){
31 31
                 return new Raw($token->content);
32 32
             }
33 33
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,8 +26,10 @@
 block discarded – undo
26 26
      */
27 27
     private function parseToken(Parser $parser, Token $token)
28 28
     {
29
-        if ($token->tokens === []) {
30
-            if ($token->type === Token::TYPE_RAW) {
29
+        if ($token->tokens === [])
30
+        {
31
+            if ($token->type === Token::TYPE_RAW)
32
+            {
31 33
                 return new Raw($token->content);
32 34
             }
33 35
 
Please login to merge, or discard this patch.
src/Stempler/src/Parser.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         $parser->path = $path;
59 59
         $parser->lexer = clone $this->lexer;
60 60
 
61
-        foreach ($parser->syntax as $grammar => $stx) {
61
+        foreach ($parser->syntax as $grammar => $stx){
62 62
             $parser->syntax[$grammar] = clone $stx;
63 63
         }
64 64
 
@@ -95,12 +95,12 @@  discard block
 block discarded – undo
95 95
     {
96 96
         $template = new Template();
97 97
 
98
-        try {
98
+        try{
99 99
             $this->parseTokens(
100 100
                 new Assembler($template, 'nodes'),
101 101
                 $this->lexer->parse($stream)
102 102
             );
103
-        } catch (SyntaxException $e) {
103
+        }catch (SyntaxException $e){
104 104
             throw new ParserException(
105 105
                 $e->getMessage(),
106 106
                 new Context($e->getToken(), $this->getPath()),
@@ -122,21 +122,21 @@  discard block
 block discarded – undo
122 122
         $node = $asm->getNode();
123 123
 
124 124
         $syntax = [];
125
-        foreach ($this->syntax as $grammar => $stx) {
125
+        foreach ($this->syntax as $grammar => $stx){
126 126
             $syntax[$grammar] = clone $stx;
127 127
         }
128 128
 
129
-        foreach ($tokens as $token) {
130
-            if (!isset($syntax[$token->grammar])) {
129
+        foreach ($tokens as $token){
130
+            if (!isset($syntax[$token->grammar])){
131 131
                 throw new SyntaxException('Undefined token', $token);
132 132
             }
133 133
 
134 134
             $syntax[$token->grammar]->handle($this, $asm, $token);
135 135
         }
136 136
 
137
-        if ($asm->getNode() !== $node) {
137
+        if ($asm->getNode() !== $node){
138 138
             throw new SyntaxException(
139
-                'Invalid node hierarchy, unclosed ' . $asm->getStackPath(),
139
+                'Invalid node hierarchy, unclosed '.$asm->getStackPath(),
140 140
                 $asm->getNode()->getContext()->getToken()
141 141
             );
142 142
         }
Please login to merge, or discard this patch.
Braces   +15 added lines, -7 removed lines patch added patch discarded remove patch
@@ -58,7 +58,8 @@  discard block
 block discarded – undo
58 58
         $parser->path = $path;
59 59
         $parser->lexer = clone $this->lexer;
60 60
 
61
-        foreach ($parser->syntax as $grammar => $stx) {
61
+        foreach ($parser->syntax as $grammar => $stx)
62
+        {
62 63
             $parser->syntax[$grammar] = clone $stx;
63 64
         }
64 65
 
@@ -95,12 +96,15 @@  discard block
 block discarded – undo
95 96
     {
96 97
         $template = new Template();
97 98
 
98
-        try {
99
+        try
100
+        {
99 101
             $this->parseTokens(
100 102
                 new Assembler($template, 'nodes'),
101 103
                 $this->lexer->parse($stream)
102 104
             );
103
-        } catch (SyntaxException $e) {
105
+        }
106
+        catch (SyntaxException $e)
107
+        {
104 108
             throw new ParserException(
105 109
                 $e->getMessage(),
106 110
                 new Context($e->getToken(), $this->getPath()),
@@ -122,19 +126,23 @@  discard block
 block discarded – undo
122 126
         $node = $asm->getNode();
123 127
 
124 128
         $syntax = [];
125
-        foreach ($this->syntax as $grammar => $stx) {
129
+        foreach ($this->syntax as $grammar => $stx)
130
+        {
126 131
             $syntax[$grammar] = clone $stx;
127 132
         }
128 133
 
129
-        foreach ($tokens as $token) {
130
-            if (!isset($syntax[$token->grammar])) {
134
+        foreach ($tokens as $token)
135
+        {
136
+            if (!isset($syntax[$token->grammar]))
137
+            {
131 138
                 throw new SyntaxException('Undefined token', $token);
132 139
             }
133 140
 
134 141
             $syntax[$token->grammar]->handle($this, $asm, $token);
135 142
         }
136 143
 
137
-        if ($asm->getNode() !== $node) {
144
+        if ($asm->getNode() !== $node)
145
+        {
138 146
             throw new SyntaxException(
139 147
                 'Invalid node hierarchy, unclosed ' . $asm->getStackPath(),
140 148
                 $asm->getNode()->getContext()->getToken()
Please login to merge, or discard this patch.
src/Stempler/src/Builder.php 2 patches
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -118,14 +118,14 @@  discard block
 block discarded – undo
118 118
      */
119 119
     public function compileTemplate(Template $tpl): Result
120 120
     {
121
-        try {
122
-            if (isset($this->visitors[self::STAGE_COMPILE])) {
121
+        try{
122
+            if (isset($this->visitors[self::STAGE_COMPILE])){
123 123
                 $traverser = new Traverser($this->visitors[self::STAGE_COMPILE]);
124 124
                 $tpl = $traverser->traverse([$tpl])[0];
125 125
             }
126 126
 
127 127
             return $this->compiler->compile($tpl);
128
-        } catch (CompilerException $e) {
128
+        }catch (CompilerException $e){
129 129
             throw $this->mapException($e);
130 130
         }
131 131
     }
@@ -141,21 +141,21 @@  discard block
 block discarded – undo
141 141
         $source = $this->loader->load($path);
142 142
         $stream = new StringStream($source->getContent());
143 143
 
144
-        try {
144
+        try{
145 145
             $tpl = $this->parser->withPath($path)->parse($stream);
146 146
             $tpl->setContext(new Context(
147 147
                 new Token(Token::TYPE_RAW, 0, ''),
148 148
                 $path
149 149
             ));
150
-        } catch (ParserException $e) {
150
+        }catch (ParserException $e){
151 151
             throw $this->mapException($e);
152 152
         }
153 153
 
154
-        try {
154
+        try{
155 155
             return $this->process($tpl);
156
-        } catch (ContextExceptionInterface $e) {
156
+        }catch (ContextExceptionInterface $e){
157 157
             throw $this->mapException($e);
158
-        } catch (\Throwable $e) {
158
+        }catch (\Throwable $e){
159 159
             throw $e;
160 160
         }
161 161
     }
@@ -168,17 +168,17 @@  discard block
 block discarded – undo
168 168
      */
169 169
     private function process(Template $template): Template
170 170
     {
171
-        if (isset($this->visitors[self::STAGE_PREPARE])) {
171
+        if (isset($this->visitors[self::STAGE_PREPARE])){
172 172
             $traverser = new Traverser($this->visitors[self::STAGE_PREPARE]);
173 173
             $template = $traverser->traverse([$template])[0];
174 174
         }
175 175
 
176
-        if (isset($this->visitors[self::STAGE_TRANSFORM])) {
176
+        if (isset($this->visitors[self::STAGE_TRANSFORM])){
177 177
             $traverser = new Traverser($this->visitors[self::STAGE_TRANSFORM]);
178 178
             $template = $traverser->traverse([$template])[0];
179 179
         }
180 180
 
181
-        if (isset($this->visitors[self::STAGE_FINALIZE])) {
181
+        if (isset($this->visitors[self::STAGE_FINALIZE])){
182 182
             $traverser = new Traverser($this->visitors[self::STAGE_FINALIZE]);
183 183
             $template = $traverser->traverse([$template])[0];
184 184
         }
@@ -194,17 +194,17 @@  discard block
 block discarded – undo
194 194
      */
195 195
     private function mapException(ContextExceptionInterface $e): ContextExceptionInterface
196 196
     {
197
-        if ($e->getContext()->getPath() === null) {
197
+        if ($e->getContext()->getPath() === null){
198 198
             return $e;
199 199
         }
200 200
 
201
-        try {
201
+        try{
202 202
             $source = $this->loader->load($e->getContext()->getPath());
203
-        } catch (LoaderException $te) {
203
+        }catch (LoaderException $te){
204 204
             return $e;
205 205
         }
206 206
 
207
-        if ($source->getFilename() === null) {
207
+        if ($source->getFilename() === null){
208 208
             return $e;
209 209
         }
210 210
 
Please login to merge, or discard this patch.
Braces   +35 added lines, -15 removed lines patch added patch discarded remove patch
@@ -118,14 +118,18 @@  discard block
 block discarded – undo
118 118
      */
119 119
     public function compileTemplate(Template $tpl): Result
120 120
     {
121
-        try {
122
-            if (isset($this->visitors[self::STAGE_COMPILE])) {
121
+        try
122
+        {
123
+            if (isset($this->visitors[self::STAGE_COMPILE]))
124
+            {
123 125
                 $traverser = new Traverser($this->visitors[self::STAGE_COMPILE]);
124 126
                 $tpl = $traverser->traverse([$tpl])[0];
125 127
             }
126 128
 
127 129
             return $this->compiler->compile($tpl);
128
-        } catch (CompilerException $e) {
130
+        }
131
+        catch (CompilerException $e)
132
+        {
129 133
             throw $this->mapException($e);
130 134
         }
131 135
     }
@@ -141,21 +145,29 @@  discard block
 block discarded – undo
141 145
         $source = $this->loader->load($path);
142 146
         $stream = new StringStream($source->getContent());
143 147
 
144
-        try {
148
+        try
149
+        {
145 150
             $tpl = $this->parser->withPath($path)->parse($stream);
146 151
             $tpl->setContext(new Context(
147 152
                 new Token(Token::TYPE_RAW, 0, ''),
148 153
                 $path
149 154
             ));
150
-        } catch (ParserException $e) {
155
+        }
156
+        catch (ParserException $e)
157
+        {
151 158
             throw $this->mapException($e);
152 159
         }
153 160
 
154
-        try {
161
+        try
162
+        {
155 163
             return $this->process($tpl);
156
-        } catch (ContextExceptionInterface $e) {
164
+        }
165
+        catch (ContextExceptionInterface $e)
166
+        {
157 167
             throw $this->mapException($e);
158
-        } catch (\Throwable $e) {
168
+        }
169
+        catch (\Throwable $e)
170
+        {
159 171
             throw $e;
160 172
         }
161 173
     }
@@ -168,17 +180,20 @@  discard block
 block discarded – undo
168 180
      */
169 181
     private function process(Template $template): Template
170 182
     {
171
-        if (isset($this->visitors[self::STAGE_PREPARE])) {
183
+        if (isset($this->visitors[self::STAGE_PREPARE]))
184
+        {
172 185
             $traverser = new Traverser($this->visitors[self::STAGE_PREPARE]);
173 186
             $template = $traverser->traverse([$template])[0];
174 187
         }
175 188
 
176
-        if (isset($this->visitors[self::STAGE_TRANSFORM])) {
189
+        if (isset($this->visitors[self::STAGE_TRANSFORM]))
190
+        {
177 191
             $traverser = new Traverser($this->visitors[self::STAGE_TRANSFORM]);
178 192
             $template = $traverser->traverse([$template])[0];
179 193
         }
180 194
 
181
-        if (isset($this->visitors[self::STAGE_FINALIZE])) {
195
+        if (isset($this->visitors[self::STAGE_FINALIZE]))
196
+        {
182 197
             $traverser = new Traverser($this->visitors[self::STAGE_FINALIZE]);
183 198
             $template = $traverser->traverse([$template])[0];
184 199
         }
@@ -194,17 +209,22 @@  discard block
 block discarded – undo
194 209
      */
195 210
     private function mapException(ContextExceptionInterface $e): ContextExceptionInterface
196 211
     {
197
-        if ($e->getContext()->getPath() === null) {
212
+        if ($e->getContext()->getPath() === null)
213
+        {
198 214
             return $e;
199 215
         }
200 216
 
201
-        try {
217
+        try
218
+        {
202 219
             $source = $this->loader->load($e->getContext()->getPath());
203
-        } catch (LoaderException $te) {
220
+        }
221
+        catch (LoaderException $te)
222
+        {
204 223
             return $e;
205 224
         }
206 225
 
207
-        if ($source->getFilename() === null) {
226
+        if ($source->getFilename() === null)
227
+        {
208 228
             return $e;
209 229
         }
210 230
 
Please login to merge, or discard this patch.
src/Stempler/src/Compiler.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,16 +41,16 @@
 block discarded – undo
41 41
     {
42 42
         $result = $result ?? new Result();
43 43
 
44
-        if (is_array($node)) {
45
-            foreach ($node as $child) {
44
+        if (is_array($node)){
45
+            foreach ($node as $child){
46 46
                 $this->compile($child, $result);
47 47
             }
48 48
 
49 49
             return $result;
50 50
         }
51 51
 
52
-        foreach ($this->renders as $renderer) {
53
-            if ($renderer->render($this, $result, $node)) {
52
+        foreach ($this->renders as $renderer){
53
+            if ($renderer->render($this, $result, $node)){
54 54
                 return $result;
55 55
             }
56 56
         }
Please login to merge, or discard this patch.
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,16 +41,20 @@
 block discarded – undo
41 41
     {
42 42
         $result = $result ?? new Result();
43 43
 
44
-        if (is_array($node)) {
45
-            foreach ($node as $child) {
44
+        if (is_array($node))
45
+        {
46
+            foreach ($node as $child)
47
+            {
46 48
                 $this->compile($child, $result);
47 49
             }
48 50
 
49 51
             return $result;
50 52
         }
51 53
 
52
-        foreach ($this->renders as $renderer) {
53
-            if ($renderer->render($this, $result, $node)) {
54
+        foreach ($this->renders as $renderer)
55
+        {
56
+            if ($renderer->render($this, $result, $node))
57
+            {
54 58
                 return $result;
55 59
             }
56 60
         }
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.