for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
/**
* @author : Korotkov Danila <[email protected]>
* @license https://mit-license.org/ MIT
*/
namespace Behavioral\Command;
* Class Lamp
* @package Behavioral\Command
class Lamp implements DeviceInterface
{
public function turnOn(): void
$this->execute('on');
}
public function turnOff(): void
$this->execute('off');
* @param string $status
protected function execute(string $status): void
printf("The Light turns %s \n", $status);