@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | namespace Phauthentic\Presentation\Renderer\Exception; |
5 | 5 |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | namespace Phauthentic\Presentation\Renderer; |
5 | 5 |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | namespace Phauthentic\Presentation\Renderer; |
5 | 5 | |
@@ -75,18 +75,18 @@ discard block |
||
75 | 75 | */ |
76 | 76 | protected function arrayToXml(array $data, SimpleXMLElement &$xmlData): void |
77 | 77 | { |
78 | - foreach($data as $key => $value) { |
|
79 | - if(is_array($value)) { |
|
80 | - if(!is_numeric($key)){ |
|
78 | + foreach ($data as $key => $value) { |
|
79 | + if (is_array($value)) { |
|
80 | + if (!is_numeric($key)) { |
|
81 | 81 | $subnode = $xmlData->addChild("$key"); |
82 | 82 | $this->arrayToXml($value, $subnode); |
83 | 83 | } |
84 | - else{ |
|
84 | + else { |
|
85 | 85 | $this->arrayToXml($value, $xmlData); |
86 | 86 | } |
87 | 87 | } |
88 | 88 | else { |
89 | - $xmlData->addChild("$key","$value"); |
|
89 | + $xmlData->addChild("$key", "$value"); |
|
90 | 90 | } |
91 | 91 | } |
92 | 92 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | namespace Phauthentic\Presentation\Renderer; |
5 | 5 | |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | */ |
30 | 30 | public function __construct(array $folders) |
31 | 31 | { |
32 | - foreach($folders as $folder) { |
|
32 | + foreach ($folders as $folder) { |
|
33 | 33 | $this->add($folder); |
34 | 34 | } |
35 | 35 | } |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | namespace Phauthentic\Presentation\Service; |
5 | 5 |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | namespace Phauthentic\Presentation\View; |
5 | 5 | |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | * @param null|string $pageSize Page size to set |
206 | 206 | * @return \Phauthentic\Presentation\View\PdfViewInterface |
207 | 207 | */ |
208 | - public function setPageSize(?string $pageSize ): PdfViewInterface |
|
208 | + public function setPageSize(?string $pageSize): PdfViewInterface |
|
209 | 209 | { |
210 | 210 | $this->pageSize = $pageSize; |
211 | 211 |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | namespace Phauthentic\Presentation\View; |
5 | 5 |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | namespace Phauthentic\Presentation\Renderer; |
5 | 5 | |
@@ -42,10 +42,10 @@ discard block |
||
42 | 42 | $path = $view->getTemplatePath(); |
43 | 43 | $path = Utility::sanitizePath($path); |
44 | 44 | |
45 | - $template = $this->templateRoot . DIRECTORY_SEPARATOR . $path . $view->getTemplate() . '.php'; |
|
45 | + $template = $this->templateRoot.DIRECTORY_SEPARATOR.$path.$view->getTemplate().'.php'; |
|
46 | 46 | |
47 | 47 | if (!is_file($template)) { |
48 | - throw new MissingTemplateException('Template file missing: ' . $template); |
|
48 | + throw new MissingTemplateException('Template file missing: '.$template); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | return $template; |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | namespace Phauthentic\Presentation\Renderer; |
5 | 5 | |
@@ -68,10 +68,10 @@ discard block |
||
68 | 68 | $path = $view->getTemplatePath(); |
69 | 69 | $path = Utility::sanitizePath($path); |
70 | 70 | |
71 | - $template = $this->templateRoot . DIRECTORY_SEPARATOR . $path . $view->getTemplate() . '.html'; |
|
71 | + $template = $this->templateRoot.DIRECTORY_SEPARATOR.$path.$view->getTemplate().'.html'; |
|
72 | 72 | |
73 | 73 | if (!is_file($template)) { |
74 | - throw new MissingTemplateException('Template file missing: ' . $template); |
|
74 | + throw new MissingTemplateException('Template file missing: '.$template); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | return $template; |
@@ -84,14 +84,14 @@ discard block |
||
84 | 84 | { |
85 | 85 | $tmpDir = sys_get_temp_dir(); |
86 | 86 | $templateHash = hash_file('sha1', $template); |
87 | - $cachedTemplateFile = $tmpDir . DIRECTORY_SEPARATOR . $templateHash; |
|
87 | + $cachedTemplateFile = $tmpDir.DIRECTORY_SEPARATOR.$templateHash; |
|
88 | 88 | |
89 | 89 | //if (!file_exists($cachedTemplateFile)) { |
90 | 90 | $templateString = file_get_contents($template); |
91 | 91 | $phpTemplateString = LightnCandy::compile($templateString, [ |
92 | 92 | 'flags' => $this->flags |
93 | 93 | ]); |
94 | - file_put_contents($cachedTemplateFile, '<?php ' . $phpTemplateString . '?>'); |
|
94 | + file_put_contents($cachedTemplateFile, '<?php '.$phpTemplateString.'?>'); |
|
95 | 95 | //} |
96 | 96 | |
97 | 97 | ob_start(); |