mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-28 10:40:17 +02:00
17 lines
308 B
PHP
17 lines
308 B
PHP
<?php declare(strict_types=1);
|
|
|
|
namespace DesignPatterns\Behavioral\State;
|
|
|
|
class StateShipped implements State
|
|
{
|
|
public function proceedToNext(OrderContext $context)
|
|
{
|
|
$context->setState(new StateDone());
|
|
}
|
|
|
|
public function toString(): string
|
|
{
|
|
return 'shipped';
|
|
}
|
|
}
|