Skip to content

Commit

Permalink
Fix various DocBlocks
Browse files Browse the repository at this point in the history
  • Loading branch information
lanthaler committed Oct 3, 2012
1 parent 720c629 commit 85df472
Show file tree
Hide file tree
Showing 13 changed files with 72 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Document.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class Document
*
* - <em>base</em> The base IRI of the input document.
*
* @param string|array|object $input The JSON-LD document to process.
* @param string|array|object $document The JSON-LD document to process.
* @param null|array|object $options Options to configure the processing.
*
* @return Document The parsed JSON-LD document.
Expand Down
12 changes: 12 additions & 0 deletions Exception/ParseException.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,21 @@
*/
class ParseException extends \RuntimeException
{
/**
* The file being parsed
*
* @var string
*/
private $parsedFile;

/**
* The raw error message (containing place-holders)
*
* @var string
*/
private $rawMessage;


/**
* Constructor.
*
Expand Down
18 changes: 18 additions & 0 deletions Exception/ProcessException.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,28 @@
*/
class ProcessException extends \RuntimeException
{
/**
* The file being processed
*
* @var string
*/
private $parsedFile;

/**
* The code snippet that triggered this exception
*
* @var mixed
*/
private $snippet;

/**
* The raw error message (containing place-holders)
*
* @var string
*/
private $rawMessage;


/**
* Constructor.
*
Expand Down
18 changes: 18 additions & 0 deletions Exception/SyntaxException.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,28 @@
*/
class SyntaxException extends \RuntimeException
{
/**
* The file being parsed
*
* @var string
*/
private $parsedFile;

/**
* The code snippet that triggered this exception
*
* @var mixed
*/
private $snippet;

/**
* The raw error message (containing place-holders)
*
* @var string
*/
private $rawMessage;


/**
* Constructor.
*
Expand Down
10 changes: 3 additions & 7 deletions LanguageTaggedString.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ final class LanguageTaggedString extends Value
/**
* Constructor
*
* @param string $value The string's value.
* @param string $type The string's language.
* @param string $value The string's value.
* @param string $language The string's language.
*/
public function __construct($value, $language)
{
Expand Down Expand Up @@ -67,11 +67,7 @@ public function getLanguage()
}

/**
* Compares this language-tagged string object to the specified value.
*
* @param mixed $value
* @return bool Returns true if the passed value is the same as this
* instance; false otherwise.
* {@inheritdoc}
*/
public function equals($other)
{
Expand Down
2 changes: 1 addition & 1 deletion NQuads.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
class NQuads implements QuadSerializer
{
/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function serialize(array $quads)
{
Expand Down
2 changes: 1 addition & 1 deletion Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ public function getReverseProperty($property)
/**
* Compares this Node object to the specified value.
*
* @param mixed $value
* @param mixed $other The value this instance should be compared to.
* @return bool Returns true if the passed value is the same as this
* instance; false otherwise.
*/
Expand Down
4 changes: 1 addition & 3 deletions Processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -697,8 +697,6 @@ private function expandIri($value, $activectx, $relativeIri = false, $vocabRelat
* @param mixed $element A JSON-LD element to be compacted.
* @param array $activectx The active context.
* @param string $activeprty The active property.
* @param bool $optimize If set to true, the JSON-LD processor is allowed optimize
* the passed context to produce even compacter representations.
*
* @return mixed The compacted JSON-LD document.
*/
Expand Down Expand Up @@ -2312,7 +2310,7 @@ private static function mergeIntoProperty(&$object, $property, $value, $alwaysAr
* are compared lexicographically.
*
* @param mixed $a Value A.
* @param mixed $a Value B.
* @param mixed $b Value B.
*
* @return int If value A is shorter than value B, -1 will be returned; if it's
* longer 1 will be returned. If both values have the same lenght
Expand Down
2 changes: 1 addition & 1 deletion QuadSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ interface QuadSerializer
/**
* Serializes quads to a string.
*
* @param array $quads Array of {@link Quad Quads} to be serialized
* @param Quad[] $quads Array of quads to be serialized.
*
* @return string The serialized quads.
*/
Expand Down
5 changes: 5 additions & 0 deletions Test/DocumentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
*/
class DocumentTest extends \PHPUnit_Framework_TestCase
{
/**
* The document instance being used throughout the tests.
*
* @var Document
*/
protected $document;

/**
Expand Down
7 changes: 7 additions & 0 deletions Test/JsonLDTestSuiteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ class JsonLDTestSuiteTest extends \PHPUnit_Framework_TestCase
private $basedir;


/**
* Constructs a test case with the given name.
*
* @param string $name
* @param array $data
* @param string $dataName
*/
public function __construct($name = null, array $data = array(), $dataName = '')
{
parent::__construct($name, $data, $dataName);
Expand Down
6 changes: 1 addition & 5 deletions TypedValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,7 @@ public function getType()
}

/**
* Compares this Value object to the specified value.
*
* @param mixed $value
* @return bool Returns true if the passed value is the same as this
* instance; false otherwise.
* {@inheritdoc}
*/
public function equals($other)
{
Expand Down
6 changes: 3 additions & 3 deletions Value.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ abstract class Value
* If the passed value element can't be transformed to a language-tagged
* string or a typed value null is returned.
*
* @param object $element The JSON-LD element
* @param \stdClass $element The JSON-LD element
*
* @return null|LanguageTaggedString|TypedValue The parsed object
*/
Expand Down Expand Up @@ -111,9 +111,9 @@ public function getValue()
}

/**
* Compares this Value object to the specified value.
* Compares this instance to the specified value.
*
* @param mixed $value
* @param mixed $other The value this instance should be compared to.
* @return bool Returns true if the passed value is the same as this
* instance; false otherwise.
*/
Expand Down

0 comments on commit 85df472

Please sign in to comment.