Skip to content
Snippets Groups Projects
Commit 65c06680 authored by David Maus's avatar David Maus
Browse files

Fix inline documentation

parent 608042de
No related branches found
No related tags found
No related merge requests found
......@@ -56,7 +56,7 @@ class CopyRecord extends Record {
* @param \HAB\Pica\Record\Field $field Field to append
* @return void
*/
public function append (Field $field) {
public function append (\HAB\Pica\Record\Field $field) {
if ($field->getLevel() !== 2) {
throw new \InvalidArgumentException("Invalid field level: {$field->getLevel()}");
}
......
......@@ -161,7 +161,7 @@ class Field {
*
* Replaces the subfield list with subfields in argument.
*
* @param array $subfield Subfields
* @param array $subfields Subfields
* @return void
*/
public function setSubfields (array $subfields) {
......@@ -178,7 +178,7 @@ class Field {
* @param \HAB\Pica\Record\Subfield $subfield Subfield to add
* @return void
*/
public function addSubfield (Subfield $subfield) {
public function addSubfield (\HAB\Pica\Record\Subfield $subfield) {
if (in_array($subfield, $this->getSubfields(), true)) {
throw new \InvalidArgumentException("Cannot add subfield: Subfield already part of the subfield list");
}
......@@ -192,7 +192,7 @@ class Field {
* @param \HAB\Pica\Record\Subfield $subfield Subfield to delete
* @return void
*/
public function removeSubfield (Subfield $subfield) {
public function removeSubfield (\HAB\Pica\Record\Subfield $subfield) {
$index = array_search($subfield, $this->_subfields, true);
if ($index === false) {
throw new \InvalidArgumentException("Cannot remove subfield: Subfield not part of the subfield list");
......
......@@ -106,7 +106,7 @@ abstract class Helper {
* @todo Make FALSE and TRUE self-evaluating, maybe
*
* @param array $sequence Sequence
* @param callback $predice Predicate
* @param callback $predicate Predicate
* @return boolean TRUE if every element fullfills predicate
*/
public static function every (array $sequence, $predicate) {
......
......@@ -45,6 +45,7 @@ class LocalRecord extends NestedRecord {
*
* @throws \InvalidArgumentException Field level invalid
* @throws \InvalidArgumentException Field already in record
* @param \HAB\Pica\Record\Field $field Field to add
* @return void
*/
public function append (Field $field) {
......@@ -60,8 +61,9 @@ class LocalRecord extends NestedRecord {
* @throws \InvalidArgumentException Record already contains the copy record
* @throws \InvalidArgumentException Record already contains a copy record with the same item number
* @param \HAB\Pica\Record\CopyRecord $record Copy record to add
* @return void
*/
public function addCopyRecord (CopyRecord $record) {
public function addCopyRecord (\HAB\Pica\Record\CopyRecord $record) {
if ($this->getCopyRecordByItemNumber($record->getItemNumber())) {
throw new \InvalidArgumentException("Cannot add copy record: Copy record with item number {$record->getItemNumber()} already present");
}
......@@ -72,9 +74,10 @@ class LocalRecord extends NestedRecord {
* Remove a copy record.
*
* @throws \HAB\Pica\Record\Exception Record does not contain the specified copy record
* @param \HAB\Pica\Record\CopyRecord $record Record to remove
* @return void
*/
public function removeCopyRecord (CopyRecord $record) {
public function removeCopyRecord (\HAB\Pica\Record\CopyRecord $record) {
$this->removeRecord($record);
}
......@@ -130,7 +133,7 @@ class LocalRecord extends NestedRecord {
* @param \HAB\Pica\Record\Record $b Second copy record
* @return integer Comparism value
*/
protected function compareRecords (Record $a, Record $b) {
protected function compareRecords (\HAB\Pica\Record\Record $a, \HAB\Pica\Record\Record $b) {
return $a->getItemNumber() - $b->getItemNumber();
}
}
\ No newline at end of file
......@@ -134,7 +134,7 @@ abstract class NestedRecord extends Record {
* @param \HAB\Pica\Record\Record $b Second record
* @return integer Comparism value
*/
abstract protected function compareRecords (Record $a, Record $b);
abstract protected function compareRecords (\HAB\Pica\Record\Record $a, \HAB\Pica\Record\Record $b);
/**
* Add a record as a contained record.
......@@ -143,7 +143,7 @@ abstract class NestedRecord extends Record {
* @param \HAB\Pica\Record\Record $record Record to add
* @return void
*/
protected function addRecord (Record $record) {
protected function addRecord (\HAB\Pica\Record\Record $record) {
if (in_array($record, $this->_records, true)) {
throw new \InvalidArgumentException("{$this} already contains {$record}");
}
......@@ -157,7 +157,7 @@ abstract class NestedRecord extends Record {
* @param \HAB\Pica\Record\Record $record Record to remove
* @return void
*/
protected function removeRecord (Record $record) {
protected function removeRecord (\HAB\Pica\Record\Record $record) {
$index = array_search($record, $this->_records, true);
if ($index === false) {
throw new \InvalidArgumentException("{$this} does not contain {$record}");
......
......@@ -90,7 +90,7 @@ abstract class Record {
/**
* Constructor.
*
* @param array $field Initial set of fields
* @param array $fields Initial set of fields
* @return void
*/
public function __construct (array $fields = array()) {
......@@ -125,7 +125,7 @@ abstract class Record {
* @param \HAB\Pica\Record\Field $field Field to append
* @return void
*/
public function append (Field $field) {
public function append (\HAB\Pica\Record\Field $field) {
if (in_array($field, $this->_fields, true)) {
throw new \InvalidArgumentException("{$this} already contains {$field}");
}
......
......@@ -45,9 +45,10 @@ class TitleRecord extends NestedRecord {
*
* @throws \InvalidArgumentException Field level invalid
* @throws \InvalidArgumentException Field already in record
* @param \HAB\Pica\Record\Field $field Field to append
* @return void
*/
public function append (Field $field) {
public function append (\HAB\Pica\Record\Field $field) {
if ($field->getLevel() !== 0) {
throw new \InvalidArgumentException("Invalid field level: {$field->getLevel()}");
}
......@@ -99,7 +100,7 @@ class TitleRecord extends NestedRecord {
* @param \HAB\Pica\Record\LocalRecord $record Local record
* @return void
*/
public function addLocalRecord (LocalRecord $record) {
public function addLocalRecord (\HAB\Pica\Record\LocalRecord $record) {
$this->addRecord($record);
}
......@@ -110,7 +111,7 @@ class TitleRecord extends NestedRecord {
* @param \HAB\Pica\Record\LocalRecord $record Local record to remove
* @return void
*/
public function removeLocalRecord (LocalRecord $record) {
public function removeLocalRecord (\HAB\Pica\Record\LocalRecord $record) {
$this->removeRecord($record);
}
......@@ -187,7 +188,7 @@ class TitleRecord extends NestedRecord {
* @param \HAB\Pica\Record\Record $b Second record
* @return Comparism value
*/
protected function compareRecords (Record $a, Record $b) {
protected function compareRecords (\HAB\Pica\Record\Record $a, \HAB\Pica\Record\Record $b) {
return $a->getILN() - $b->getILN();
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment