src/Description/Description.php 1 location
|
@@ 98-102 (lines=5) @@
|
95 |
|
*/ |
96 |
|
public function getPath(string $path): Path |
97 |
|
{ |
98 |
|
if (!isset($this->paths[$path])) { |
99 |
|
throw new \InvalidArgumentException( |
100 |
|
"Path '$path' does not exist (have " . implode(', ', array_keys($this->paths)) . ')' |
101 |
|
); |
102 |
|
} |
103 |
|
|
104 |
|
return $this->paths[$path]; |
105 |
|
} |
src/Description/Path.php 1 location
|
@@ 74-79 (lines=6) @@
|
71 |
|
{ |
72 |
|
$method = strtolower($method); |
73 |
|
|
74 |
|
if (!isset($this->operations[$method])) { |
75 |
|
throw new \InvalidArgumentException( |
76 |
|
"Path '{$this->getPath()}' does not support '$method'" . |
77 |
|
" (supports " . implode(', ', array_keys($this->operations)) . ')' |
78 |
|
); |
79 |
|
} |
80 |
|
|
81 |
|
return $this->operations[$method]; |
82 |
|
} |