diff --git a/src/DateTime/Period.php b/src/DateTime/Period.php index 18bd227..007dd06 100644 --- a/src/DateTime/Period.php +++ b/src/DateTime/Period.php @@ -34,22 +34,22 @@ public function isOnGoing(?\DateTimeInterface $dateTime = null): bool public function is(Phase $period, ?\DateTimeInterface $dateTime = null): bool { return match ($period) { - Phase::before => $this->isBefore($dateTime), - Phase::after => $this->isAfter($dateTime), - Phase::onGoing => $this->isOnGoing($dateTime) + Phase::Before => $this->isBefore($dateTime), + Phase::After => $this->isAfter($dateTime), + Phase::OnGoing => $this->isOnGoing($dateTime) }; } public function getPhase(?\DateTimeInterface $dateTime = null): Phase { if ($this->isBefore($dateTime)) { - return Phase::before; + return Phase::Before; } if ($this->isAfter($dateTime)) { - return Phase::after; + return Phase::After; } if ($this->isOnGoing($dateTime)) { - return Phase::onGoing; + return Phase::OnGoing; } throw new \LogicException(); } diff --git a/src/FrontendComponent/Components/layout.latte b/src/FrontendComponent/Components/layout.latte index 92cc478..259966a 100644 --- a/src/FrontendComponent/Components/layout.latte +++ b/src/FrontendComponent/Components/layout.latte @@ -1,4 +1,4 @@ -{layout dirname((new \ReflectionClass(Fykosak\Utils\BaseComponent\BaseComponent::class))->getFileName()) . '/@layout.latte'} +{layout '../../Compoents/@layout.latte'} {varType \Nette\Utils\Html $html} {block content} {$html}