| Total Complexity | 9 |
| Total Lines | 101 |
| Duplicated Lines | 0 % |
| Coverage | 66.67% |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class ExprMessage implements MessageInterface |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var OptionsInterface |
||
| 13 | */ |
||
| 14 | private $options; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | private $query; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var int |
||
| 23 | */ |
||
| 24 | private $queryType; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param int $queryType |
||
| 28 | * @param string $query |
||
| 29 | * @param OptionsInterface $options |
||
| 30 | */ |
||
| 31 | 2 | public function __construct(int $queryType = null, string $query = '', OptionsInterface $options = null) |
|
| 36 | 2 | } |
|
| 37 | |||
| 38 | /** |
||
| 39 | * @inheritdoc |
||
| 40 | */ |
||
| 41 | public function getQueryType(): int |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @param int $queryType |
||
| 48 | */ |
||
| 49 | public function setQueryType(int $queryType): void |
||
| 50 | { |
||
| 51 | $this->queryType = $queryType; |
||
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @inheritdoc |
||
| 56 | */ |
||
| 57 | public function setCommand(int $queryType): MessageInterface |
||
| 58 | { |
||
| 59 | $this->queryType = $queryType; |
||
| 60 | |||
| 61 | return $this; |
||
| 62 | } |
||
| 63 | |||
| 64 | /** |
||
| 65 | * @inheritdoc |
||
| 66 | */ |
||
| 67 | public function setQuery($query): MessageInterface |
||
| 68 | { |
||
| 69 | 1 | $this->query = (string) $query; |
|
| 70 | |||
| 71 | 1 | return $this; |
|
| 72 | } |
||
| 73 | |||
| 74 | /** |
||
| 75 | * @inheritdoc |
||
| 76 | */ |
||
| 77 | 2 | public function getOptions(): OptionsInterface |
|
| 78 | { |
||
| 79 | 2 | return $this->options; |
|
| 80 | } |
||
| 81 | 2 | ||
| 82 | /** |
||
| 83 | * @inheritdoc |
||
| 84 | */ |
||
| 85 | public function setOptions(OptionsInterface $options): MessageInterface |
||
| 86 | { |
||
| 87 | 1 | $this->options = $options; |
|
| 88 | |||
| 89 | return $this; |
||
| 90 | 1 | } |
|
| 91 | 1 | ||
| 92 | 1 | /** |
|
| 93 | * @inheritdoc |
||
| 94 | */ |
||
| 95 | public function toArray(): array |
||
| 101 | 1 | ]; |
|
| 102 | } |
||
| 103 | |||
| 104 | /** |
||
| 105 | * @return array |
||
| 106 | */ |
||
| 107 | public function jsonSerialize(): array |
||
| 110 | } |
||
| 111 | } |
||
| 112 |