Skip to content

Commit

Permalink
fix namespace of Exception
Browse files Browse the repository at this point in the history
  • Loading branch information
thesebas authored and hkarlstrom committed Feb 8, 2019
1 parent 4db8911 commit c511cc8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Objects/Parameter.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ class Parameter
public function __construct(array $args)
{
if (!isset($args['name'])) {
throw new Exception('Parameter name is required.');
throw new \Exception('Parameter name is required.');
}
$this->name = $args['name'];
if (!isset($args['in'])) {
throw new Exception('Parameter in is required.');
throw new \Exception('Parameter in is required.');
}
if (!in_array($args['in'], ['query', 'header', 'path', 'cookie'])) {
throw new Exception('Parameter in must be one of query|header|path|cookie.');
throw new \Exception('Parameter in must be one of query|header|path|cookie.');
}
$this->in = $args['in'];
$this->description = $args['description'] ?? null;
Expand Down

0 comments on commit c511cc8

Please sign in to comment.