Passed
Push — master ( ab34fb...f59aed )
by Eric
13:35
created
src/Template.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@
 block discarded – undo
152 152
         }
153 153
 
154 154
         // Process replacements
155
-		/** @var string $replace **/
155
+        /** @var string $replace **/
156 156
         foreach ($this->tplVars AS $find => $replace) {
157 157
             $contents = \str_replace(\sprintf(
158 158
                 '%s%s%s',
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 /**
6 6
  * Simple Template Engine
Please login to merge, or discard this patch.
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -140,20 +140,20 @@
 block discarded – undo
140 140
     public function parse(string $tplFile): string
141 141
     {
142 142
         // Make sure it's a valid file, and it exists
143
-        if (!\is_file($tplFile) OR !\is_readable($tplFile)) {
143
+        if (!\is_file($tplFile) or !\is_readable($tplFile)) {
144 144
             throw new \InvalidArgumentException(sprintf('"%s" does not exist or is not a file.', $tplFile));
145 145
         }
146 146
 
147 147
         $contents = \file_get_contents($tplFile);
148 148
 
149 149
         // Make sure it has content. file_get_contents can return 'false' on error
150
-        if ($contents === '' OR $contents === false) {
150
+        if ($contents === '' or $contents === false) {
151 151
             throw new \Exception(\sprintf('"%s" does not appear to have any valid content.', $tplFile));
152 152
         }
153 153
 
154 154
         // Process replacements
155 155
 		/** @var string $replace **/
156
-        foreach ($this->tplVars AS $find => $replace) {
156
+        foreach ($this->tplVars as $find => $replace) {
157 157
             $contents = \str_replace(\sprintf(
158 158
                 '%s%s%s',
159 159
                 $this->leftDelimiter,
Please login to merge, or discard this patch.
tests/src/TemplateTest.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 /**
6 6
  * Simple Template Engine
Please login to merge, or discard this patch.
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 
151 151
 </body>
152 152
 </html>
153
-HTML);
153
+html);
154 154
 
155 155
         $template->assign([
156 156
             'title'   => 'Simple Template Engine Test',
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 
177 177
 </body>
178 178
 </html>
179
-HTML, $data);
179
+html, $data);
180 180
     }
181 181
 
182 182
     /**
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
 
225 225
 </body>
226 226
 </html>
227
-HTML);
227
+html);
228 228
 
229 229
         $template->assign([
230 230
             'title'   => 'Simple Template Engine Test',
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 
248 248
 </body>
249 249
 </html>
250
-HTML, $data);
250
+html, $data);
251 251
 
252 252
     }
253 253
 }
Please login to merge, or discard this patch.
examples/example.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 /**
6 6
  * Simple Template Engine
Please login to merge, or discard this patch.
examples/customDelimiter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 /**
6 6
  * Simple Template Engine
Please login to merge, or discard this patch.