@@ -224,15 +224,15 @@ discard block |
||
| 224 | 224 | */ |
| 225 | 225 | protected function findInPaths($name, $paths) |
| 226 | 226 | { |
| 227 | - foreach ((array)$paths as $path) { |
|
| 227 | + foreach ((array) $paths as $path) { |
|
| 228 | 228 | $file = $this->getViewFilename($name); |
| 229 | - $viewPath = $path . '/' . $file; |
|
| 229 | + $viewPath = $path.'/'.$file; |
|
| 230 | 230 | if (file_exists($viewPath)) { |
| 231 | 231 | return $viewPath; |
| 232 | 232 | } |
| 233 | 233 | } |
| 234 | 234 | throw new TemplateNotFound($name, $paths, |
| 235 | - 'View [' . $name . '] not found in paths [' . implode(', ', $paths) . '].'); |
|
| 235 | + 'View ['.$name.'] not found in paths ['.implode(', ', $paths).'].'); |
|
| 236 | 236 | } |
| 237 | 237 | |
| 238 | 238 | /** |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | */ |
| 245 | 245 | protected function getViewFilename($name) |
| 246 | 246 | { |
| 247 | - return $name . '.php'; |
|
| 247 | + return $name.'.php'; |
|
| 248 | 248 | } |
| 249 | 249 | |
| 250 | 250 | /** |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | public function render($name, array $data = []) |
| 51 | 51 | { |
| 52 | 52 | if ($this->isBlock($name)) { |
| 53 | - $name = '/' . $this->blocks[$name]; |
|
| 53 | + $name = '/'.$this->blocks[$name]; |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | return parent::render($name, $data); |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | $reflector = new ReflectionClass(static::class); |
| 47 | 47 | $dirName = dirname($reflector->getFileName()); |
| 48 | 48 | |
| 49 | - return dirname($dirName, 2) . DIRECTORY_SEPARATOR . 'views' . DIRECTORY_SEPARATOR; |
|
| 49 | + return dirname($dirName, 2).DIRECTORY_SEPARATOR.'views'.DIRECTORY_SEPARATOR; |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | /** |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | */ |
| 34 | 34 | public function setBasePath($path) |
| 35 | 35 | { |
| 36 | - $path = rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; |
|
| 36 | + $path = rtrim($path, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR; |
|
| 37 | 37 | $this->setDirectory($path); |
| 38 | 38 | $this->getResolveTemplatePath()->prependPath($path); |
| 39 | 39 | |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | |
| 21 | 21 | protected View $engine; |
| 22 | 22 | |
| 23 | - public function register(View|Engine $engine) |
|
| 23 | + public function register(View | Engine $engine) |
|
| 24 | 24 | { |
| 25 | 25 | $this->engine = $engine; |
| 26 | 26 | } |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | |
| 12 | 12 | class RenderConditionsExtension extends AbstractExtension |
| 13 | 13 | { |
| 14 | - public function register(View|Engine $engine) |
|
| 14 | + public function register(View | Engine $engine) |
|
| 15 | 15 | { |
| 16 | 16 | parent::register($engine); |
| 17 | 17 | $engine->addMethod('loadIfExists', [$this, 'loadIfExists']); |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | if (false === $this->hasHelper($name)) { |
| 55 | 55 | return; |
| 56 | 56 | } |
| 57 | - $this->registerFunction($name, function () use ($name) { |
|
| 57 | + $this->registerFunction($name, function() use ($name) { |
|
| 58 | 58 | return $this->getHelper($name); |
| 59 | 59 | }); |
| 60 | 60 | } |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | } |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | - return '\Nip\Helpers\View\\' . $name; |
|
| 43 | + return '\Nip\Helpers\View\\'.$name; |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | /** |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | public static function getHelperClassVariations($name) |
| 52 | 52 | { |
| 53 | 53 | return [ |
| 54 | - '\Nip\View\Helpers\\' . $name . 'Helper', |
|
| 54 | + '\Nip\View\Helpers\\'.$name.'Helper', |
|
| 55 | 55 | ]; |
| 56 | 56 | } |
| 57 | 57 | } |