| Total Complexity | 2 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | abstract class AbstractQueryHandler implements QueryHandler |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * {@inheritdoc} |
||
| 23 | * |
||
| 24 | * @throws InvalidQueryException |
||
| 25 | */ |
||
| 26 | final public function handle(Query $query): DTO |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Get supported query type. |
||
| 42 | * |
||
| 43 | * @return string |
||
| 44 | */ |
||
| 45 | abstract protected function getSupportedQueryType(): string; |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Handle query. |
||
| 49 | * |
||
| 50 | * @param Query $query |
||
| 51 | * |
||
| 52 | * @return DTO |
||
| 53 | */ |
||
| 54 | abstract protected function handleQuery(Query $query): DTO; |
||
| 55 | } |
||
| 56 |