@@ 49-57 (lines=9) @@ | ||
46 | * |
|
47 | * @throws Exception |
|
48 | */ |
|
49 | protected function getMethods(array $data): array |
|
50 | { |
|
51 | if (!isset($data['method'])) { |
|
52 | $serialized = serialize($data); |
|
53 | throw new Exception("Missing method. (input: $serialized)"); |
|
54 | } |
|
55 | ||
56 | return (array) $data['method']; |
|
57 | } |
|
58 | ||
59 | /** |
|
60 | * @param array $data |
|
@@ 66-74 (lines=9) @@ | ||
63 | * |
|
64 | * @throws Exception |
|
65 | */ |
|
66 | protected function getPath(array $data): string |
|
67 | { |
|
68 | if (!isset($data['path'])) { |
|
69 | $serialized = serialize($data); |
|
70 | throw new Exception("Missing path. (input: $serialized)"); |
|
71 | } |
|
72 | ||
73 | return $data['path']; |
|
74 | } |
|
75 | ||
76 | /** |
|
77 | * @param array $data |