Skip to content

Commit 35fc1b6

Browse files
committed
[smarcet]
Fix on StringOrURI overrided method getValue
1 parent 1f9c3d6 commit 35fc1b6

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/utils/json_types/JsonObject.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ public function offsetUnset($offset)
4949
throw new \LogicException;
5050
}
5151

52-
5352
/**
5453
* @return string
5554
* @throws exceptions\JsonParseException
@@ -68,7 +67,6 @@ public function toJson()
6867
return $json;
6968
}
7069

71-
7270
/**
7371
* @param int $errno
7472
* @throws exceptions\JsonParseException

src/utils/json_types/StringOrURI.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,11 @@ public function isString(){
5656
public function isUri(){
5757
return !(strstr($this->value, ':') === false);
5858
}
59+
60+
/**
61+
* @return string
62+
*/
63+
public function getValue(){
64+
return $this->isUri() ? $this->getUri() : $this->getString();
65+
}
5966
}

0 commit comments

Comments
 (0)