Fix namespaces in phpDocs

This commit is contained in:
Sebastian Meyer 2023-11-18 22:22:27 +01:00
parent a65299546c
commit e198aca844
3 changed files with 17 additions and 12 deletions

View File

@ -152,7 +152,7 @@ class StrictList extends SplDoublyLinkedList
/** /**
* Magic getter method for $this->allowedTypes. * Magic getter method for $this->allowedTypes.
* @see OCC\Basics\Traits\Getter * @see Getter
* *
* @return array The list of allowed item types * @return array The list of allowed item types
*/ */
@ -163,7 +163,7 @@ class StrictList extends SplDoublyLinkedList
/** /**
* Set the item at the specified index. * Set the item at the specified index.
* @see ArrayAccess::offsetSet() * @see \ArrayAccess::offsetSet()
* *
* @param ?int $index The index being set or NULL to append * @param ?int $index The index being set or NULL to append
* @param mixed $item The new item for the index * @param mixed $item The new item for the index
@ -237,7 +237,7 @@ class StrictList extends SplDoublyLinkedList
/** /**
* Get string representation of $this. * Get string representation of $this.
* @see Serializable::serialize() * @see \Serializable::serialize()
* *
* @return string String representation * @return string String representation
*/ */
@ -248,7 +248,7 @@ class StrictList extends SplDoublyLinkedList
/** /**
* Restore $this from string representation. * Restore $this from string representation.
* @see Serializable::unserialize() * @see \Serializable::unserialize()
* *
* @param string $data String representation * @param string $data String representation
* *
@ -293,7 +293,9 @@ class StrictList extends SplDoublyLinkedList
public function __construct(iterable $items = [], array $allowedTypes = []) public function __construct(iterable $items = [], array $allowedTypes = [])
{ {
if (array_sum(array_map('is_string', $allowedTypes)) !== count($allowedTypes)) { if (array_sum(array_map('is_string', $allowedTypes)) !== count($allowedTypes)) {
throw new InvalidArgumentException('Allowed types must be array of strings or empty array.'); throw new InvalidArgumentException(
'Allowed types must be array of strings or empty array.'
);
} }
$this->allowedTypes = $allowedTypes; $this->allowedTypes = $allowedTypes;
$this->append(...$items); $this->append(...$items);
@ -317,9 +319,9 @@ class StrictList extends SplDoublyLinkedList
public function __serialize(): array public function __serialize(): array
{ {
return [ return [
'allowedTypes' => $this->allowedTypes, 'StrictList::allowedTypes' => $this->allowedTypes,
'splDoublyLinkedList::flags' => $this->getIteratorMode(), 'SplDoublyLinkedList::flags' => $this->getIteratorMode(),
'splDoublyLinkedList::dllist' => iterator_to_array($this) 'SplDoublyLinkedList::dllist' => iterator_to_array($this)
]; ];
} }
@ -332,7 +334,10 @@ class StrictList extends SplDoublyLinkedList
*/ */
public function __unserialize(array $data): void public function __unserialize(array $data): void
{ {
$this->__construct($data['splDoublyLinkedList::dllist'], $data['allowedTypes']); $this->__construct(
$this->setIteratorMode($data['splDoublyLinkedList::flags']); $data['SplDoublyLinkedList::dllist'],
$data['StrictList::allowedTypes']
);
$this->setIteratorMode($data['SplDoublyLinkedList::flags']);
} }
} }

View File

@ -39,7 +39,7 @@ class StrictQueue extends StrictList
{ {
/** /**
* Set the mode of iteration. * Set the mode of iteration.
* @see SplDoublyLinkedList::setIteratorMode() * @see \SplDoublyLinkedList::setIteratorMode()
* *
* @param int $mode The new iterator mode (0 or 1) * @param int $mode The new iterator mode (0 or 1)
* *

View File

@ -39,7 +39,7 @@ class StrictStack extends StrictList
{ {
/** /**
* Set the mode of iteration. * Set the mode of iteration.
* @see SplDoublyLinkedList::setIteratorMode() * @see \SplDoublyLinkedList::setIteratorMode()
* *
* @param int $mode The new iterator mode (2 or 3) * @param int $mode The new iterator mode (2 or 3)
* *