@@ -38,6 +38,5 @@ |
||
| 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 | } |
@@ -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); |
@@ -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 | /** |
| 66 | 65 | * The configuration instance |
@@ -78,8 +77,7 @@ discard block |
||
| 78 | 77 | * Create new instance |
| 79 | 78 | * @param Configuration $config |
| 80 | 79 | */ |
| 81 | - public function __construct(Configuration $config) |
|
| 82 | - { |
|
| 80 | + public function __construct(Configuration $config) { |
|
| 83 | 81 | $this->config = $config; |
| 84 | 82 | |
| 85 | 83 | $dir = $config->getTemplateDir(); |
@@ -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)) { |
@@ -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 | /** |
| 62 | 61 | * The string hash data |
@@ -68,8 +67,7 @@ discard block |
||
| 68 | 67 | * Create new instance |
| 69 | 68 | * @param array<string, string> $data |
| 70 | 69 | */ |
| 71 | - public function __construct(array $data) |
|
| 72 | - { |
|
| 70 | + public function __construct(array $data) { |
|
| 73 | 71 | $this->data = $data; |
| 74 | 72 | } |
| 75 | 73 | |
@@ -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 | /** |
| 60 | 59 | * Return the template content to be use |
@@ -41,6 +41,5 @@ |
||
| 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 | } |
@@ -39,6 +39,5 @@ |
||
| 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 | } |
@@ -39,6 +39,5 @@ |
||
| 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 | } |
@@ -39,6 +39,5 @@ |
||
| 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 | } |
@@ -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 |
@@ -57,16 +57,14 @@ |
||
| 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); |