Skip to content

Commit

Permalink
[smarcet]
Browse files Browse the repository at this point in the history
Fix on StringOrURI

overrided method getValue
  • Loading branch information
smarcet committed Apr 5, 2016
1 parent 1f9c3d6 commit 35fc1b6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/utils/json_types/JsonObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ public function offsetUnset($offset)
throw new \LogicException;
}


/**
* @return string
* @throws exceptions\JsonParseException
Expand All @@ -68,7 +67,6 @@ public function toJson()
return $json;
}


/**
* @param int $errno
* @throws exceptions\JsonParseException
Expand Down
7 changes: 7 additions & 0 deletions src/utils/json_types/StringOrURI.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,11 @@ public function isString(){
public function isUri(){
return !(strstr($this->value, ':') === false);
}

/**
* @return string
*/
public function getValue(){
return $this->isUri() ? $this->getUri() : $this->getString();
}
}

0 comments on commit 35fc1b6

Please sign in to comment.