This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
You should have received a copy of the GNU General Public License
-along with this program. If not, see http://www.gnu.org/licenses/.
This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
You should have received a copy of the GNU General Public License
-along with this program. If not, see http://www.gnu.org/licenses/.
This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
You should have received a copy of the GNU General Public License
-along with this program. If not, see http://www.gnu.org/licenses/.
This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
You should have received a copy of the GNU General Public License
-along with this program. If not, see http://www.gnu.org/licenses/.
This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
You should have received a copy of the GNU General Public License
-along with this program. If not, see http://www.gnu.org/licenses/.
This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
You should have received a copy of the GNU General Public License
-along with this program. If not, see http://www.gnu.org/licenses/.
This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
You should have received a copy of the GNU General Public License
-along with this program. If not, see http://www.gnu.org/licenses/.
This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
You should have received a copy of the GNU General Public License
-along with this program. If not, see http://www.gnu.org/licenses/.
This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
You should have received a copy of the GNU General Public License
-along with this program. If not, see http://www.gnu.org/licenses/.
This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
You should have received a copy of the GNU General Public License
-along with this program. If not, see http://www.gnu.org/licenses/.
This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
You should have received a copy of the GNU General Public License
-along with this program. If not, see http://www.gnu.org/licenses/.
This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
You should have received a copy of the GNU General Public License
-along with this program. If not, see http://www.gnu.org/licenses/.
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/files/src/DataStructures/StrictList.php.txt b/docs/files/src/DataStructures/StrictList.php.txt
deleted file mode 100644
index 3244072..0000000
--- a/docs/files/src/DataStructures/StrictList.php.txt
+++ /dev/null
@@ -1,497 +0,0 @@
-
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-declare(strict_types=1);
-
-namespace OCC\Basics\DataStructures;
-
-use ArrayAccess;
-use Countable;
-use InvalidArgumentException;
-use Iterator;
-use RuntimeException;
-use SplDoublyLinkedList;
-use OCC\Basics\Traits\Getter;
-use Serializable;
-
-/**
- * A type-sensitive, taversable list.
- *
- * Extends [\SplDoublyLinkedList](https://www.php.net/spldoublylinkedlist) with
- * an option to specify the allowed data types for list values.
- *
- * @author Sebastian Meyer
- * @package Basics\DataStructures
- *
- * @property-read string[] $allowedTypes The allowed data types for values.
- *
- * @api
- *
- * @template AllowedType of mixed
- * @extends SplDoublyLinkedList
- * @implements ArrayAccess
- * @implements Iterator
- */
-class StrictList extends SplDoublyLinkedList implements ArrayAccess, Countable, Iterator, Serializable
-{
- use Getter;
-
- /**
- * The allowed data types for list values.
- *
- * @var string[]
- *
- * @internal
- */
- protected array $allowedTypes = [];
-
- /**
- * Add/insert a new value at the specified offset.
- *
- * @param int $offset The offset where the new value is to be inserted
- * @param AllowedType $value The new value for the offset
- *
- * @return void
- *
- * @throws InvalidArgumentException
- *
- * @api
- */
- public function add(int $offset, mixed $value): void
- {
- if (!$this->isAllowedType($value)) {
- throw new InvalidArgumentException(
- sprintf(
- 'Parameter 2 must be an allowed type, %s given.',
- get_debug_type($value)
- )
- );
- }
- parent::add($offset, $value);
- }
-
- /**
- * Append values at the end of the list.
- *
- * @param AllowedType ...$values One or more values to append
- *
- * @return void
- *
- * @throws InvalidArgumentException
- *
- * @api
- */
- public function append(mixed ...$values): void
- {
- foreach ($values as $count => $value) {
- if (!$this->isAllowedType($value)) {
- throw new InvalidArgumentException(
- sprintf(
- 'Parameter %d must be an allowed type, %s given.',
- (int) $count + 1,
- get_debug_type($value)
- )
- );
- }
- }
- foreach ($values as $value) {
- parent::push($value);
- }
- }
-
- /**
- * Peek at the value at the beginning of the list.
- *
- * @return AllowedType The first value of the list
- *
- * @throws RuntimeException
- *
- * @api
- */
- public function bottom(): mixed
- {
- return parent::bottom();
- }
-
- /**
- * Get allowed data types for list values.
- *
- * @return string[] The list of allowed data types
- *
- * @api
- */
- public function getAllowedTypes(): array
- {
- return $this->allowedTypes;
- }
-
- /**
- * Get the mode of iteration.
- *
- * @return int The set of flags and modes of iteration
- *
- * @api
- */
- public function getIteratorMode(): int
- {
- return parent::getIteratorMode();
- }
-
- /**
- * Check if the value's data type is allowed on the list.
- *
- * @param AllowedType $value The value to check
- *
- * @return bool Whether the value's data type is allowed
- *
- * @api
- */
- public function isAllowedType(mixed $value): bool
- {
- if (count($this->allowedTypes) === 0) {
- return true;
- }
- foreach ($this->allowedTypes as $type) {
- $function = 'is_' . $type;
- if (function_exists($function) && $function($value)) {
- return true;
- }
- /** @var class-string */
- $fqcn = ltrim($type, '\\');
- if (is_object($value) && is_a($value, $fqcn)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Magic getter method for $this->allowedTypes.
- *
- * @return string[] The list of allowed data types
- *
- * @internal
- */
- protected function magicGetAllowedTypes(): array
- {
- return $this->getAllowedTypes();
- }
-
- /**
- * Set the value at the specified offset.
- *
- * @param ?int $offset The offset being set or NULL to append
- * @param AllowedType $value The new value for the offset
- *
- * @return void
- *
- * @throws InvalidArgumentException
- *
- * @api
- */
- public function offsetSet(mixed $offset, mixed $value): void
- {
- if (!$this->isAllowedType($value)) {
- throw new InvalidArgumentException(
- sprintf(
- 'Parameter 2 must be an allowed type, %s given.',
- get_debug_type($value)
- )
- );
- }
- /** @psalm-suppress PossiblyNullArgument */
- parent::offsetSet($offset, $value);
- }
-
- /**
- * Pops an value from the end of the list.
- *
- * @return AllowedType The value from the end of the list
- *
- * @throws RuntimeException
- *
- * @api
- */
- public function pop(): mixed
- {
- return parent::pop();
- }
-
- /**
- * Prepend values at the start of the list.
- *
- * @param AllowedType ...$values One or more values to prepend
- *
- * @return void
- *
- * @throws InvalidArgumentException
- *
- * @api
- */
- public function prepend(mixed ...$values): void
- {
- foreach ($values as $count => $value) {
- if (!$this->isAllowedType($value)) {
- throw new InvalidArgumentException(
- sprintf(
- 'Parameter %d must be an allowed type, %s given.',
- (int) $count + 1,
- get_debug_type($value)
- )
- );
- }
- }
- foreach ($values as $value) {
- parent::unshift($value);
- }
- }
-
- /**
- * Push an value at the end of the list.
- *
- * @param AllowedType $value The value to push
- *
- * @return void
- *
- * @throws InvalidArgumentException
- *
- * @api
- */
- public function push(mixed $value): void
- {
- if (!$this->isAllowedType($value)) {
- throw new InvalidArgumentException(
- sprintf(
- 'Parameter 1 must be an allowed type, %s given.',
- get_debug_type($value)
- )
- );
- }
- parent::push($value);
- }
-
- /**
- * Get string representation of $this.
- *
- * @return string The string representation
- *
- * @internal
- */
- public function serialize(): string
- {
- return serialize($this->__serialize());
- }
-
- /**
- * Set allowed data types of list values.
- *
- * @param string[] $allowedTypes Allowed data types of values
- *
- * @return void
- *
- * @throws InvalidArgumentException
- */
- protected function setAllowedTypes(array $allowedTypes = []): void
- {
- if (array_sum(array_map('is_string', $allowedTypes)) !== count($allowedTypes)) {
- throw new InvalidArgumentException(
- 'Allowed types must be array of strings or empty array.'
- );
- }
- $this->allowedTypes = $allowedTypes;
- }
-
- /**
- * Set the mode of iteration.
- *
- * @param int $mode The new iterator mode (0, 1, 2 or 3)
- *
- * There are two orthogonal sets of modes that can be set.
- *
- * The direction of iteration (either one or the other):
- * - StrictList::IT_MODE_FIFO (queue style)
- * - StrictList::IT_MODE_LIFO (stack style)
- *
- * The behavior of the iterator (either one or the other):
- * - StrictList::IT_MODE_DELETE (delete items)
- * - StrictList::IT_MODE_KEEP (keep items)
- *
- * The default mode is: IT_MODE_FIFO | IT_MODE_KEEP
- *
- * @return int The set of flags and modes of iteration
- *
- * @api
- */
- public function setIteratorMode(int $mode): int
- {
- return parent::setIteratorMode($mode);
- }
-
- /**
- * Shift an value from the beginning of the list.
- *
- * @return AllowedType The first value of the list
- *
- * @throws RuntimeException
- *
- * @api
- */
- public function shift(): mixed
- {
- return parent::shift();
- }
-
- /**
- * Peek at the value at the end of the list.
- *
- * @return AllowedType The last value of the list
- *
- * @throws RuntimeException
- *
- * @api
- */
- public function top(): mixed
- {
- return parent::top();
- }
-
- /**
- * Restore $this from string representation.
- *
- * @param string $data The string representation
- *
- * @return void
- *
- * @internal
- */
- public function unserialize($data): void
- {
- /** @var mixed[] $dataArray */
- $dataArray = unserialize($data);
- $this->__unserialize($dataArray);
- }
-
- /**
- * Prepend the list with an value.
- *
- * @param AllowedType $value The value to unshift
- *
- * @return void
- *
- * @throws InvalidArgumentException
- *
- * @api
- */
- public function unshift(mixed $value): void
- {
- if (!$this->isAllowedType($value)) {
- throw new InvalidArgumentException(
- sprintf(
- 'Parameter 1 must be an allowed type, %s given.',
- get_debug_type($value)
- )
- );
- }
- parent::unshift($value);
- }
-
- /**
- * Create a type-sensitive, traversable list of values.
- *
- * @param string[] $allowedTypes Allowed data types of values (optional)
- *
- * If empty, all types are allowed.
- * Possible values are:
- * - "array"
- * - "bool"
- * - "callable"
- * - "countable"
- * - "float" or "double"
- * - "int" or "integer" or "long"
- * - "iterable"
- * - "null"
- * - "numeric"
- * - "object" or FQCN
- * - "resource"
- * - "scalar"
- * - "string"
- *
- * @return void
- *
- * @throws InvalidArgumentException
- */
- public function __construct(array $allowedTypes = [])
- {
- $this->setAllowedTypes($allowedTypes);
- }
-
- /**
- * Get debug information for $this.
- *
- * @return mixed[] The debug information
- *
- * @internal
- */
- public function __debugInfo(): array
- {
- return $this->__serialize();
- }
-
- /**
- * Get array representation of $this.
- *
- * @return mixed[] The array representation
- *
- * @internal
- */
- public function __serialize(): array
- {
- return [
- 'StrictList::allowedTypes' => $this->allowedTypes,
- 'SplDoublyLinkedList::dllist' => iterator_to_array($this),
- 'SplDoublyLinkedList::flags' => $this->getIteratorMode()
- ];
- }
-
- /**
- * Restore $this from array representation.
- *
- * @param mixed[] $data The array representation
- *
- * @return void
- *
- * @internal
- *
- * @psalm-suppress MethodSignatureMismatch
- */
- public function __unserialize(array $data): void
- {
- /** @var string[] $allowedTypes */
- $allowedTypes = $data['StrictList::allowedTypes'];
- $this->setAllowedTypes($allowedTypes);
- /** @var array $values */
- $values = $data['SplDoublyLinkedList::dllist'];
- $this->append(...$values);
- /** @var int $flags */
- $flags = $data['SplDoublyLinkedList::flags'];
- $this->setIteratorMode($flags);
- }
-}
diff --git a/docs/files/src/DataStructures/StrictQueue.php.txt b/docs/files/src/DataStructures/StrictQueue.php.txt
deleted file mode 100644
index a4758cf..0000000
--- a/docs/files/src/DataStructures/StrictQueue.php.txt
+++ /dev/null
@@ -1,143 +0,0 @@
-
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-declare(strict_types=1);
-
-namespace OCC\Basics\DataStructures;
-
-use ArrayAccess;
-use Countable;
-use Iterator;
-use RuntimeException;
-use Serializable;
-
-/**
- * A type-sensitive, taversable First In, First Out queue (FIFO).
- *
- * Extends [\SplQueue](https://www.php.net/splqueue) with an option to specify
- * the allowed data types for list items.
- *
- * @author Sebastian Meyer
- * @package Basics\DataStructures
- *
- * @api
- *
- * @template AllowedType of mixed
- * @extends StrictList
- * @implements ArrayAccess
- * @implements Iterator
- */
-class StrictQueue extends StrictList implements ArrayAccess, Countable, Iterator, Serializable
-{
- /**
- * Dequeue an item from the queue.
- *
- * @return AllowedType The dequeued item
- *
- * @api
- */
- public function dequeue(): mixed
- {
- return parent::shift();
- }
-
- /**
- * Add an item to the queue.
- *
- * @param AllowedType $item The item to enqueue
- *
- * @return void
- *
- * @throws \InvalidArgumentException
- *
- * @api
- */
- public function enqueue(mixed $item): void
- {
- parent::push($item);
- }
-
- /**
- * Set the mode of iteration.
- *
- * @param int $mode The new iterator mode (0 or 1)
- *
- * There are two orthogonal sets of modes that can be set.
- *
- * The direction of iteration (fixed for StrictQueue):
- * - StrictQueue::IT_MODE_FIFO (queue style)
- *
- * The behavior of the iterator (either one or the other):
- * - StrictQueue::IT_MODE_DELETE (delete items)
- * - StrictQueue::IT_MODE_KEEP (keep items)
- *
- * The default mode is: IT_MODE_FIFO | IT_MODE_KEEP
- *
- * @return int The set of flags and modes of iteration
- *
- * @throws RuntimeException
- *
- * @api
- */
- final public function setIteratorMode(int $mode): int
- {
- if ($mode > 1) {
- throw new RuntimeException(
- sprintf(
- 'Changing the iterator direction of %s is prohibited.',
- static::class
- )
- );
- }
- return parent::setIteratorMode($mode);
- }
-
- /**
- * Create a type-sensitive, traversable queue of items.
- *
- * @param string[] $allowedTypes Allowed data types of items (optional)
- *
- * If empty, all types are allowed.
- * Possible values are:
- * - "array"
- * - "bool"
- * - "callable"
- * - "countable"
- * - "float" or "double"
- * - "int" or "integer" or "long"
- * - "iterable"
- * - "null"
- * - "numeric"
- * - "object" or FQCN
- * - "resource"
- * - "scalar"
- * - "string"
- *
- * @return void
- *
- * @throws \InvalidArgumentException
- */
- public function __construct(array $allowedTypes = [])
- {
- parent::__construct($allowedTypes);
- $this->setIteratorMode(0);
- }
-}
diff --git a/docs/files/src/DataStructures/StrictStack.php.txt b/docs/files/src/DataStructures/StrictStack.php.txt
deleted file mode 100644
index afaf3b5..0000000
--- a/docs/files/src/DataStructures/StrictStack.php.txt
+++ /dev/null
@@ -1,143 +0,0 @@
-
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-declare(strict_types=1);
-
-namespace OCC\Basics\DataStructures;
-
-use ArrayAccess;
-use Countable;
-use Iterator;
-use RuntimeException;
-use Serializable;
-
-/**
- * A type-sensitive, taversable Last In, First Out stack (LIFO).
- *
- * Extends [\SplStack](https://www.php.net/splstack) with an option to specify
- * the allowed data types for list items.
- *
- * @author Sebastian Meyer
- * @package Basics\DataStructures
- *
- * @api
- *
- * @template AllowedType of mixed
- * @extends StrictList
- * @implements ArrayAccess
- * @implements Iterator
- */
-class StrictStack extends StrictList implements ArrayAccess, Countable, Iterator, Serializable
-{
- /**
- * Add an item to the stack.
- *
- * @param AllowedType $item The item to stack
- *
- * @return void
- *
- * @throws \InvalidArgumentException
- *
- * @api
- */
- public function stack(mixed $item): void
- {
- parent::push($item);
- }
-
- /**
- * Unstack an item from the stack.
- *
- * @return AllowedType The unstacked item
- *
- * @api
- */
- public function unstack(): mixed
- {
- return parent::pop();
- }
-
- /**
- * Set the mode of iteration.
- *
- * @param int $mode The new iterator mode (2 or 3)
- *
- * There are two orthogonal sets of modes that can be set.
- *
- * The direction of iteration (fixed for StrictStack):
- * - StrictStack::IT_MODE_LIFO (stack style)
- *
- * The behavior of the iterator (either one or the other):
- * - StrictStack::IT_MODE_DELETE (delete items)
- * - StrictStack::IT_MODE_KEEP (keep items)
- *
- * The default mode is: IT_MODE_LIFO | IT_MODE_KEEP
- *
- * @return int The set of flags and modes of iteration
- *
- * @throws RuntimeException
- *
- * @api
- */
- final public function setIteratorMode(int $mode): int
- {
- if ($mode < 2) {
- throw new RuntimeException(
- sprintf(
- 'Changing the iterator direction of %s is prohibited.',
- static::class
- )
- );
- }
- return parent::setIteratorMode($mode);
- }
-
- /**
- * Create a type-sensitive, traversable stack of items.
- *
- * @param string[] $allowedTypes Allowed data types of items (optional)
- *
- * If empty, all types are allowed.
- * Possible values are:
- * - "array"
- * - "bool"
- * - "callable"
- * - "countable"
- * - "float" or "double"
- * - "int" or "integer" or "long"
- * - "iterable"
- * - "null"
- * - "numeric"
- * - "object" or FQCN
- * - "resource"
- * - "scalar"
- * - "string"
- *
- * @return void
- *
- * @throws \InvalidArgumentException
- */
- public function __construct(array $allowedTypes = [])
- {
- parent::__construct($allowedTypes);
- $this->setIteratorMode(2);
- }
-}
diff --git a/docs/files/src/ErrorHandlers/ThrowErrorException.php.txt b/docs/files/src/ErrorHandlers/ThrowErrorException.php.txt
deleted file mode 100644
index ed7c241..0000000
--- a/docs/files/src/ErrorHandlers/ThrowErrorException.php.txt
+++ /dev/null
@@ -1,63 +0,0 @@
-
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-declare(strict_types=1);
-
-namespace OCC\Basics\ErrorHandlers;
-
-use ErrorException;
-
-/**
- * Throw internal errors as exceptions.
- *
- * Usage: set_error_handler(new ThrowErrorException());
- *
- * @author Sebastian Meyer
- * @package Basics\ErrorHandlers
- *
- * @api
- */
-class ThrowErrorException
-{
- /**
- * Convert an internal PHP error into an ErrorException.
- *
- * @param int $errno The severity of the error
- * @param string $errstr The error message
- * @param ?string $errfile The name of the file the error was raised in
- * @param ?int $errline The line number the error was raised in
- *
- * @return bool Always returns FALSE when not throwing an exception
- *
- * @throws ErrorException
- */
- public function __invoke(
- int $errno = E_USER_ERROR,
- string $errstr = '',
- ?string $errfile = null,
- ?int $errline = null
- ): bool {
- if ((error_reporting() & $errno) > 0) {
- throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
- }
- return false;
- }
-}
diff --git a/docs/files/src/ErrorHandlers/TriggerExceptionError.php.txt b/docs/files/src/ErrorHandlers/TriggerExceptionError.php.txt
deleted file mode 100644
index 83b7f8c..0000000
--- a/docs/files/src/ErrorHandlers/TriggerExceptionError.php.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-declare(strict_types=1);
-
-namespace OCC\Basics\ErrorHandlers;
-
-use Throwable;
-
-/**
- * Trigger errors for uncaught exceptions.
- *
- * Usage: set_exception_handler(new TriggerExceptionError());
- *
- * @author Sebastian Meyer
- * @package Basics\ErrorHandlers
- *
- * @api
- */
-class TriggerExceptionError
-{
- /**
- * Convert an uncaught exception into an PHP error.
- *
- * @param Throwable $exception The exception
- *
- * @return void
- */
- public function __invoke(Throwable $exception): void
- {
- $message = sprintf(
- 'Uncaught Exception [%d] in file %s on line %d: %s',
- $exception->getCode(),
- $exception->getFile(),
- $exception->getLine(),
- $exception->getMessage()
- );
- trigger_error($message, E_USER_ERROR);
- }
-}
diff --git a/docs/files/src/InterfaceTraits/ArrayAccessTrait.php.txt b/docs/files/src/InterfaceTraits/ArrayAccessTrait.php.txt
deleted file mode 100644
index 69b540a..0000000
--- a/docs/files/src/InterfaceTraits/ArrayAccessTrait.php.txt
+++ /dev/null
@@ -1,111 +0,0 @@
-
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-declare(strict_types=1);
-
-namespace OCC\Basics\InterfaceTraits;
-
-use ArrayAccess;
-
-/**
- * A generic implementation of the ArrayAccess interface.
- *
- * @author Sebastian Meyer
- * @package Basics\InterfaceTraits
- *
- * @api
- *
- * @template TKey of int|string
- * @template TValue of mixed
- * @template TData of array
- * @implements ArrayAccess
- * @phpstan-require-implements ArrayAccess
- */
-trait ArrayAccessTrait
-{
- /**
- * Holds the array-accessible data.
- *
- * @var TData
- */
- protected array $data = [];
-
- /**
- * Check if the specified offset exists.
- *
- * @param TKey $offset The offset to check for
- *
- * @return bool Whether the offset exists
- *
- * @api
- */
- public function offsetExists(mixed $offset): bool
- {
- return isset($this->data[$offset]);
- }
-
- /**
- * Retrieve data at the specified offset.
- *
- * @param TKey $offset The offset to retrieve at
- *
- * @return ?TValue The value at the offset or NULL
- *
- * @api
- */
- public function offsetGet(mixed $offset): mixed
- {
- return $this->data[$offset] ?? null;
- }
-
- /**
- * Assign a value to the specified offset.
- *
- * @param ?TKey $offset The offset to assign to or NULL to append
- * @param TValue $value The value to set
- *
- * @return void
- *
- * @api
- */
- public function offsetSet(mixed $offset, mixed $value): void
- {
- if (is_null($offset)) {
- $this->data[] = $value;
- } else {
- $this->data[$offset] = $value;
- }
- }
-
- /**
- * Unset the specified offset.
- *
- * @param TKey $offset The offset to unset
- *
- * @return void
- *
- * @api
- */
- public function offsetUnset(mixed $offset): void
- {
- unset($this->data[$offset]);
- }
-}
diff --git a/docs/files/src/InterfaceTraits/CountableTrait.php.txt b/docs/files/src/InterfaceTraits/CountableTrait.php.txt
deleted file mode 100644
index 69f10f8..0000000
--- a/docs/files/src/InterfaceTraits/CountableTrait.php.txt
+++ /dev/null
@@ -1,62 +0,0 @@
-
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-declare(strict_types=1);
-
-namespace OCC\Basics\InterfaceTraits;
-
-use Countable;
-
-/**
- * A generic implementation of the Countable interface.
- *
- * @author Sebastian Meyer
- * @package Basics\InterfaceTraits
- *
- * @api
- *
- * @template TKey of int|string
- * @template TValue of mixed
- * @template TData of array
- * @implements Countable
- * @phpstan-require-implements Countable
- */
-trait CountableTrait
-{
- /**
- * Holds the countable data.
- *
- * @var TData
- */
- protected array $data = [];
-
- /**
- * Count the data items.
- *
- * @return int The number of data items
- *
- * @api
- */
- public function count(): int
- {
- return count($this->data);
- }
-}
diff --git a/docs/files/src/InterfaceTraits/IteratorAggregateTrait.php.txt b/docs/files/src/InterfaceTraits/IteratorAggregateTrait.php.txt
deleted file mode 100644
index 83fc8d4..0000000
--- a/docs/files/src/InterfaceTraits/IteratorAggregateTrait.php.txt
+++ /dev/null
@@ -1,63 +0,0 @@
-
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-declare(strict_types=1);
-
-namespace OCC\Basics\InterfaceTraits;
-
-use ArrayIterator;
-use IteratorAggregate;
-
-/**
- * A generic implementation of the IteratorAggregate interface.
- *
- * @author Sebastian Meyer
- * @package Basics\InterfaceTraits
- *
- * @api
- *
- * @template TKey of int|string
- * @template TValue of mixed
- * @template TData of array
- * @implements IteratorAggregate
- * @phpstan-require-implements IteratorAggregate
- */
-trait IteratorAggregateTrait
-{
- /**
- * Holds the iterable data.
- *
- * @var TData
- */
- protected array $data = [];
-
- /**
- * Retrieve an external iterator.
- *
- * @return ArrayIterator New array iterator for data array
- *
- * @api
- */
- public function getIterator(): ArrayIterator
- {
- return new ArrayIterator($this->data);
- }
-}
diff --git a/docs/files/src/InterfaceTraits/IteratorTrait.php.txt b/docs/files/src/InterfaceTraits/IteratorTrait.php.txt
deleted file mode 100644
index c84a2f0..0000000
--- a/docs/files/src/InterfaceTraits/IteratorTrait.php.txt
+++ /dev/null
@@ -1,122 +0,0 @@
-
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-declare(strict_types=1);
-
-namespace OCC\Basics\InterfaceTraits;
-
-use Iterator;
-
-/**
- * A generic implementation of the Iterator interface.
- *
- * @author Sebastian Meyer
- * @package Basics\InterfaceTraits
- *
- * @api
- *
- * @template TKey of int|string
- * @template TValue of mixed
- * @template TData of array
- * @implements Iterator
- * @phpstan-require-implements Iterator
- */
-trait IteratorTrait
-{
- /**
- * Holds the iterable data.
- *
- * @var TData
- */
- protected array $data = [];
-
- /**
- * Return the current item.
- *
- * @return TValue|false The current item or FALSE if invalid
- *
- * @api
- */
- public function current(): mixed
- {
- return current($this->data);
- }
-
- /**
- * Return the current key.
- *
- * @return ?TKey The current key or NULL if invalid
- *
- * @api
- */
- public function key(): mixed
- {
- return key($this->data);
- }
-
- /**
- * Move forward to next item.
- *
- * @return void
- *
- * @api
- */
- public function next(): void
- {
- next($this->data);
- }
-
- /**
- * Move back to previous item.
- *
- * @return void
- *
- * @api
- */
- public function prev(): void
- {
- prev($this->data);
- }
-
- /**
- * Rewind the iterator to the first item.
- *
- * @return void
- *
- * @api
- */
- public function rewind(): void
- {
- reset($this->data);
- }
-
- /**
- * Check if current position is valid.
- *
- * @return bool Whether the current position is valid
- *
- * @api
- */
- public function valid(): bool
- {
- return !is_null($this->key());
- }
-}
diff --git a/docs/files/src/Traits/Getter.php.txt b/docs/files/src/Traits/Getter.php.txt
deleted file mode 100644
index 5ad7f6d..0000000
--- a/docs/files/src/Traits/Getter.php.txt
+++ /dev/null
@@ -1,86 +0,0 @@
-
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-declare(strict_types=1);
-
-namespace OCC\Basics\Traits;
-
-use InvalidArgumentException;
-
-/**
- * Reads data from inaccessible properties by using magic methods.
- *
- * @author Sebastian Meyer
- * @package Basics\Traits
- */
-trait Getter
-{
- /**
- * Read data from an inaccessible property.
- *
- * @param string $property The class property to get
- *
- * @return mixed The class property's current value
- *
- * @throws InvalidArgumentException
- *
- * @internal
- */
- public function __get(string $property): mixed
- {
- $method = 'magicGet' . ucfirst($property);
- if (
- property_exists(static::class, $property)
- && method_exists(static::class, $method)
- ) {
- return $this->$method();
- } else {
- throw new InvalidArgumentException(
- sprintf(
- 'Invalid property or missing getter method for property: %s->%s.',
- static::class,
- $property
- )
- );
- }
- }
-
- /**
- * Check if an inaccessible property is set and not empty.
- *
- * @param string $property The class property to check
- *
- * @return bool Whether the class property is set and not empty
- *
- * @internal
- */
- public function __isset(string $property): bool
- {
- try {
- /** @var mixed $value */
- $value = $this->__get($property);
- } catch (InvalidArgumentException) {
- $value = null;
- } finally {
- return boolval($value ?? null) !== false;
- }
- }
-}
diff --git a/docs/files/src/Traits/Setter.php.txt b/docs/files/src/Traits/Setter.php.txt
deleted file mode 100644
index a44cd5e..0000000
--- a/docs/files/src/Traits/Setter.php.txt
+++ /dev/null
@@ -1,85 +0,0 @@
-
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-declare(strict_types=1);
-
-namespace OCC\Basics\Traits;
-
-use InvalidArgumentException;
-
-/**
- * Writes data to inaccessible properties by using magic methods.
- *
- * @author Sebastian Meyer
- * @package Basics\Traits
- */
-trait Setter
-{
- /**
- * Write data to an inaccessible property.
- *
- * @param string $property The class property to set
- * @param mixed $value The new value of the property
- *
- * @return void
- *
- * @throws InvalidArgumentException
- *
- * @internal
- */
- public function __set(string $property, mixed $value): void
- {
- $method = 'magicSet' . ucfirst($property);
- if (
- property_exists(static::class, $property)
- && method_exists(static::class, $method)
- ) {
- $this->$method($value);
- } else {
- throw new InvalidArgumentException(
- sprintf(
- 'Invalid property or missing setter method for property: %s->%s.',
- static::class,
- $property
- )
- );
- }
- }
-
- /**
- * Unset an inaccessible property.
- *
- * @param string $property The class property to unset
- *
- * @return void
- *
- * @throws InvalidArgumentException
- *
- * @internal
- */
- public function __unset(string $property): void
- {
- try {
- $this->__set($property, null);
- } catch (InvalidArgumentException) {
- }
- }
-}
diff --git a/docs/files/src/Traits/Singleton.php.txt b/docs/files/src/Traits/Singleton.php.txt
deleted file mode 100644
index 80b5abe..0000000
--- a/docs/files/src/Traits/Singleton.php.txt
+++ /dev/null
@@ -1,84 +0,0 @@
-
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-declare(strict_types=1);
-
-namespace OCC\Basics\Traits;
-
-use LogicException;
-
-/**
- * Allows just a single instance of the class using this trait.
- *
- * @author Sebastian Meyer
- * @package Basics\Traits
- */
-trait Singleton
-{
- /**
- * Holds the singleton instance.
- *
- * @var array
- *
- * @internal
- */
- private static array $singleton = [];
-
- /**
- * Get a singleton instance of this class.
- *
- * @param mixed ...$args Constructor parameters
- *
- * @return static The singleton instance
- *
- * @api
- */
- final public static function getInstance(mixed ...$args): static
- {
- if (!isset(static::$singleton[static::class])) {
- static::$singleton[static::class] = new static(...$args);
- }
- return static::$singleton[static::class];
- }
-
- /**
- * This is a singleton class, thus the constructor is private.
- *
- * Usage: Get an instance of this class by calling static::getInstance()
- *
- * @return void
- */
- abstract private function __construct();
-
- /**
- * This is a singleton class, thus cloning is prohibited.
- *
- * @return void
- *
- * @throws LogicException
- *
- * @internal
- */
- final public function __clone(): void
- {
- throw new LogicException('Cloning a singleton is prohibited.');
- }
-}
diff --git a/docs/graphs/classes.html b/docs/graphs/classes.html
deleted file mode 100644
index 5f32b78..0000000
--- a/docs/graphs/classes.html
+++ /dev/null
@@ -1,179 +0,0 @@
-
-
-
-
- PHP Basics
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/js/search.js b/docs/js/search.js
deleted file mode 100644
index 093d6d0..0000000
--- a/docs/js/search.js
+++ /dev/null
@@ -1,173 +0,0 @@
-// Search module for phpDocumentor
-//
-// This module is a wrapper around fuse.js that will use a given index and attach itself to a
-// search form and to a search results pane identified by the following data attributes:
-//
-// 1. data-search-form
-// 2. data-search-results
-//
-// The data-search-form is expected to have a single input element of type 'search' that will trigger searching for
-// a series of results, were the data-search-results pane is expected to have a direct UL child that will be populated
-// with rendered results.
-//
-// The search has various stages, upon loading this stage the data-search-form receives the CSS class
-// 'phpdocumentor-search--enabled'; this indicates that JS is allowed and indices are being loaded. It is recommended
-// to hide the form by default and show it when it receives this class to achieve progressive enhancement for this
-// feature.
-//
-// After loading this module, it is expected to load a search index asynchronously, for example:
-//
-//
-//
-// In this script the generated index should attach itself to the search module using the `appendIndex` function. By
-// doing it like this the page will continue loading, unhindered by the loading of the search.
-//
-// After the page has fully loaded, and all these deferred indexes loaded, the initialization of the search module will
-// be called and the form will receive the class 'phpdocumentor-search--active', indicating search is ready. At this
-// point, the input field will also have it's 'disabled' attribute removed.
-var Search = (function () {
- var fuse;
- var index = [];
- var options = {
- shouldSort: true,
- threshold: 0.6,
- location: 0,
- distance: 100,
- maxPatternLength: 32,
- minMatchCharLength: 1,
- keys: [
- "fqsen",
- "name",
- "summary",
- "url"
- ]
- };
-
- // Credit David Walsh (https://davidwalsh.name/javascript-debounce-function)
- // Returns a function, that, as long as it continues to be invoked, will not
- // be triggered. The function will be called after it stops being called for
- // N milliseconds. If `immediate` is passed, trigger the function on the
- // leading edge, instead of the trailing.
- function debounce(func, wait, immediate) {
- var timeout;
-
- return function executedFunction() {
- var context = this;
- var args = arguments;
-
- var later = function () {
- timeout = null;
- if (!immediate) func.apply(context, args);
- };
-
- var callNow = immediate && !timeout;
- clearTimeout(timeout);
- timeout = setTimeout(later, wait);
- if (callNow) func.apply(context, args);
- };
- }
-
- function close() {
- // Start scroll prevention: https://css-tricks.com/prevent-page-scrolling-when-a-modal-is-open/
- const scrollY = document.body.style.top;
- document.body.style.position = '';
- document.body.style.top = '';
- window.scrollTo(0, parseInt(scrollY || '0') * -1);
- // End scroll prevention
-
- var form = document.querySelector('[data-search-form]');
- var searchResults = document.querySelector('[data-search-results]');
-
- form.classList.toggle('phpdocumentor-search--has-results', false);
- searchResults.classList.add('phpdocumentor-search-results--hidden');
- var searchField = document.querySelector('[data-search-form] input[type="search"]');
- searchField.blur();
- }
-
- function search(event) {
- // Start scroll prevention: https://css-tricks.com/prevent-page-scrolling-when-a-modal-is-open/
- document.body.style.position = 'fixed';
- document.body.style.top = `-${window.scrollY}px`;
- // End scroll prevention
-
- // prevent enter's from autosubmitting
- event.stopPropagation();
-
- var form = document.querySelector('[data-search-form]');
- var searchResults = document.querySelector('[data-search-results]');
- var searchResultEntries = document.querySelector('[data-search-results] .phpdocumentor-search-results__entries');
-
- searchResultEntries.innerHTML = '';
-
- if (!event.target.value) {
- close();
- return;
- }
-
- form.classList.toggle('phpdocumentor-search--has-results', true);
- searchResults.classList.remove('phpdocumentor-search-results--hidden');
- var results = fuse.search(event.target.value, {limit: 25});
-
- results.forEach(function (result) {
- var entry = document.createElement("li");
- entry.classList.add("phpdocumentor-search-results__entry");
- entry.innerHTML += '