@@ -61,8 +61,7 @@ |
||
61 | 61 | * Class Template |
62 | 62 | * @package Platine\Template |
63 | 63 | */ |
64 | -class Template |
|
65 | -{ |
|
64 | +class Template { |
|
66 | 65 | /** |
67 | 66 | * The configuration instance |
68 | 67 | * @var Configuration |
@@ -55,8 +55,7 @@ discard block |
||
55 | 55 | * Class StringLoader |
56 | 56 | * @package Platine\Template\Loader |
57 | 57 | */ |
58 | -class StringLoader implements LoaderInterface |
|
59 | -{ |
|
58 | +class StringLoader implements LoaderInterface { |
|
60 | 59 | /** |
61 | 60 | * The string hash data |
62 | 61 | * @var array<string, string> |
@@ -67,8 +66,7 @@ discard block |
||
67 | 66 | * Create new instance |
68 | 67 | * @param array<string, string> $data |
69 | 68 | */ |
70 | - public function __construct(array $data) |
|
71 | - { |
|
69 | + public function __construct(array $data) { |
|
72 | 70 | $this->data = $data; |
73 | 71 | } |
74 | 72 |
@@ -59,8 +59,7 @@ discard block |
||
59 | 59 | * Class FileLoader |
60 | 60 | * @package Platine\Template\Loader |
61 | 61 | */ |
62 | -class FileLoader implements LoaderInterface |
|
63 | -{ |
|
62 | +class FileLoader implements LoaderInterface { |
|
64 | 63 | /** |
65 | 64 | * The configuration instance |
66 | 65 | * @var Configuration |
@@ -77,8 +76,7 @@ discard block |
||
77 | 76 | * Create new instance |
78 | 77 | * @param Configuration|null $config |
79 | 78 | */ |
80 | - public function __construct(?Configuration $config = null) |
|
81 | - { |
|
79 | + public function __construct(?Configuration $config = null) { |
|
82 | 80 | $this->config = $config ?? new Configuration([]); |
83 | 81 | |
84 | 82 | $dir = $this->config->get('template_dir'); |
@@ -53,8 +53,7 @@ |
||
53 | 53 | * Class LoaderInterface |
54 | 54 | * @package Platine\Template\Loader |
55 | 55 | */ |
56 | -interface LoaderInterface |
|
57 | -{ |
|
56 | +interface LoaderInterface { |
|
58 | 57 | /** |
59 | 58 | * Return the template content to be use |
60 | 59 | * for parse and rendering |
@@ -53,8 +53,7 @@ |
||
53 | 53 | * Class Helper |
54 | 54 | * @package Platine\Template\Util |
55 | 55 | */ |
56 | -class Helper |
|
57 | -{ |
|
56 | +class Helper { |
|
58 | 57 | /** |
59 | 58 | * Normalize path |
60 | 59 | * @param string $path |
@@ -57,8 +57,7 @@ |
||
57 | 57 | * Class RawTag |
58 | 58 | * @package Platine\Template\Tag |
59 | 59 | */ |
60 | -class RawTag extends AbstractBlock |
|
61 | -{ |
|
60 | +class RawTag extends AbstractBlock { |
|
62 | 61 | /** |
63 | 62 | * {@inheritdoc} |
64 | 63 | */ |
@@ -56,8 +56,7 @@ |
||
56 | 56 | * Class CommentTag |
57 | 57 | * @package Platine\Template\Tag |
58 | 58 | */ |
59 | -class CommentTag extends AbstractBlock |
|
60 | -{ |
|
59 | +class CommentTag extends AbstractBlock { |
|
61 | 60 | /** |
62 | 61 | * {@inheritdoc} |
63 | 62 | */ |
@@ -60,8 +60,7 @@ discard block |
||
60 | 60 | * Class DecrementTag |
61 | 61 | * @package Platine\Template\Tag |
62 | 62 | */ |
63 | -class DecrementTag extends AbstractTag |
|
64 | -{ |
|
63 | +class DecrementTag extends AbstractTag { |
|
65 | 64 | /** |
66 | 65 | * Name of the variable to decrement |
67 | 66 | * @var string |
@@ -71,8 +70,7 @@ discard block |
||
71 | 70 | /** |
72 | 71 | * {@inheritdoc} |
73 | 72 | */ |
74 | - public function __construct(string $markup, &$tokens, Parser $parser) |
|
75 | - { |
|
73 | + public function __construct(string $markup, &$tokens, Parser $parser) { |
|
76 | 74 | $lexer = new Lexer('/(' . Token::VARIABLE_NAME . ')/'); |
77 | 75 | if ($lexer->match($markup)) { |
78 | 76 | $this->name = $lexer->getStringMatch(0); |
@@ -62,8 +62,7 @@ discard block |
||
62 | 62 | * Class ForTag |
63 | 63 | * @package Platine\Template\Tag |
64 | 64 | */ |
65 | -class ForTag extends AbstractBlock |
|
66 | -{ |
|
65 | +class ForTag extends AbstractBlock { |
|
67 | 66 | /** |
68 | 67 | * Type digit |
69 | 68 | */ |
@@ -108,8 +107,7 @@ discard block |
||
108 | 107 | /** |
109 | 108 | * {@inheritdoc} |
110 | 109 | */ |
111 | - public function __construct(string $markup, &$tokens, Parser $parser) |
|
112 | - { |
|
110 | + public function __construct(string $markup, &$tokens, Parser $parser) { |
|
113 | 111 | parent::__construct($markup, $tokens, $parser); |
114 | 112 | |
115 | 113 | $lexerCollection = new Lexer('/(\w+)\s+in\s+(' . Token::VARIABLE_NAME . ')/'); |