@@ -70,8 +70,8 @@ discard block |
||
70 | 70 | protected string $name; |
71 | 71 | |
72 | 72 | /** |
73 | - * {@inheritdoc} |
|
74 | - */ |
|
73 | + * {@inheritdoc} |
|
74 | + */ |
|
75 | 75 | public function __construct(string $markup, &$tokens, Parser $parser) |
76 | 76 | { |
77 | 77 | $lexer = new Lexer('/(' . Token::VARIABLE_NAME . ')/'); |
@@ -86,8 +86,8 @@ discard block |
||
86 | 86 | } |
87 | 87 | |
88 | 88 | /** |
89 | - * {@inheritdoc} |
|
90 | - */ |
|
89 | + * {@inheritdoc} |
|
90 | + */ |
|
91 | 91 | public function render(Context $context): string |
92 | 92 | { |
93 | 93 | // if the value is not set in the environment check to see if it |
@@ -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 | /** |
67 | 66 | * Name of the variable to decrement |
@@ -72,8 +71,7 @@ discard block |
||
72 | 71 | /** |
73 | 72 | * {@inheritdoc} |
74 | 73 | */ |
75 | - public function __construct(string $markup, &$tokens, Parser $parser) |
|
76 | - { |
|
74 | + public function __construct(string $markup, &$tokens, Parser $parser) { |
|
77 | 75 | $lexer = new Lexer('/(' . Token::VARIABLE_NAME . ')/'); |
78 | 76 | if ($lexer->match($markup)) { |
79 | 77 | $this->name = $lexer->getStringMatch(0); |
@@ -63,15 +63,15 @@ discard block |
||
63 | 63 | class IncrementTag extends AbstractTag |
64 | 64 | { |
65 | 65 | |
66 | - /** |
|
67 | - * Name of the variable to increment |
|
68 | - * @var string |
|
69 | - */ |
|
66 | + /** |
|
67 | + * Name of the variable to increment |
|
68 | + * @var string |
|
69 | + */ |
|
70 | 70 | protected string $name; |
71 | 71 | |
72 | 72 | /** |
73 | - * {@inheritdoc} |
|
74 | - */ |
|
73 | + * {@inheritdoc} |
|
74 | + */ |
|
75 | 75 | public function __construct(string $markup, &$tokens, Parser $parser) |
76 | 76 | { |
77 | 77 | $lexer = new Lexer('/(' . Token::VARIABLE_NAME . ')/'); |
@@ -86,8 +86,8 @@ discard block |
||
86 | 86 | } |
87 | 87 | |
88 | 88 | /** |
89 | - * {@inheritdoc} |
|
90 | - */ |
|
89 | + * {@inheritdoc} |
|
90 | + */ |
|
91 | 91 | public function render(Context $context): string |
92 | 92 | { |
93 | 93 | // if the value is not set in the environment check to see if it |
@@ -60,8 +60,7 @@ discard block |
||
60 | 60 | * Class IncrementTag |
61 | 61 | * @package Platine\Template\Tag |
62 | 62 | */ |
63 | -class IncrementTag extends AbstractTag |
|
64 | -{ |
|
63 | +class IncrementTag extends AbstractTag { |
|
65 | 64 | |
66 | 65 | /** |
67 | 66 | * Name of the variable to increment |
@@ -72,8 +71,7 @@ discard block |
||
72 | 71 | /** |
73 | 72 | * {@inheritdoc} |
74 | 73 | */ |
75 | - public function __construct(string $markup, &$tokens, Parser $parser) |
|
76 | - { |
|
74 | + public function __construct(string $markup, &$tokens, Parser $parser) { |
|
77 | 75 | $lexer = new Lexer('/(' . Token::VARIABLE_NAME . ')/'); |
78 | 76 | if ($lexer->match($markup)) { |
79 | 77 | $this->name = $lexer->getStringMatch(0); |
@@ -59,8 +59,8 @@ |
||
59 | 59 | class ContinueTag extends AbstractTag |
60 | 60 | { |
61 | 61 | /** |
62 | - * {@inheritdoc} |
|
63 | - */ |
|
62 | + * {@inheritdoc} |
|
63 | + */ |
|
64 | 64 | public function render(Context $context): string |
65 | 65 | { |
66 | 66 | $context->setRegister('continue', true); |
@@ -56,8 +56,7 @@ |
||
56 | 56 | * Class ContinueTag |
57 | 57 | * @package Platine\Template\Tag |
58 | 58 | */ |
59 | -class ContinueTag extends AbstractTag |
|
60 | -{ |
|
59 | +class ContinueTag extends AbstractTag { |
|
61 | 60 | /** |
62 | 61 | * {@inheritdoc} |
63 | 62 | */ |
@@ -59,8 +59,8 @@ |
||
59 | 59 | class BreakTag extends AbstractTag |
60 | 60 | { |
61 | 61 | /** |
62 | - * {@inheritdoc} |
|
63 | - */ |
|
62 | + * {@inheritdoc} |
|
63 | + */ |
|
64 | 64 | public function render(Context $context): string |
65 | 65 | { |
66 | 66 | $context->setRegister('break', true); |
@@ -56,8 +56,7 @@ |
||
56 | 56 | * Class BreakTag |
57 | 57 | * @package Platine\Template\Tag |
58 | 58 | */ |
59 | -class BreakTag extends AbstractTag |
|
60 | -{ |
|
59 | +class BreakTag extends AbstractTag { |
|
61 | 60 | /** |
62 | 61 | * {@inheritdoc} |
63 | 62 | */ |
@@ -90,8 +90,8 @@ discard block |
||
90 | 90 | protected $right = null; |
91 | 91 | |
92 | 92 | /** |
93 | - * {@inheritdoc} |
|
94 | - */ |
|
93 | + * {@inheritdoc} |
|
94 | + */ |
|
95 | 95 | public function __construct(string $markup, &$tokens, Parser $parser) |
96 | 96 | { |
97 | 97 | parent::__construct($markup, $tokens, $parser); |
@@ -108,16 +108,16 @@ discard block |
||
108 | 108 | } |
109 | 109 | |
110 | 110 | /** |
111 | - * {@inheritdoc} |
|
112 | - */ |
|
111 | + * {@inheritdoc} |
|
112 | + */ |
|
113 | 113 | protected function endTag(): void |
114 | 114 | { |
115 | 115 | $this->pushNodeList(); |
116 | 116 | } |
117 | 117 | |
118 | 118 | /** |
119 | - * {@inheritdoc} |
|
120 | - */ |
|
119 | + * {@inheritdoc} |
|
120 | + */ |
|
121 | 121 | protected function unknownTag(string $tag, string $param, array $tokens): void |
122 | 122 | { |
123 | 123 | $whenLexer = new Lexer('/' . Token::QUOTED_FRAGMENT . '/'); |
@@ -150,8 +150,8 @@ discard block |
||
150 | 150 | } |
151 | 151 | |
152 | 152 | /** |
153 | - * {@inheritdoc} |
|
154 | - */ |
|
153 | + * {@inheritdoc} |
|
154 | + */ |
|
155 | 155 | public function render(Context $context): string |
156 | 156 | { |
157 | 157 | $output = ''; |
@@ -62,8 +62,7 @@ discard block |
||
62 | 62 | * Class CaseTag |
63 | 63 | * @package Platine\Template\Tag |
64 | 64 | */ |
65 | -class CaseTag extends AbstractCondition |
|
66 | -{ |
|
65 | +class CaseTag extends AbstractCondition { |
|
67 | 66 | |
68 | 67 | /** |
69 | 68 | * Stack of node list |
@@ -92,8 +91,7 @@ discard block |
||
92 | 91 | /** |
93 | 92 | * {@inheritdoc} |
94 | 93 | */ |
95 | - public function __construct(string $markup, &$tokens, Parser $parser) |
|
96 | - { |
|
94 | + public function __construct(string $markup, &$tokens, Parser $parser) { |
|
97 | 95 | parent::__construct($markup, $tokens, $parser); |
98 | 96 | |
99 | 97 | $lexer = new Lexer('/' . Token::QUOTED_FRAGMENT . '/'); |
@@ -60,8 +60,8 @@ |
||
60 | 60 | { |
61 | 61 | |
62 | 62 | /** |
63 | - * {@inheritdoc} |
|
64 | - */ |
|
63 | + * {@inheritdoc} |
|
64 | + */ |
|
65 | 65 | public function render(Context $context): string |
66 | 66 | { |
67 | 67 | return ''; |
@@ -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 | /** |
63 | 62 | * {@inheritdoc} |
@@ -76,8 +76,8 @@ discard block |
||
76 | 76 | protected string $variableName; |
77 | 77 | |
78 | 78 | /** |
79 | - * {@inheritdoc} |
|
80 | - */ |
|
79 | + * {@inheritdoc} |
|
80 | + */ |
|
81 | 81 | public function __construct(string $markup, &$tokens, Parser $parser) |
82 | 82 | { |
83 | 83 | $lexer = new Lexer('/(\w+)\s*=\s*(.*)\s*/'); |
@@ -93,8 +93,8 @@ discard block |
||
93 | 93 | } |
94 | 94 | |
95 | 95 | /** |
96 | - * {@inheritdoc} |
|
97 | - */ |
|
96 | + * {@inheritdoc} |
|
97 | + */ |
|
98 | 98 | public function render(Context $context): string |
99 | 99 | { |
100 | 100 | $output = $this->variable->render($context); |
@@ -60,8 +60,7 @@ discard block |
||
60 | 60 | * Class SetTag |
61 | 61 | * @package Platine\Template\Tag |
62 | 62 | */ |
63 | -class SetTag extends AbstractTag |
|
64 | -{ |
|
63 | +class SetTag extends AbstractTag { |
|
65 | 64 | |
66 | 65 | /** |
67 | 66 | * The variable instance to assign |
@@ -78,8 +77,7 @@ discard block |
||
78 | 77 | /** |
79 | 78 | * {@inheritdoc} |
80 | 79 | */ |
81 | - public function __construct(string $markup, &$tokens, Parser $parser) |
|
82 | - { |
|
80 | + public function __construct(string $markup, &$tokens, Parser $parser) { |
|
83 | 81 | $lexer = new Lexer('/(\w+)\s*=\s*(.*)\s*/'); |
84 | 82 | if ($lexer->match($markup)) { |
85 | 83 | $this->variableName = $lexer->getStringMatch(1); |
@@ -69,8 +69,8 @@ |
||
69 | 69 | protected string $blockName; |
70 | 70 | |
71 | 71 | /** |
72 | - * {@inheritdoc} |
|
73 | - */ |
|
72 | + * {@inheritdoc} |
|
73 | + */ |
|
74 | 74 | public function __construct(string $markup, &$tokens, Parser $parser) |
75 | 75 | { |
76 | 76 | $lexer = new Lexer('/(\w+)/'); |
@@ -58,8 +58,7 @@ discard block |
||
58 | 58 | * Class BlockTag |
59 | 59 | * @package Platine\Template\Tag |
60 | 60 | */ |
61 | -class BlockTag extends AbstractBlock |
|
62 | -{ |
|
61 | +class BlockTag extends AbstractBlock { |
|
63 | 62 | |
64 | 63 | |
65 | 64 | /** |
@@ -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('/(\w+)/'); |
77 | 75 | if ($lexer->match($markup)) { |
78 | 76 | $this->blockName = $lexer->getStringMatch(1); |
@@ -57,8 +57,8 @@ |
||
57 | 57 | { |
58 | 58 | |
59 | 59 | /** |
60 | - * {@inheritdoc} |
|
61 | - */ |
|
60 | + * {@inheritdoc} |
|
61 | + */ |
|
62 | 62 | protected function negateCondition($value) |
63 | 63 | { |
64 | 64 | return !$value; |
@@ -53,14 +53,12 @@ |
||
53 | 53 | * Class IfnotTag |
54 | 54 | * @package Platine\Template\Tag |
55 | 55 | */ |
56 | -class IfnotTag extends IfTag |
|
57 | -{ |
|
56 | +class IfnotTag extends IfTag { |
|
58 | 57 | |
59 | 58 | /** |
60 | 59 | * {@inheritdoc} |
61 | 60 | */ |
62 | - protected function negateCondition($value) |
|
63 | - { |
|
61 | + protected function negateCondition($value) { |
|
64 | 62 | return !$value; |
65 | 63 | } |
66 | 64 | } |