Mario Simão 56970cc221 style: Adopt PSR12
Dev dependency flyeralarm/php-code-validator has been removed.

Closes #444
2021-10-01 10:26:04 -03:00

21 lines
390 B
PHP

<?php
declare(strict_types=1);
namespace DesignPatterns\Structural\Decorator;
class WiFi extends BookingDecorator
{
private const PRICE = 2;
public function calculatePrice(): int
{
return $this->booking->calculatePrice() + self::PRICE;
}
public function getDescription(): string
{
return $this->booking->getDescription() . ' with wifi';
}
}