@@ -97,8 +97,8 @@ |
||
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | /** |
| 100 | - * {@inheritdoc} |
|
| 101 | - */ |
|
| 100 | + * {@inheritdoc} |
|
| 101 | + */ |
|
| 102 | 102 | public function read(string $name): string |
| 103 | 103 | { |
| 104 | 104 | $file = $this->getFilePath($name); |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | |
| 76 | 76 | /** |
| 77 | 77 | * {@inheritdoc} |
| 78 | - */ |
|
| 78 | + */ |
|
| 79 | 79 | public function read(string $name): string |
| 80 | 80 | { |
| 81 | 81 | if (!array_key_exists($name, $this->data)) { |
@@ -114,8 +114,8 @@ discard block |
||
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | /** |
| 117 | - * {@inheritdoc} |
|
| 118 | - */ |
|
| 117 | + * {@inheritdoc} |
|
| 118 | + */ |
|
| 119 | 119 | protected function blockDelimiter(): string |
| 120 | 120 | { |
| 121 | 121 | //There isn't a real delimiter |
@@ -123,8 +123,8 @@ discard block |
||
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | /** |
| 126 | - * {@inheritdoc} |
|
| 127 | - */ |
|
| 126 | + * {@inheritdoc} |
|
| 127 | + */ |
|
| 128 | 128 | protected function assertMissingDelimiter(): void |
| 129 | 129 | { |
| 130 | 130 | // Document blocks don't need to be |
@@ -54,13 +54,13 @@ |
||
| 54 | 54 | * @package Platine\Template\Parser |
| 55 | 55 | * |
| 56 | 56 | */ |
| 57 | - /** |
|
| 58 | - * A drop is a class which allows you to to export DOM like things to template. |
|
| 59 | - * Methods of drops are callable. |
|
| 60 | - * The main use for drops is the implement lazy loaded objects. |
|
| 61 | - * If you would like to make data available to the web designers which you don't |
|
| 62 | - * want loaded unless needed then a drop is a great way to do that. |
|
| 63 | - */ |
|
| 57 | + /** |
|
| 58 | + * A drop is a class which allows you to to export DOM like things to template. |
|
| 59 | + * Methods of drops are callable. |
|
| 60 | + * The main use for drops is the implement lazy loaded objects. |
|
| 61 | + * If you would like to make data available to the web designers which you don't |
|
| 62 | + * want loaded unless needed then a drop is a great way to do that. |
|
| 63 | + */ |
|
| 64 | 64 | abstract class Drop |
| 65 | 65 | { |
| 66 | 66 | /** |
@@ -118,11 +118,11 @@ |
||
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | /** |
| 121 | - * Parse the template source and use the cached |
|
| 122 | - * content if is available |
|
| 123 | - * @param string $name |
|
| 124 | - * @return $this |
|
| 125 | - */ |
|
| 121 | + * Parse the template source and use the cached |
|
| 122 | + * content if is available |
|
| 123 | + * @param string $name |
|
| 124 | + * @return $this |
|
| 125 | + */ |
|
| 126 | 126 | public function parse(string $name): self |
| 127 | 127 | { |
| 128 | 128 | $hash = md5($name); |
@@ -113,8 +113,8 @@ discard block |
||
| 113 | 113 | * Quoted fragment pattern |
| 114 | 114 | */ |
| 115 | 115 | public const QUOTED_FRAGMENT = '(?:' . self::QUOTED_STRING |
| 116 | - . '|(?:[^\s,\|\'"]|' |
|
| 117 | - . self::QUOTED_STRING . ')+)'; |
|
| 116 | + . '|(?:[^\s,\|\'"]|' |
|
| 117 | + . self::QUOTED_STRING . ')+)'; |
|
| 118 | 118 | |
| 119 | 119 | /** |
| 120 | 120 | * Tag attributes pattern expression |
@@ -125,8 +125,8 @@ discard block |
||
| 125 | 125 | * Template parse pattern |
| 126 | 126 | */ |
| 127 | 127 | public const TOKENIZATION_REGEXP = '/(' . self::BLOCK_OPEN |
| 128 | - . '.*?' . self::BLOCK_CLOSE |
|
| 129 | - . '|' . self::VARIABLE_OPEN |
|
| 130 | - . '.*?' . self::VARIABLE_CLOSE |
|
| 131 | - . ')/'; |
|
| 128 | + . '.*?' . self::BLOCK_CLOSE |
|
| 129 | + . '|' . self::VARIABLE_OPEN |
|
| 130 | + . '.*?' . self::VARIABLE_CLOSE |
|
| 131 | + . ')/'; |
|
| 132 | 132 | } |
@@ -147,10 +147,10 @@ |
||
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | /** |
| 150 | - * Returns the class name of the tag. |
|
| 151 | - * |
|
| 152 | - * @return string |
|
| 153 | - */ |
|
| 150 | + * Returns the class name of the tag. |
|
| 151 | + * |
|
| 152 | + * @return string |
|
| 153 | + */ |
|
| 154 | 154 | protected function getName(): string |
| 155 | 155 | { |
| 156 | 156 | return strtolower(get_class($this)); |
@@ -95,13 +95,13 @@ |
||
| 95 | 95 | . Token::FILTER_SEPARATOR |
| 96 | 96 | . '\s*(.*)/m'; |
| 97 | 97 | $syntaxRegex = '/(' |
| 98 | - . Token::QUOTED_FRAGMENT |
|
| 99 | - . ')(.*)/m'; |
|
| 98 | + . Token::QUOTED_FRAGMENT |
|
| 99 | + . ')(.*)/m'; |
|
| 100 | 100 | $filterRegex = '/(?:\s+|' |
| 101 | - . Token::QUOTED_FRAGMENT |
|
| 102 | - . '|' |
|
| 103 | - . Token::FILTER_METHOD_ARGS_SEPARATOR |
|
| 104 | - . ')+/'; |
|
| 101 | + . Token::QUOTED_FRAGMENT |
|
| 102 | + . '|' |
|
| 103 | + . Token::FILTER_METHOD_ARGS_SEPARATOR |
|
| 104 | + . ')+/'; |
|
| 105 | 105 | $filterArgumentsRegex = '/(?:' |
| 106 | 106 | . Token::FILTER_NAME_ARG_SEPARATOR |
| 107 | 107 | . '|' |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | |
| 84 | 84 | /** |
| 85 | 85 | * {@inheritdoc} |
| 86 | - */ |
|
| 86 | + */ |
|
| 87 | 87 | public function parse(array &$tokens): void |
| 88 | 88 | { |
| 89 | 89 | $startRegex = '/^' . Token::BLOCK_OPEN . '/'; |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | |
| 180 | 180 | /** |
| 181 | 181 | * {@inheritdoc} |
| 182 | - */ |
|
| 182 | + */ |
|
| 183 | 183 | public function render(Context $context): string |
| 184 | 184 | { |
| 185 | 185 | return $this->renderAll($this->nodeList, $context); |