blob: 83b5011facbcf85aa02ede6c1d33a6c2f0dde3da (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
<?php
namespace WpfTest\HttpReturnStatus;
use WpfTest\HttpReturnStatus;
class BadRequest extends \Exception implements HttpReturnStatus {
public function __construct(?string $reason) {
$this->message = $reason ?? 'Request does not conform to expectations';
}
public function httpCode(): int {
return 400;
}
public function httpReason(): string {
return "Bad Request";
}
}
|