src/Description/Description.php 1 location
|
@@ 65-69 (lines=5) @@
|
| 62 |
|
*/ |
| 63 |
|
public function getPath(string $path): Path |
| 64 |
|
{ |
| 65 |
|
if (!isset($this->paths[$path])) { |
| 66 |
|
throw new \InvalidArgumentException( |
| 67 |
|
"Path '$path' does not exist (have " . implode(', ', array_keys($this->paths)) . ')' |
| 68 |
|
); |
| 69 |
|
} |
| 70 |
|
|
| 71 |
|
return $this->paths[$path]; |
| 72 |
|
} |
src/Description/Path.php 1 location
|
@@ 60-65 (lines=6) @@
|
| 57 |
|
{ |
| 58 |
|
$method = strtolower($method); |
| 59 |
|
|
| 60 |
|
if (!isset($this->operations[$method])) { |
| 61 |
|
throw new \InvalidArgumentException( |
| 62 |
|
"Path '$this->path' does not support '$method'" . |
| 63 |
|
" (supports " . implode(', ', array_keys($this->operations)) . ')' |
| 64 |
|
); |
| 65 |
|
} |
| 66 |
|
|
| 67 |
|
return $this->operations[$method]; |
| 68 |
|
} |