| Total Complexity | 3 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class Message |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | private $tips = null; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var string |
||
| 23 | */ |
||
| 24 | private $exception = null; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var int |
||
| 28 | */ |
||
| 29 | private $code = null; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Message constructor. |
||
| 33 | * @param string $tips |
||
| 34 | * @param string $exception |
||
| 35 | * @param int $code |
||
| 36 | */ |
||
| 37 | public function __construct(string $tips = '', string $exception = null, int $code = null) |
||
| 38 | { |
||
| 39 | $this->tips = $tips; |
||
| 40 | $this->exception = $exception; |
||
| 41 | $this->code = $code; |
||
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @return bool |
||
| 46 | */ |
||
| 47 | public function valid() : bool |
||
| 48 | { |
||
| 49 | return ! empty($this->tips); |
||
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @throws Throwable |
||
| 54 | */ |
||
| 55 | public function throws() : void |
||
| 59 | } |
||
| 60 | } |
||
| 61 |