Passed
Push — develop ( 0d572e...9e6f62 )
by nguereza
02:17
created
src/Exception/TemplateException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,6 +38,5 @@
 block discarded – undo
38 38
  * Class TemplateException
39 39
  * @package Platine\Template\Exception
40 40
  */
41
-class TemplateException extends Exception
42
-{
41
+class TemplateException extends Exception {
43 42
 }
Please login to merge, or discard this patch.
src/Exception/LoaderException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,6 +41,5 @@
 block discarded – undo
41 41
  * Class LoaderException
42 42
  * @package Platine\Template\Exception
43 43
  */
44
-class LoaderException extends TemplateException
45
-{
44
+class LoaderException extends TemplateException {
46 45
 }
Please login to merge, or discard this patch.
src/Exception/RenderException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,6 +39,5 @@
 block discarded – undo
39 39
  * Class RenderException
40 40
  * @package Platine\Template\Exception
41 41
  */
42
-class RenderException extends TemplateException
43
-{
42
+class RenderException extends TemplateException {
44 43
 }
Please login to merge, or discard this patch.
src/Exception/NotFoundException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,6 +39,5 @@
 block discarded – undo
39 39
  * Class NotFoundException
40 40
  * @package Platine\Template\Exception
41 41
  */
42
-class NotFoundException extends LoaderException
43
-{
42
+class NotFoundException extends LoaderException {
44 43
 }
Please login to merge, or discard this patch.
src/Exception/ParseException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,6 +39,5 @@
 block discarded – undo
39 39
  * Class ParseException
40 40
  * @package Platine\Template\Exception
41 41
  */
42
-class ParseException extends TemplateException
43
-{
42
+class ParseException extends TemplateException {
44 43
 }
Please login to merge, or discard this patch.
src/Parser/Document.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -57,16 +57,14 @@
 block discarded – undo
57 57
  * Class Document
58 58
  * @package Platine\Template\Parser
59 59
  */
60
-class Document extends AbstractBlock
61
-{
60
+class Document extends AbstractBlock {
62 61
 
63 62
     /**
64 63
      * Create new instance
65 64
      * @param array<int, string> $tokens
66 65
      * @param Parser $parser
67 66
      */
68
-    public function __construct(array &$tokens, Parser $parser)
69
-    {
67
+    public function __construct(array &$tokens, Parser $parser) {
70 68
         $this->parser = $parser;
71 69
 
72 70
         $this->parse($tokens);
Please login to merge, or discard this patch.
src/Parser/Context.php 1 patch
Braces   +10 added lines, -20 removed lines patch added patch discarded remove patch
@@ -58,8 +58,7 @@  discard block
 block discarded – undo
58 58
  * Class Context
59 59
  * @package Platine\Template\Parser
60 60
  */
61
-class Context
62
-{
61
+class Context {
63 62
     /**
64 63
      * The local scopes
65 64
      * @var array<int, array<string, mixed>>
@@ -103,8 +102,7 @@  discard block
 block discarded – undo
103 102
      * @param array<string, mixed> $assigns
104 103
      * @param array<string, mixed> $registers
105 104
      */
106
-    public function __construct(array $assigns = [], array $registers = [])
107
-    {
105
+    public function __construct(array $assigns = [], array $registers = []) {
108 106
         $this->assigns = [$assigns];
109 107
         $this->registers = $registers;
110 108
         $this->filters = new FilterCollection();
@@ -128,8 +126,7 @@  discard block
 block discarded – undo
128 126
      * @param callable|null $tickCallback
129 127
      * @return $this
130 128
      */
131
-    public function setTickCallback(?callable $tickCallback)
132
-    {
129
+    public function setTickCallback(?callable $tickCallback) {
133 130
         $this->tickCallback = $tickCallback;
134 131
 
135 132
         return $this;
@@ -154,8 +151,7 @@  discard block
 block discarded – undo
154 151
      * @param array<int, mixed> $args
155 152
      * @return mixed
156 153
      */
157
-    public function invokeFilter(string $name, $value, array $args = [])
158
-    {
154
+    public function invokeFilter(string $name, $value, array $args = []) {
159 155
         try {
160 156
             return $this->filters->invoke($name, $value, $args);
161 157
         } catch (TypeError $ex) {
@@ -199,8 +195,7 @@  discard block
 block discarded – undo
199 195
      * @param string $key
200 196
      * @return mixed
201 197
      */
202
-    public function get(string $key)
203
-    {
198
+    public function get(string $key) {
204 199
         return $this->resolve($key);
205 200
     }
206 201
 
@@ -260,8 +255,7 @@  discard block
 block discarded – undo
260 255
      * @param string $name
261 256
      * @return mixed|null
262 257
      */
263
-    public function getRegister(string $name)
264
-    {
258
+    public function getRegister(string $name) {
265 259
         if ($this->hasRegister($name)) {
266 260
             return $this->registers[$name];
267 261
         }
@@ -297,8 +291,7 @@  discard block
 block discarded – undo
297 291
      * @param string $name
298 292
      * @return mixed|null
299 293
      */
300
-    public function getEnvironment(string $name)
301
-    {
294
+    public function getEnvironment(string $name) {
302 295
         if ($this->hasEnvironment($name)) {
303 296
             return $this->environments[$name];
304 297
         }
@@ -338,8 +331,7 @@  discard block
 block discarded – undo
338 331
      * @param string $key
339 332
      * @return mixed|null
340 333
      */
341
-    protected function resolve(string $key)
342
-    {
334
+    protected function resolve(string $key) {
343 335
         if ($key === 'null') {
344 336
             return null;
345 337
         }
@@ -377,8 +369,7 @@  discard block
 block discarded – undo
377 369
      * @param string $key
378 370
      * @return mixed|null
379 371
      */
380
-    protected function fetch(string $key)
381
-    {
372
+    protected function fetch(string $key) {
382 373
         if (array_key_exists($key, $this->environments)) {
383 374
             return $this->environments[$key];
384 375
         }
@@ -403,8 +394,7 @@  discard block
 block discarded – undo
403 394
      * @param string $key
404 395
      * @return mixed|null
405 396
      */
406
-    protected function variable(string $key)
407
-    {
397
+    protected function variable(string $key) {
408 398
         // Support numeric and variable array indicies
409 399
         $matches = [];
410 400
         if (preg_match('|\[[0-9]+\]|', $key)) {
Please login to merge, or discard this patch.
src/Parser/Drop.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -61,8 +61,7 @@  discard block
 block discarded – undo
61 61
  * If you would like to make data available to the web designers which you don't
62 62
  * want loaded unless needed then a drop is a great way to do that.
63 63
  */
64
-abstract class Drop
65
-{
64
+abstract class Drop {
66 65
     /**
67 66
      * The context instance to use
68 67
      * @var Context
@@ -96,8 +95,7 @@  discard block
 block discarded – undo
96 95
      * @param string $method
97 96
      * @return mixed
98 97
      */
99
-    public function invokeDrop(string $method)
100
-    {
98
+    public function invokeDrop(string $method) {
101 99
         $result = $this->beforeMethod($method);
102 100
         if ($result === null && is_callable([$this, $method])) {
103 101
             $result = $this->{$method}();
@@ -129,8 +127,7 @@  discard block
 block discarded – undo
129 127
      * @param string $method
130 128
      * @return mixed
131 129
      */
132
-    protected function beforeMethod(string $method)
133
-    {
130
+    protected function beforeMethod(string $method) {
134 131
         return null;
135 132
     }
136 133
 }
Please login to merge, or discard this patch.
src/Parser/AbstractFilter.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,7 +53,6 @@
 block discarded – undo
53 53
  * Class AbstractFilter
54 54
  * @package Platine\Template\Parser
55 55
  */
56
-abstract class AbstractFilter
57
-{
56
+abstract class AbstractFilter {
58 57
 
59 58
 }
Please login to merge, or discard this patch.