@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | |
| 110 | 110 | protected function getStaticOutpath() |
| 111 | 111 | { |
| 112 | - $path = $this->config['assets-public'] ?? constant('SUDA_PUBLIC').'/assets/'. $this->getStaticName(); |
|
| 112 | + $path = $this->config['assets-public'] ?? constant('SUDA_PUBLIC').'/assets/'.$this->getStaticName(); |
|
| 113 | 113 | FileSystem::make($path); |
| 114 | 114 | return $path; |
| 115 | 115 | } |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | { |
| 124 | 124 | $output = $this->config['output'] ?? constant('SUDA_DATA').'/template'; |
| 125 | 125 | FileSystem::make($output); |
| 126 | - return $output .'/'. $this->name.'-'.substr(md5_file($this->getSourcePath()), 10, 8).'.php'; |
|
| 126 | + return $output.'/'.$this->name.'-'.substr(md5_file($this->getSourcePath()), 10, 8).'.php'; |
|
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | /** |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | * |
| 132 | 132 | * @return string|null |
| 133 | 133 | */ |
| 134 | - public function getSourcePath():?string |
|
| 134 | + public function getSourcePath(): ?string |
|
| 135 | 135 | { |
| 136 | 136 | return $this->source ?? null; |
| 137 | 137 | } |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | public function include(string $path) |
| 228 | 228 | { |
| 229 | 229 | $subfix = $this->config['subfix'] ?? ''; |
| 230 | - $included = new self(Resource::getPathByRelativePath($path. $subfix, dirname($this->source)), $this->config); |
|
| 230 | + $included = new self(Resource::getPathByRelativePath($path.$subfix, dirname($this->source)), $this->config); |
|
| 231 | 231 | $included->parent = $this; |
| 232 | 232 | echo $included->getRenderedString(); |
| 233 | 233 | } |
@@ -244,13 +244,13 @@ discard block |
||
| 244 | 244 | { |
| 245 | 245 | $this->prepareStaticSource(); |
| 246 | 246 | if (array_key_exists('assets-prefix', $this->config)) { |
| 247 | - $prefix = $this->config['assets-prefix'] ; |
|
| 247 | + $prefix = $this->config['assets-prefix']; |
|
| 248 | 248 | } elseif (defined('SUDA_ASSETS')) { |
| 249 | 249 | $prefix = constant('SUDA_ASSETS'); |
| 250 | 250 | } else { |
| 251 | 251 | $prefix = '/assets'; |
| 252 | 252 | } |
| 253 | - return $prefix .'/'.$this->getStaticName(); |
|
| 253 | + return $prefix.'/'.$this->getStaticName(); |
|
| 254 | 254 | } |
| 255 | 255 | |
| 256 | 256 | protected function prepareStaticSource() |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | * |
| 21 | 21 | * @return string|null |
| 22 | 22 | */ |
| 23 | - public function getSourcePath():?string |
|
| 23 | + public function getSourcePath(): ?string |
|
| 24 | 24 | { |
| 25 | 25 | $subfix = $this->config['subfix'] ?? '.tpl.html'; |
| 26 | 26 | return $this->getResource($this->module)->getResourcePath($this->getTemplatePath().'/'.$this->name.$subfix); |
@@ -33,9 +33,9 @@ discard block |
||
| 33 | 33 | */ |
| 34 | 34 | public function getPath() |
| 35 | 35 | { |
| 36 | - $output = $this->config['output'] ?? $this->application->getDataPath().'/template/'. $this->uriName; |
|
| 36 | + $output = $this->config['output'] ?? $this->application->getDataPath().'/template/'.$this->uriName; |
|
| 37 | 37 | FileSystem::make($output); |
| 38 | - return $output .'/'. $this->name.'.php'; |
|
| 38 | + return $output.'/'.$this->name.'.php'; |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | /** |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | public function getRenderedString() |
| 57 | 57 | { |
| 58 | 58 | $this->application->debug()->time('render '.$this->name); |
| 59 | - $code = parent::getRenderedString(); |
|
| 59 | + $code = parent::getRenderedString(); |
|
| 60 | 60 | $this->application->debug()->timeEnd('render '.$this->name); |
| 61 | 61 | return $code; |
| 62 | 62 | } |
@@ -14,10 +14,10 @@ |
||
| 14 | 14 | public function __construct(Throwable $exception) |
| 15 | 15 | { |
| 16 | 16 | parent::__construct('', []); |
| 17 | - $this->path = SUDA_RESOURCE. '/error.php'; |
|
| 17 | + $this->path = SUDA_RESOURCE.'/error.php'; |
|
| 18 | 18 | $type = get_class($exception); |
| 19 | 19 | $this->value = [ |
| 20 | - 'error_type' => $type , |
|
| 20 | + 'error_type' => $type, |
|
| 21 | 21 | 'error_sort_type' => strpos($type, '\\') === false ? $type : substr($type, strrpos($type, '\\') + 1), |
| 22 | 22 | 'error_code' => $exception->getCode(), |
| 23 | 23 | 'error_message' => $exception->getMessage(), |