Fix phpDocs

This commit is contained in:
Sebastian Meyer 2024-01-28 16:35:33 +01:00
parent 11a7179c21
commit 03cb7a3002
5 changed files with 33 additions and 1 deletions

View File

@ -205,7 +205,7 @@ class StrictList extends SplDoublyLinkedList implements ArrayAccess, Countable,
*
* @throws InvalidArgumentException
*
* @internal
* @api
*/
public function offsetSet(mixed $offset, mixed $value): void
{

View File

@ -31,6 +31,8 @@ use ArrayAccess;
* @author Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
* @package Basics\InterfaceTraits
*
* @api
*
* @template TKey of int|string
* @template TValue of mixed
* @template TData of array<TKey, TValue>
@ -52,6 +54,8 @@ trait ArrayAccessTrait
* @param TKey $offset The offset to check for
*
* @return bool Whether the offset exists
*
* @api
*/
public function offsetExists(mixed $offset): bool
{
@ -64,6 +68,8 @@ trait ArrayAccessTrait
* @param TKey $offset The offset to retrieve at
*
* @return ?TValue The value at the offset or NULL
*
* @api
*/
public function offsetGet(mixed $offset): mixed
{
@ -77,6 +83,8 @@ trait ArrayAccessTrait
* @param TValue $value The value to set
*
* @return void
*
* @api
*/
public function offsetSet(mixed $offset, mixed $value): void
{
@ -93,6 +101,8 @@ trait ArrayAccessTrait
* @param TKey $offset The offset to unset
*
* @return void
*
* @api
*/
public function offsetUnset(mixed $offset): void
{

View File

@ -31,6 +31,8 @@ use Countable;
* @author Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
* @package Basics\InterfaceTraits
*
* @api
*
* @template TKey of int|string
* @template TValue of mixed
* @template TData of array<TKey, TValue>
@ -50,6 +52,8 @@ trait CountableTrait
* Count the data items.
*
* @return int The number of data items
*
* @api
*/
public function count(): int
{

View File

@ -32,6 +32,8 @@ use IteratorAggregate;
* @author Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
* @package Basics\InterfaceTraits
*
* @api
*
* @template TKey of int|string
* @template TValue of mixed
* @template TData of array<TKey, TValue>
@ -51,6 +53,8 @@ trait IteratorAggregateTrait
* Retrieve an external iterator.
*
* @return ArrayIterator<TKey, TValue> New array iterator for data array
*
* @api
*/
public function getIterator(): ArrayIterator
{

View File

@ -31,6 +31,8 @@ use Iterator;
* @author Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
* @package Basics\InterfaceTraits
*
* @api
*
* @template TKey of int|string
* @template TValue of mixed
* @template TData of array<TKey, TValue>
@ -50,6 +52,8 @@ trait IteratorTrait
* Return the current item.
*
* @return TValue|false The current item or FALSE if invalid
*
* @api
*/
public function current(): mixed
{
@ -60,6 +64,8 @@ trait IteratorTrait
* Return the current key.
*
* @return ?TKey The current key or NULL if invalid
*
* @api
*/
public function key(): mixed
{
@ -70,6 +76,8 @@ trait IteratorTrait
* Move forward to next item.
*
* @return void
*
* @api
*/
public function next(): void
{
@ -80,6 +88,8 @@ trait IteratorTrait
* Move back to previous item.
*
* @return void
*
* @api
*/
public function prev(): void
{
@ -90,6 +100,8 @@ trait IteratorTrait
* Rewind the iterator to the first item.
*
* @return void
*
* @api
*/
public function rewind(): void
{
@ -100,6 +112,8 @@ trait IteratorTrait
* Check if current position is valid.
*
* @return bool Whether the current position is valid
*
* @api
*/
public function valid(): bool
{