@@ -37,13 +37,13 @@ |
||
37 | 37 | |
38 | 38 | switch ($type) { |
39 | 39 | |
40 | - case 'js': |
|
41 | - $pattern = '<script src="%s"></script>'; |
|
42 | - break; |
|
40 | + case 'js': |
|
41 | + $pattern = '<script src="%s"></script>'; |
|
42 | + break; |
|
43 | 43 | |
44 | - case 'css': |
|
45 | - $pattern = '<link rel="stylesheet" type="text/css" href="%s">'; |
|
46 | - break; |
|
44 | + case 'css': |
|
45 | + $pattern = '<link rel="stylesheet" type="text/css" href="%s">'; |
|
46 | + break; |
|
47 | 47 | |
48 | 48 | } |
49 | 49 |
@@ -80,7 +80,7 @@ |
||
80 | 80 | 'line' => $this->_exception->getLine() |
81 | 81 | ]; |
82 | 82 | |
83 | - $trace = $this->_exception->getTrace(); |
|
83 | + $trace = $this->_exception->getTrace(); |
|
84 | 84 | |
85 | 85 | if (isset($trace[0]['line']) && $trace[0]['line'] !== $raiser['line']) { |
86 | 86 | array_unshift($trace, $raiser); |
@@ -67,7 +67,7 @@ |
||
67 | 67 | |
68 | 68 | } |
69 | 69 | |
70 | - $path = str_replace('//' , '/', $path); |
|
70 | + $path = str_replace('//', '/', $path); |
|
71 | 71 | |
72 | 72 | if ($absolute) { |
73 | 73 |
@@ -29,7 +29,7 @@ |
||
29 | 29 | /** |
30 | 30 | * @param $dom |
31 | 31 | * @param $data |
32 | - * @return bool|\DOMElement |
|
32 | + * @return \DOMNode |
|
33 | 33 | */ |
34 | 34 | private function generateXmlElement(\DOMDocument $dom, $data ) |
35 | 35 | { |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | * |
18 | 18 | * @param array $content |
19 | 19 | */ |
20 | - public function __construct ($content = []) |
|
20 | + public function __construct($content = []) |
|
21 | 21 | { |
22 | 22 | parent::__construct($content); |
23 | 23 | $this->setContent($content); |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | * @param $data |
32 | 32 | * @return bool|\DOMElement |
33 | 33 | */ |
34 | - private function generateXmlElement(\DOMDocument $dom, $data ) |
|
34 | + private function generateXmlElement(\DOMDocument $dom, $data) |
|
35 | 35 | { |
36 | 36 | if (empty($data['name'])) { |
37 | 37 | return false; |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | $doc->encoding = 'UTF-8'; |
83 | 83 | $child = $this->generateXmlElement($doc, $content); |
84 | 84 | |
85 | - if ( $child ) { |
|
85 | + if ($child) { |
|
86 | 86 | $doc->appendChild($child); |
87 | 87 | } |
88 | 88 |
@@ -25,7 +25,7 @@ |
||
25 | 25 | $message |
26 | 26 | ]; |
27 | 27 | |
28 | - $messageString = implode(' | ', $columns) . "\r\n"; |
|
28 | + $messageString = implode(' | ', $columns) . "\r\n"; |
|
29 | 29 | |
30 | 30 | return file_put_contents($logfile, $messageString, FILE_APPEND); |
31 | 31 | } |
@@ -295,7 +295,7 @@ |
||
295 | 295 | } |
296 | 296 | |
297 | 297 | if (empty($this->getType()) && !empty($this->definition['type'])) { |
298 | - $this->setType($this->definition['type']); |
|
298 | + $this->setType($this->definition['type']); |
|
299 | 299 | } |
300 | 300 | |
301 | 301 | if (empty($this->getValue()) && !empty($this->definition['value'])) { |
@@ -339,7 +339,7 @@ |
||
339 | 339 | /** |
340 | 340 | * Abstraction of call_user_func_array |
341 | 341 | * |
342 | - * @param $class |
|
342 | + * @param AbstractViewHelper $class |
|
343 | 343 | * @param $arguments |
344 | 344 | * |
345 | 345 | * @return mixed |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | */ |
163 | 163 | public function getVariable(string $key) |
164 | 164 | { |
165 | - if(isset($this->variable[$key])) { |
|
165 | + if (isset($this->variable[$key])) { |
|
166 | 166 | return $this->variable[$key]; |
167 | 167 | } |
168 | 168 | |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | */ |
178 | 178 | public function hasVariable(string $key) :bool |
179 | 179 | { |
180 | - if(isset($this->variable[$key])) { |
|
180 | + if (isset($this->variable[$key])) { |
|
181 | 181 | return true; |
182 | 182 | } |
183 | 183 | |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | */ |
193 | 193 | public function setVariables(array $variables = []) |
194 | 194 | { |
195 | - foreach($variables AS $key=>$value) { |
|
195 | + foreach ($variables AS $key=>$value) { |
|
196 | 196 | $this->setVariable($key, $value); |
197 | 197 | } |
198 | 198 | |
@@ -339,8 +339,8 @@ discard block |
||
339 | 339 | */ |
340 | 340 | public function __destruct() |
341 | 341 | { |
342 | - unset( $this->variable ); |
|
343 | - unset( $this->template ); |
|
342 | + unset($this->variable); |
|
343 | + unset($this->template); |
|
344 | 344 | } |
345 | 345 | |
346 | 346 | } |
347 | 347 | \ No newline at end of file |
@@ -33,8 +33,8 @@ |
||
33 | 33 | $subview->setTemplatePath($this->view->getTemplatePath()); |
34 | 34 | } |
35 | 35 | |
36 | - $subview->setTemplate( $template ); |
|
37 | - $subview->setVariables( $variables ); |
|
36 | + $subview->setTemplate($template); |
|
37 | + $subview->setVariables($variables); |
|
38 | 38 | return $subview->render(); |
39 | 39 | } |
40 | 40 |
@@ -22,7 +22,7 @@ |
||
22 | 22 | */ |
23 | 23 | public function __invoke(string $block, string $defaultValue = '') |
24 | 24 | { |
25 | - if($this->view->getVariable($block) === '') { |
|
25 | + if ($this->view->getVariable($block) === '') { |
|
26 | 26 | return $defaultValue; |
27 | 27 | } |
28 | 28 | return trim($this->view->getVariable($block)); |