| Total Complexity | 2 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | class MethodNotSupportedException extends AdapterException |
||
| 27 | { |
||
| 28 | /** |
||
| 29 | * @var string |
||
| 30 | */ |
||
| 31 | protected $method; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @param string $method |
||
| 35 | * @param AdapterInterface $adapter |
||
| 36 | * @param MessageInterface[] $messages |
||
| 37 | * @param array $debug |
||
| 38 | * @param Exception $previous |
||
| 39 | */ |
||
| 40 | 10 | public function __construct( |
|
| 41 | $method, |
||
| 42 | AdapterInterface $adapter, |
||
| 43 | array $messages, |
||
| 44 | array $debug = [], |
||
| 45 | Exception $previous = null |
||
| 46 | ) { |
||
| 47 | 10 | $this->method = $method; |
|
| 48 | |||
| 49 | 10 | parent::__construct( |
|
| 50 | 10 | sprintf('Method `%s` is not supported by this adapter', $method), |
|
| 51 | 10 | $adapter, |
|
| 52 | 10 | $messages, |
|
| 53 | 10 | $debug, |
|
| 54 | $previous |
||
| 55 | 10 | ); |
|
| 56 | 10 | } |
|
| 57 | |||
| 58 | /** |
||
| 59 | * @return string |
||
| 60 | */ |
||
| 61 | 1 | public function getMethod() |
|
| 64 | } |
||
| 65 | } |
||
| 66 |