Fix code documentation
This commit is contained in:
parent
3dfbd1ba2f
commit
00d24e0f77
|
@ -28,6 +28,17 @@ use OCC\Basics\DataStructures\Exceptions\InvalidDataTypeException;
|
||||||
use OCC\Basics\Interfaces\IteratorTrait;
|
use OCC\Basics\Interfaces\IteratorTrait;
|
||||||
use RuntimeException;
|
use RuntimeException;
|
||||||
|
|
||||||
|
use function array_key_first;
|
||||||
|
use function array_key_last;
|
||||||
|
use function array_pop;
|
||||||
|
use function array_push;
|
||||||
|
use function array_shift;
|
||||||
|
use function array_unshift;
|
||||||
|
use function count;
|
||||||
|
use function get_debug_type;
|
||||||
|
use function is_null;
|
||||||
|
use function sprintf;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A type-sensitive, traversable array.
|
* A type-sensitive, traversable array.
|
||||||
*
|
*
|
||||||
|
|
|
@ -362,8 +362,6 @@ class StrictCollection implements ArrayAccess, Countable, Serializable
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @internal
|
* @internal
|
||||||
*
|
|
||||||
* @hpsalm-suppress MethodSignatureMismatch
|
|
||||||
*/
|
*/
|
||||||
public function __unserialize(array $data): void
|
public function __unserialize(array $data): void
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,7 +28,6 @@ use OCC\Basics\DataStructures\Exceptions\InvalidDataTypeException;
|
||||||
use OCC\Basics\DataStructures\StrictCollection;
|
use OCC\Basics\DataStructures\StrictCollection;
|
||||||
use OCC\Basics\Traits\TypeChecker;
|
use OCC\Basics\Traits\TypeChecker;
|
||||||
use OutOfRangeException;
|
use OutOfRangeException;
|
||||||
use SplDoublyLinkedList;
|
|
||||||
|
|
||||||
use function get_debug_type;
|
use function get_debug_type;
|
||||||
use function iterator_to_array;
|
use function iterator_to_array;
|
||||||
|
@ -47,7 +46,7 @@ use function unserialize;
|
||||||
* @package Basics\DataStructures
|
* @package Basics\DataStructures
|
||||||
*
|
*
|
||||||
* @template AllowedType of mixed
|
* @template AllowedType of mixed
|
||||||
* @phpstan-require-extends SplDoublyLinkedList
|
* @phpstan-require-extends \SplDoublyLinkedList
|
||||||
*/
|
*/
|
||||||
trait StrictSplDoublyLinkedListTrait
|
trait StrictSplDoublyLinkedListTrait
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,8 +23,6 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace OCC\Basics\Interfaces;
|
namespace OCC\Basics\Interfaces;
|
||||||
|
|
||||||
use ArrayAccess;
|
|
||||||
|
|
||||||
use function is_null;
|
use function is_null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -38,8 +36,7 @@ use function is_null;
|
||||||
* @api
|
* @api
|
||||||
*
|
*
|
||||||
* @template TValue of mixed
|
* @template TValue of mixed
|
||||||
* @implements ArrayAccess<array-key, TValue>
|
* @phpstan-require-implements \ArrayAccess
|
||||||
* @phpstan-require-implements ArrayAccess
|
|
||||||
*/
|
*/
|
||||||
trait ArrayAccessTrait
|
trait ArrayAccessTrait
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,8 +23,6 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace OCC\Basics\Interfaces;
|
namespace OCC\Basics\Interfaces;
|
||||||
|
|
||||||
use Countable;
|
|
||||||
|
|
||||||
use function count;
|
use function count;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -38,8 +36,7 @@ use function count;
|
||||||
* @api
|
* @api
|
||||||
*
|
*
|
||||||
* @template TValue of mixed
|
* @template TValue of mixed
|
||||||
* @implements Countable<TValue>
|
* @phpstan-require-implements \Countable
|
||||||
* @phpstan-require-implements Countable
|
|
||||||
*/
|
*/
|
||||||
trait CountableTrait
|
trait CountableTrait
|
||||||
{
|
{
|
||||||
|
|
|
@ -24,7 +24,6 @@ declare(strict_types=1);
|
||||||
namespace OCC\Basics\Interfaces;
|
namespace OCC\Basics\Interfaces;
|
||||||
|
|
||||||
use ArrayIterator;
|
use ArrayIterator;
|
||||||
use IteratorAggregate;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A generic implementation of the IteratorAggregate interface.
|
* A generic implementation of the IteratorAggregate interface.
|
||||||
|
@ -37,8 +36,7 @@ use IteratorAggregate;
|
||||||
* @api
|
* @api
|
||||||
*
|
*
|
||||||
* @template TValue of mixed
|
* @template TValue of mixed
|
||||||
* @implements IteratorAggregate<TValue>
|
* @phpstan-require-implements \IteratorAggregate
|
||||||
* @phpstan-require-implements IteratorAggregate
|
|
||||||
*/
|
*/
|
||||||
trait IteratorAggregateTrait
|
trait IteratorAggregateTrait
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,8 +23,6 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace OCC\Basics\Interfaces;
|
namespace OCC\Basics\Interfaces;
|
||||||
|
|
||||||
use Iterator;
|
|
||||||
|
|
||||||
use function current;
|
use function current;
|
||||||
use function is_null;
|
use function is_null;
|
||||||
use function key;
|
use function key;
|
||||||
|
@ -43,8 +41,7 @@ use function reset;
|
||||||
* @api
|
* @api
|
||||||
*
|
*
|
||||||
* @template TValue of mixed
|
* @template TValue of mixed
|
||||||
* @implements Iterator<TValue>
|
* @phpstan-require-implements \Iterator
|
||||||
* @phpstan-require-implements Iterator
|
|
||||||
*/
|
*/
|
||||||
trait IteratorTrait
|
trait IteratorTrait
|
||||||
{
|
{
|
||||||
|
|
|
@ -85,6 +85,7 @@ trait Setter
|
||||||
try {
|
try {
|
||||||
$this->__set($property, null);
|
$this->__set($property, null);
|
||||||
} catch (InvalidArgumentException) {
|
} catch (InvalidArgumentException) {
|
||||||
|
// Unsetting an invalid property should not lead to an error.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue