@@ -62,15 +62,15 @@ discard block |
||
| 62 | 62 | */ |
| 63 | 63 | class IncrementTag extends AbstractTag |
| 64 | 64 | { |
| 65 | - /** |
|
| 66 | - * Name of the variable to increment |
|
| 67 | - * @var string |
|
| 68 | - */ |
|
| 65 | + /** |
|
| 66 | + * Name of the variable to increment |
|
| 67 | + * @var string |
|
| 68 | + */ |
|
| 69 | 69 | protected string $name; |
| 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('/(' . Token::VARIABLE_NAME . ')/'); |
@@ -85,8 +85,8 @@ discard block |
||
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | /** |
| 88 | - * {@inheritdoc} |
|
| 89 | - */ |
|
| 88 | + * {@inheritdoc} |
|
| 89 | + */ |
|
| 90 | 90 | public function render(Context $context): string |
| 91 | 91 | { |
| 92 | 92 | // if the value is not set in the environment check to see if it |
@@ -56,13 +56,13 @@ |
||
| 56 | 56 | * @package Platine\Template\Parser |
| 57 | 57 | * |
| 58 | 58 | */ |
| 59 | - /** |
|
| 60 | - * A drop is a class which allows you to export DOM like things to template. |
|
| 61 | - * Methods of drops are callable. |
|
| 62 | - * The main use for drops is the implement lazy loaded objects. |
|
| 63 | - * If you would like to make data available to the web designers which you don't |
|
| 64 | - * want loaded unless needed then a drop is a great way to do that. |
|
| 65 | - */ |
|
| 59 | + /** |
|
| 60 | + * A drop is a class which allows you to export DOM like things to template. |
|
| 61 | + * Methods of drops are callable. |
|
| 62 | + * The main use for drops is the implement lazy loaded objects. |
|
| 63 | + * If you would like to make data available to the web designers which you don't |
|
| 64 | + * want loaded unless needed then a drop is a great way to do that. |
|
| 65 | + */ |
|
| 66 | 66 | abstract class Drop implements Stringable |
| 67 | 67 | { |
| 68 | 68 | /** |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | |
| 68 | 68 | /** |
| 69 | 69 | * {@inheritdoc} |
| 70 | - */ |
|
| 70 | + */ |
|
| 71 | 71 | public function read(string $name): string |
| 72 | 72 | { |
| 73 | 73 | if (array_key_exists($name, $this->data) === false) { |
@@ -89,8 +89,8 @@ discard block |
||
| 89 | 89 | protected mixed $right = null; |
| 90 | 90 | |
| 91 | 91 | /** |
| 92 | - * {@inheritdoc} |
|
| 93 | - */ |
|
| 92 | + * {@inheritdoc} |
|
| 93 | + */ |
|
| 94 | 94 | public function __construct(string $markup, &$tokens, Parser $parser) |
| 95 | 95 | { |
| 96 | 96 | parent::__construct($markup, $tokens, $parser); |
@@ -107,16 +107,16 @@ discard block |
||
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | /** |
| 110 | - * {@inheritdoc} |
|
| 111 | - */ |
|
| 110 | + * {@inheritdoc} |
|
| 111 | + */ |
|
| 112 | 112 | protected function endTag(): void |
| 113 | 113 | { |
| 114 | 114 | $this->pushNodeList(); |
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | /** |
| 118 | - * {@inheritdoc} |
|
| 119 | - */ |
|
| 118 | + * {@inheritdoc} |
|
| 119 | + */ |
|
| 120 | 120 | protected function unknownTag(string $tag, string $param, array $tokens): void |
| 121 | 121 | { |
| 122 | 122 | $whenLexer = new Lexer('/' . Token::QUOTED_FRAGMENT . '/'); |
@@ -149,8 +149,8 @@ discard block |
||
| 149 | 149 | } |
| 150 | 150 | |
| 151 | 151 | /** |
| 152 | - * {@inheritdoc} |
|
| 153 | - */ |
|
| 152 | + * {@inheritdoc} |
|
| 153 | + */ |
|
| 154 | 154 | public function render(Context $context): string |
| 155 | 155 | { |
| 156 | 156 | $output = ''; |
@@ -95,8 +95,8 @@ discard block |
||
| 95 | 95 | protected mixed $variable; |
| 96 | 96 | |
| 97 | 97 | /** |
| 98 | - * {@inheritdoc} |
|
| 99 | - */ |
|
| 98 | + * {@inheritdoc} |
|
| 99 | + */ |
|
| 100 | 100 | public function __construct(string $markup, &$tokens, Parser $parser) |
| 101 | 101 | { |
| 102 | 102 | $lexer = new Lexer( |
@@ -140,8 +140,8 @@ discard block |
||
| 140 | 140 | } |
| 141 | 141 | |
| 142 | 142 | /** |
| 143 | - * {@inheritdoc} |
|
| 144 | - */ |
|
| 143 | + * {@inheritdoc} |
|
| 144 | + */ |
|
| 145 | 145 | public function parse(array &$tokens): void |
| 146 | 146 | { |
| 147 | 147 | $source = $this->parser->getLoader()->read($this->templateName); |
@@ -165,8 +165,8 @@ discard block |
||
| 165 | 165 | |
| 166 | 166 | |
| 167 | 167 | /** |
| 168 | - * {@inheritdoc} |
|
| 169 | - */ |
|
| 168 | + * {@inheritdoc} |
|
| 169 | + */ |
|
| 170 | 170 | public function render(Context $context): string |
| 171 | 171 | { |
| 172 | 172 | $result = ''; |
@@ -56,8 +56,8 @@ |
||
| 56 | 56 | class IfnotTag extends IfTag |
| 57 | 57 | { |
| 58 | 58 | /** |
| 59 | - * {@inheritdoc} |
|
| 60 | - */ |
|
| 59 | + * {@inheritdoc} |
|
| 60 | + */ |
|
| 61 | 61 | protected function negateCondition(mixed $value): mixed |
| 62 | 62 | { |
| 63 | 63 | return !$value; |
@@ -82,8 +82,8 @@ discard block |
||
| 82 | 82 | protected string $hash; |
| 83 | 83 | |
| 84 | 84 | /** |
| 85 | - * {@inheritdoc} |
|
| 86 | - */ |
|
| 85 | + * {@inheritdoc} |
|
| 86 | + */ |
|
| 87 | 87 | public function __construct(string $markup, &$tokens, Parser $parser) |
| 88 | 88 | { |
| 89 | 89 | $lexer = new Lexer('/("[^"]+"|\'[^\']+\')?/'); |
@@ -104,8 +104,8 @@ discard block |
||
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | /** |
| 107 | - * {@inheritdoc} |
|
| 108 | - */ |
|
| 107 | + * {@inheritdoc} |
|
| 108 | + */ |
|
| 109 | 109 | public function parse(array &$tokens): void |
| 110 | 110 | { |
| 111 | 111 | $source = $this->parser->getLoader()->read($this->templateName); |
@@ -185,8 +185,8 @@ discard block |
||
| 185 | 185 | |
| 186 | 186 | |
| 187 | 187 | /** |
| 188 | - * {@inheritdoc} |
|
| 189 | - */ |
|
| 188 | + * {@inheritdoc} |
|
| 189 | + */ |
|
| 190 | 190 | public function render(Context $context): string |
| 191 | 191 | { |
| 192 | 192 | $context->push(); |
@@ -106,8 +106,8 @@ discard block |
||
| 106 | 106 | protected int|string $start; |
| 107 | 107 | |
| 108 | 108 | /** |
| 109 | - * {@inheritdoc} |
|
| 110 | - */ |
|
| 109 | + * {@inheritdoc} |
|
| 110 | + */ |
|
| 111 | 111 | public function __construct(string $markup, &$tokens, Parser $parser) |
| 112 | 112 | { |
| 113 | 113 | parent::__construct($markup, $tokens, $parser); |
@@ -143,8 +143,8 @@ discard block |
||
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | /** |
| 146 | - * {@inheritdoc} |
|
| 147 | - */ |
|
| 146 | + * {@inheritdoc} |
|
| 147 | + */ |
|
| 148 | 148 | public function render(Context $context): string |
| 149 | 149 | { |
| 150 | 150 | if (!$context->hasRegister('for')) { |
@@ -73,8 +73,8 @@ discard block |
||
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | /** |
| 76 | - * {@inheritdoc} |
|
| 77 | - */ |
|
| 76 | + * {@inheritdoc} |
|
| 77 | + */ |
|
| 78 | 78 | public function read(string $key, bool $unserialize = true): mixed |
| 79 | 79 | { |
| 80 | 80 | $success = false; |
@@ -84,16 +84,16 @@ discard block |
||
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | /** |
| 87 | - * {@inheritdoc} |
|
| 88 | - */ |
|
| 87 | + * {@inheritdoc} |
|
| 88 | + */ |
|
| 89 | 89 | public function exists(string $key): bool |
| 90 | 90 | { |
| 91 | 91 | return apcu_exists($this->prefix . $key) === true; |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | /** |
| 95 | - * {@inheritdoc} |
|
| 96 | - */ |
|
| 95 | + * {@inheritdoc} |
|
| 96 | + */ |
|
| 97 | 97 | public function write(string $key, mixed $value, bool $serialize = true): bool |
| 98 | 98 | { |
| 99 | 99 | return apcu_store($this->prefix . $key, $value, $this->expire); |
@@ -101,8 +101,8 @@ discard block |
||
| 101 | 101 | |
| 102 | 102 | |
| 103 | 103 | /** |
| 104 | - * {@inheritdoc} |
|
| 105 | - */ |
|
| 104 | + * {@inheritdoc} |
|
| 105 | + */ |
|
| 106 | 106 | public function flush(bool $expired = false): bool |
| 107 | 107 | { |
| 108 | 108 | return apcu_clear_cache(); |