for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Tleckie\DesignPatterns\State;
/**
* Class BrakeState
*
* @package Tleckie\DesignPatterns\State
* @author Teodoro Leckie Westberg <[email protected]>
*/
class BrakeState extends State
{
* @return SpeedUpState
public function speedUp(): SpeedUpState
return new SpeedUpState();
}
* @return BrakeState
public function brake(): BrakeState
return new self();
* @return OffState
public function turnOff(): OffState
return new OffState();