| Total Complexity | 2 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | class ChangeUrl extends AbstractResponder |
||
| 13 | { |
||
| 14 | const PUSH = 'push'; |
||
| 15 | const REPLACE = 'replace'; |
||
| 16 | const REDIRECT = 'redirect'; |
||
| 17 | |||
| 18 | private const OPTION_URL = 'url'; |
||
| 19 | private const OPTION_METHOD = 'method'; |
||
| 20 | private const OPTION_WAIT = 'wait'; |
||
| 21 | |||
| 22 | public function __construct(string $url, string $method, int $wait = 0) |
||
| 23 | { |
||
| 24 | $this->registerOption(self::OPTION_URL); |
||
| 25 | $this->registerOption(self::OPTION_METHOD); |
||
| 26 | $this->registerOption(self::OPTION_WAIT); |
||
| 27 | |||
| 28 | $this->setOption(self::OPTION_URL, $url); |
||
| 29 | $this->setOption(self::OPTION_METHOD, $method); |
||
| 30 | $this->setOption(self::OPTION_WAIT, $wait); |
||
| 31 | } |
||
| 32 | |||
| 33 | protected function getIdentifier(): string |
||
| 36 | } |
||
| 37 | } |
||
| 38 |