mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-29 11:10:19 +02:00
19 lines
319 B
PHP
19 lines
319 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace DesignPatterns\Behavioral\TemplateMethod;
|
|
|
|
class CityJourney extends Journey
|
|
{
|
|
protected function enjoyVacation(): string
|
|
{
|
|
return "Eat, drink, take photos and sleep";
|
|
}
|
|
|
|
protected function buyGift(): ?string
|
|
{
|
|
return "Buy a gift";
|
|
}
|
|
}
|