@@ -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(); |
@@ -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 | |
@@ -103,10 +103,10 @@ discard block |
||
103 | 103 | $path = $view->getTemplatePath(); |
104 | 104 | $path = $this->sanitizePath($path); |
105 | 105 | |
106 | - $template = $this->templateRoot . DIRECTORY_SEPARATOR . $path . $view->getTemplate() . '.' . $this->extension; |
|
106 | + $template = $this->templateRoot.DIRECTORY_SEPARATOR.$path.$view->getTemplate().'.'.$this->extension; |
|
107 | 107 | |
108 | 108 | if (!is_file($template)) { |
109 | - throw new MissingTemplateException('Template file missing: ' . $template); |
|
109 | + throw new MissingTemplateException('Template file missing: '.$template); |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | return $template; |
@@ -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\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 @@ |
||
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 | |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | |
86 | 86 | if (!empty($content['stderr'])) { |
87 | 87 | throw new RuntimeException(sprintf( |
88 | - 'System error "%s" when executing command "%s". ' . |
|
88 | + 'System error "%s" when executing command "%s". '. |
|
89 | 89 | 'Try using the binary provided on http://wkhtmltopdf.org/downloads.html', |
90 | 90 | $content['stderr'], |
91 | 91 | $command |
@@ -143,13 +143,13 @@ discard block |
||
143 | 143 | $margin = $pdfView->getMargin(); |
144 | 144 | foreach ($margin as $key => $value) { |
145 | 145 | if ($value !== null) { |
146 | - $options['margin-' . $key] = $value . 'mm'; |
|
146 | + $options['margin-'.$key] = $value.'mm'; |
|
147 | 147 | } |
148 | 148 | } |
149 | - $options = array_merge($options, (array)$this->options); |
|
149 | + $options = array_merge($options, (array) $this->options); |
|
150 | 150 | |
151 | 151 | if ($this->isWindowsEnvironment) { |
152 | - $command = '"' . $this->binary . '"'; |
|
152 | + $command = '"'.$this->binary.'"'; |
|
153 | 153 | } else { |
154 | 154 | $command = $this->binary; |
155 | 155 | } |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | $command .= sprintf(' --%s %s %s', $key, escapeshellarg($k), escapeshellarg($v)); |
163 | 163 | } |
164 | 164 | } elseif ($value === true) { |
165 | - $command .= ' --' . $key; |
|
165 | + $command .= ' --'.$key; |
|
166 | 166 | } else { |
167 | 167 | $command .= sprintf(' --%s %s', $key, escapeshellarg($value)); |
168 | 168 | } |
@@ -170,20 +170,20 @@ discard block |
||
170 | 170 | $footer = $pdfView->footer(); |
171 | 171 | foreach ($footer as $location => $text) { |
172 | 172 | if ($text !== null) { |
173 | - $command .= " --footer-$location \"" . addslashes($text) . "\""; |
|
173 | + $command .= " --footer-$location \"".addslashes($text)."\""; |
|
174 | 174 | } |
175 | 175 | } |
176 | 176 | |
177 | 177 | $header = $pdfView->header(); |
178 | 178 | foreach ($header as $location => $text) { |
179 | 179 | if ($text !== null) { |
180 | - $command .= " --header-$location \"" . addslashes($text) . "\""; |
|
180 | + $command .= " --header-$location \"".addslashes($text)."\""; |
|
181 | 181 | } |
182 | 182 | } |
183 | 183 | $command .= " - -"; |
184 | 184 | |
185 | 185 | if ($this->isWindowsEnvironment) { |
186 | - $command = '"' . $command . '"'; |
|
186 | + $command = '"'.$command.'"'; |
|
187 | 187 | } |
188 | 188 | |
189 | 189 | return $command; |
@@ -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 |