Style fixes.
This commit is contained in:
parent
2bc1073a42
commit
316eb03a4c
|
@ -37,6 +37,6 @@ parameters:
|
|||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$callback of method League\\\\Plates\\\\Engine\\:\\:registerFunction\\(\\) expects League\\\\Plates\\\\callback, Closure given\\.$#"
|
||||
count: 7
|
||||
count: 4
|
||||
path: src/View.php
|
||||
|
||||
|
|
|
@ -34,9 +34,9 @@ final class GlobalSections
|
|||
$initialValue = $this->sections[$section] ?? '';
|
||||
|
||||
$this->sections[$section] = match ($mode) {
|
||||
Template::SECTION_MODE_REWRITE => $value,
|
||||
Template::SECTION_MODE_PREPEND => $value . $initialValue,
|
||||
Template::SECTION_MODE_APPEND => $initialValue . $value
|
||||
Template::SECTION_MODE_APPEND => $initialValue . $value,
|
||||
default => $value
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -61,13 +61,13 @@ final class GlobalSections
|
|||
ob_start();
|
||||
}
|
||||
|
||||
public function appendStart($name): void
|
||||
public function appendStart(string $name): void
|
||||
{
|
||||
$this->sectionMode = Template::SECTION_MODE_APPEND;
|
||||
$this->start($name);
|
||||
}
|
||||
|
||||
public function prependStart($name)
|
||||
public function prependStart(string $name): void
|
||||
{
|
||||
$this->sectionMode = Template::SECTION_MODE_PREPEND;
|
||||
$this->start($name);
|
||||
|
@ -81,7 +81,7 @@ final class GlobalSections
|
|||
);
|
||||
}
|
||||
|
||||
$this->set($this->sectionName, ob_get_clean(), $this->sectionMode);
|
||||
$this->set($this->sectionName, ob_get_clean() ?: null, $this->sectionMode);
|
||||
|
||||
$this->sectionName = null;
|
||||
$this->sectionMode = Template::SECTION_MODE_REWRITE;
|
||||
|
|
Loading…
Reference in New Issue