Permalink
Browse files

Minor improvements and fixes

  • Loading branch information...
1 parent 1448ebc commit 39451213c5f8bda0bef8a8f5d523c0cc6558c0fe @lanthaler committed Dec 30, 2015
Showing with 20 additions and 12 deletions.
  1. +7 −0 Exception/JsonLdException.php
  2. +1 −1 FileGetContentsLoader.php
  3. +1 −1 JsonLD.php
  4. +1 −1 Node.php
  5. +1 −1 NodeInterface.php
  6. +9 −8 Processor.php
@@ -218,6 +218,13 @@ class JsonLdException extends \RuntimeException
const INVALID_REVERSE_PROPERTY_VALUE = "invalid reverse property value";
/**
+ * The JSON-LD snippet that triggered the error
+ *
+ * @var null|string
+ */
+ private $snippet;
+
+ /**
* The document that triggered the error
*
* @var null|string
@@ -125,7 +125,7 @@ function ($code, $severity, $msg, $msgCode, $bytesTx, $bytesMax) use (
* Parse HTTP Link headers
*
* @param array $values An array of HTTP Link header values
- * @param IRI $baseIRI The document's URL (used to expand relative URLs to absolutes)
+ * @param IRI $baseIri The document's URL (used to expand relative URLs to absolutes)
*
* @return array An array of parsed HTTP Link headers
*/
View
@@ -226,7 +226,7 @@ public static function compact($input, $context = null, $options = null)
* @param array $input The JSON-LD document to
* compact.
* @param null|string|object|array $context The context.
- * @param null|array|object $options Options to configure the
+ * @param null|object $options Options to configure the
* compaction process.
* @param bool $alwaysGraph If set to true, the resulting
* document will always explicitly
View
@@ -462,7 +462,7 @@ protected function removeReverseProperty($property, NodeInterface $node)
protected function isValidPropertyValue($value)
{
if (is_scalar($value) || (is_object($value) &&
- ((($value instanceof NodeInterface) && ($value->graph === $this->graph)) ||
+ ((($value instanceof NodeInterface) && ($value->getGraph() === $this->graph)) ||
($value instanceof Value)))) {
return true;
}
View
@@ -72,7 +72,7 @@ public function getType();
public function getNodesWithThisType();
/**
- * Get the graoh the node belongs to
+ * Get the graph the node belongs to
*
* @return null|GraphInterface Returns the graph the node belongs to or
* null if the node doesn't belong to any graph.
View
@@ -83,10 +83,10 @@ class Processor
private $useNativeTypes;
/**
- * Use rdf:type instead of @type when converting from RDF
+ * Use rdf:type instead of \@type when converting from RDF
*
* If set to true, the JSON-LD processor will use the expanded rdf:type
- * IRI as the property instead of @type when converting from RDF.
+ * IRI as the property instead of \@type when converting from RDF.
*
* @var bool
*/
@@ -174,8 +174,8 @@ public function __construct($options)
* print_r($document);
* </code>
*
- * @param string $input The JSON-LD document or a path or URL pointing
- * to one.
+ * @param null|string|array|object $input The JSON-LD document or a path
+ * or URL pointing to one.
*
* @return mixed The loaded JSON-LD document
*
@@ -1439,9 +1439,10 @@ private function getValueProfile(Object $value, $inversectx)
* Queries the inverse context to find the term for a given query
* path (= value profile)
*
- * @param array $inversectxFrag The inverse context (or a subtree thereof)
- * @param array $path The query corresponding to the value profile
- * @param integer $level The recursion depth.
+ * @param array $inversectx The inverse context (or a subtree thereof)
+ * @param string[] $containers
+ * @param string[] $typeOrLangs
+ * @param string[] $typeOrLangValues
*
* @return null|string The best matching term or null if none was found.
*/
@@ -1477,7 +1478,7 @@ private function queryInverseContext($inversectx, $containers, $typeOrLangs, $ty
*
* @param array $activectx The active context.
* @param string $property The property.
- * @param null|string $only If set, only a this element of the
+ * @param null|string $only If set, only this element of the
* definition will be returned.
*
* @return array|string|null Returns either the property's definition or

0 comments on commit 3945121

Please sign in to comment.