mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-30 19:50:12 +02:00
19 lines
309 B
PHP
19 lines
309 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';
|
|
}
|
|
}
|