| Total Complexity | 5 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | class StateRequestBuilder |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * @return StateQueryRequest |
||
| 20 | */ |
||
| 21 | 1 | public function query() |
|
| 22 | { |
||
| 23 | 1 | return StateQueryRequest::of(); |
|
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param State $state |
||
| 28 | * @return StateUpdateRequest |
||
| 29 | */ |
||
| 30 | 1 | public function update(State $state) |
|
| 31 | { |
||
| 32 | 1 | return StateUpdateRequest::ofIdAndVersion($state->getId(), $state->getVersion()); |
|
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @param StateDraft $stateDraft |
||
| 37 | * @return StateCreateRequest |
||
| 38 | */ |
||
| 39 | 1 | public function create(StateDraft $stateDraft) |
|
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @param State $state |
||
| 46 | * @return StateDeleteRequest |
||
| 47 | */ |
||
| 48 | 1 | public function delete(State $state) |
|
| 49 | { |
||
| 50 | 1 | return StateDeleteRequest::ofIdAndVersion($state->getId(), $state->getVersion()); |
|
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @param string $id |
||
| 55 | * @return StateByIdGetRequest |
||
| 56 | */ |
||
| 57 | 1 | public function getById($id) |
|
| 60 | } |
||
| 61 | } |
||
| 62 |