Skip to content

Commit

Permalink
Add use line for InvalidArgumentException & adjust scope (#372)
Browse files Browse the repository at this point in the history
Fixes issue #371
  • Loading branch information
erayd authored and bighappyface committed Mar 17, 2017
1 parent a4da6ba commit 14a04dc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/JsonSchema/Entity/JsonPointer.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

namespace JsonSchema\Entity;

use JsonSchema\Exception\InvalidArgumentException;

/**
* @package JsonSchema\Entity
*
Expand All @@ -25,12 +27,12 @@ class JsonPointer
/**
* @param string $value
*
* @throws \InvalidArgumentException when $value is not a string
* @throws InvalidArgumentException when $value is not a string
*/
public function __construct($value)
{
if (!is_string($value)) {
throw new \InvalidArgumentException('Ref value must be a string');
throw new InvalidArgumentException('Ref value must be a string');
}

$splitRef = explode('#', $value, 2);
Expand Down

0 comments on commit 14a04dc

Please sign in to comment.