diff --git a/tools/.phpstan/composer.json b/tools/.phpstan/composer.json
index bc26e4a..403f451 100644
--- a/tools/.phpstan/composer.json
+++ b/tools/.phpstan/composer.json
@@ -3,7 +3,7 @@
"phpstan/phpstan": "^2.2.2",
"phpstan/extension-installer": "^1.4.3",
"phpstan/phpstan-strict-rules": "^2.0.11",
- "tomasvotruba/type-coverage": "^2.2.1",
+ "tomasvotruba/type-coverage": "^2.2.2",
"ergebnis/phpstan-rules": "^2.13.1"
},
"config": {
diff --git a/tools/.phpstan/composer.lock b/tools/.phpstan/composer.lock
index bc66d01..ccd7250 100644
--- a/tools/.phpstan/composer.lock
+++ b/tools/.phpstan/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "4eab8c5c85547e2ce7955908c8e18413",
+ "content-hash": "5dee8c6e3ce17b76a883bfa844ffcc70",
"packages": [],
"packages-dev": [
{
@@ -80,97 +80,6 @@
},
"time": "2026-01-27T17:13:06+00:00"
},
- {
- "name": "nette/utils",
- "version": "v4.1.4",
- "source": {
- "type": "git",
- "url": "https://github.com/nette/utils.git",
- "reference": "7da6c396d7ebe142bc857c20479d5e70a5e1aac7"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/nette/utils/zipball/7da6c396d7ebe142bc857c20479d5e70a5e1aac7",
- "reference": "7da6c396d7ebe142bc857c20479d5e70a5e1aac7",
- "shasum": ""
- },
- "require": {
- "php": "8.2 - 8.5"
- },
- "conflict": {
- "nette/finder": "<3",
- "nette/schema": "<1.2.2"
- },
- "require-dev": {
- "jetbrains/phpstorm-attributes": "^1.2",
- "nette/phpstan-rules": "^1.0",
- "nette/tester": "^2.5",
- "phpstan/extension-installer": "^1.4@stable",
- "phpstan/phpstan": "^2.1@stable",
- "tracy/tracy": "^2.9"
- },
- "suggest": {
- "ext-gd": "to use Image",
- "ext-iconv": "to use Strings::webalize(), toAscii(), chr() and reverse()",
- "ext-intl": "to use Strings::webalize(), toAscii(), normalize() and compare()",
- "ext-json": "to use Nette\\Utils\\Json",
- "ext-mbstring": "to use Strings::lower() etc...",
- "ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "4.1-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Nette\\": "src"
- },
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause",
- "GPL-2.0-only",
- "GPL-3.0-only"
- ],
- "authors": [
- {
- "name": "David Grudl",
- "homepage": "https://davidgrudl.com"
- },
- {
- "name": "Nette Community",
- "homepage": "https://nette.org/contributors"
- }
- ],
- "description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.",
- "homepage": "https://nette.org",
- "keywords": [
- "array",
- "core",
- "datetime",
- "images",
- "json",
- "nette",
- "paginator",
- "password",
- "slugify",
- "string",
- "unicode",
- "utf-8",
- "utility",
- "validation"
- ],
- "support": {
- "issues": "https://github.com/nette/utils/issues",
- "source": "https://github.com/nette/utils/tree/v4.1.4"
- },
- "time": "2026-05-11T20:49:54+00:00"
- },
{
"name": "phpstan/extension-installer",
"version": "1.4.3",
@@ -336,22 +245,31 @@
},
{
"name": "tomasvotruba/type-coverage",
- "version": "2.2.1",
+ "version": "2.2.2",
"source": {
"type": "git",
"url": "https://github.com/TomasVotruba/type-coverage.git",
- "reference": "4087caa4639bdd4c646f2984bc333efeddf69e4b"
+ "reference": "25f298265c823e8fb0505169135855e1e6a91021"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/TomasVotruba/type-coverage/zipball/4087caa4639bdd4c646f2984bc333efeddf69e4b",
- "reference": "4087caa4639bdd4c646f2984bc333efeddf69e4b",
+ "url": "https://api.github.com/repos/TomasVotruba/type-coverage/zipball/25f298265c823e8fb0505169135855e1e6a91021",
+ "reference": "25f298265c823e8fb0505169135855e1e6a91021",
"shasum": ""
},
"require": {
- "nette/utils": "^3.2 || ^4.0",
- "php": "^7.4 || ^8.0",
- "phpstan/phpstan": "^2.1.33"
+ "php": "^8.4",
+ "phpstan/phpstan": "^2.2"
+ },
+ "require-dev": {
+ "phpstan/extension-installer": "^1.4",
+ "phpunit/phpunit": "^12.5",
+ "rector/jack": "^1.0",
+ "rector/rector": "^2.4",
+ "shipmonk/composer-dependency-analyser": "^1.8",
+ "symplify/easy-coding-standard": "^13.1",
+ "tomasvotruba/unused-public": "^2.2",
+ "tracy/tracy": "^2.12"
},
"type": "phpstan-extension",
"extra": {
@@ -377,7 +295,7 @@
],
"support": {
"issues": "https://github.com/TomasVotruba/type-coverage/issues",
- "source": "https://github.com/TomasVotruba/type-coverage/tree/2.2.1"
+ "source": "https://github.com/TomasVotruba/type-coverage/tree/2.2.2"
},
"funding": [
{
@@ -389,7 +307,7 @@
"type": "github"
}
],
- "time": "2026-05-26T08:14:01+00:00"
+ "time": "2026-06-07T12:35:00+00:00"
}
],
"aliases": [],
diff --git a/tools/.phpstan/vendor/composer/installed.json b/tools/.phpstan/vendor/composer/installed.json
index b1ee3e4..46d12ed 100644
--- a/tools/.phpstan/vendor/composer/installed.json
+++ b/tools/.phpstan/vendor/composer/installed.json
@@ -76,100 +76,6 @@
},
"install-path": "../ergebnis/phpstan-rules"
},
- {
- "name": "nette/utils",
- "version": "v4.1.4",
- "version_normalized": "4.1.4.0",
- "source": {
- "type": "git",
- "url": "https://github.com/nette/utils.git",
- "reference": "7da6c396d7ebe142bc857c20479d5e70a5e1aac7"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/nette/utils/zipball/7da6c396d7ebe142bc857c20479d5e70a5e1aac7",
- "reference": "7da6c396d7ebe142bc857c20479d5e70a5e1aac7",
- "shasum": ""
- },
- "require": {
- "php": "8.2 - 8.5"
- },
- "conflict": {
- "nette/finder": "<3",
- "nette/schema": "<1.2.2"
- },
- "require-dev": {
- "jetbrains/phpstorm-attributes": "^1.2",
- "nette/phpstan-rules": "^1.0",
- "nette/tester": "^2.5",
- "phpstan/extension-installer": "^1.4@stable",
- "phpstan/phpstan": "^2.1@stable",
- "tracy/tracy": "^2.9"
- },
- "suggest": {
- "ext-gd": "to use Image",
- "ext-iconv": "to use Strings::webalize(), toAscii(), chr() and reverse()",
- "ext-intl": "to use Strings::webalize(), toAscii(), normalize() and compare()",
- "ext-json": "to use Nette\\Utils\\Json",
- "ext-mbstring": "to use Strings::lower() etc...",
- "ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()"
- },
- "time": "2026-05-11T20:49:54+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "4.1-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Nette\\": "src"
- },
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause",
- "GPL-2.0-only",
- "GPL-3.0-only"
- ],
- "authors": [
- {
- "name": "David Grudl",
- "homepage": "https://davidgrudl.com"
- },
- {
- "name": "Nette Community",
- "homepage": "https://nette.org/contributors"
- }
- ],
- "description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.",
- "homepage": "https://nette.org",
- "keywords": [
- "array",
- "core",
- "datetime",
- "images",
- "json",
- "nette",
- "paginator",
- "password",
- "slugify",
- "string",
- "unicode",
- "utf-8",
- "utility",
- "validation"
- ],
- "support": {
- "issues": "https://github.com/nette/utils/issues",
- "source": "https://github.com/nette/utils/tree/v4.1.4"
- },
- "install-path": "../nette/utils"
- },
{
"name": "phpstan/extension-installer",
"version": "1.4.3",
@@ -344,25 +250,34 @@
},
{
"name": "tomasvotruba/type-coverage",
- "version": "2.2.1",
- "version_normalized": "2.2.1.0",
+ "version": "2.2.2",
+ "version_normalized": "2.2.2.0",
"source": {
"type": "git",
"url": "https://github.com/TomasVotruba/type-coverage.git",
- "reference": "4087caa4639bdd4c646f2984bc333efeddf69e4b"
+ "reference": "25f298265c823e8fb0505169135855e1e6a91021"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/TomasVotruba/type-coverage/zipball/4087caa4639bdd4c646f2984bc333efeddf69e4b",
- "reference": "4087caa4639bdd4c646f2984bc333efeddf69e4b",
+ "url": "https://api.github.com/repos/TomasVotruba/type-coverage/zipball/25f298265c823e8fb0505169135855e1e6a91021",
+ "reference": "25f298265c823e8fb0505169135855e1e6a91021",
"shasum": ""
},
"require": {
- "nette/utils": "^3.2 || ^4.0",
- "php": "^7.4 || ^8.0",
- "phpstan/phpstan": "^2.1.33"
+ "php": "^8.4",
+ "phpstan/phpstan": "^2.2"
},
- "time": "2026-05-26T08:14:01+00:00",
+ "require-dev": {
+ "phpstan/extension-installer": "^1.4",
+ "phpunit/phpunit": "^12.5",
+ "rector/jack": "^1.0",
+ "rector/rector": "^2.4",
+ "shipmonk/composer-dependency-analyser": "^1.8",
+ "symplify/easy-coding-standard": "^13.1",
+ "tomasvotruba/unused-public": "^2.2",
+ "tracy/tracy": "^2.12"
+ },
+ "time": "2026-06-07T12:35:00+00:00",
"type": "phpstan-extension",
"extra": {
"phpstan": {
@@ -388,7 +303,7 @@
],
"support": {
"issues": "https://github.com/TomasVotruba/type-coverage/issues",
- "source": "https://github.com/TomasVotruba/type-coverage/tree/2.2.1"
+ "source": "https://github.com/TomasVotruba/type-coverage/tree/2.2.2"
},
"funding": [
{
@@ -406,7 +321,6 @@
"dev": true,
"dev-package-names": [
"ergebnis/phpstan-rules",
- "nette/utils",
"phpstan/extension-installer",
"phpstan/phpstan",
"phpstan/phpstan-strict-rules",
diff --git a/tools/.phpstan/vendor/composer/installed.php b/tools/.phpstan/vendor/composer/installed.php
index 425601d..6d27641 100644
--- a/tools/.phpstan/vendor/composer/installed.php
+++ b/tools/.phpstan/vendor/composer/installed.php
@@ -3,7 +3,7 @@
'name' => '__root__',
'pretty_version' => 'dev-main',
'version' => 'dev-main',
- 'reference' => '94a4f8ce9b795e1d194884a36bbda93115a7ffa1',
+ 'reference' => '183b82cc23c52c7b70a24393bcfb6fdb0ca27146',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -13,7 +13,7 @@
'__root__' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
- 'reference' => '94a4f8ce9b795e1d194884a36bbda93115a7ffa1',
+ 'reference' => '183b82cc23c52c7b70a24393bcfb6fdb0ca27146',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -28,15 +28,6 @@
'aliases' => array(),
'dev_requirement' => true,
),
- 'nette/utils' => array(
- 'pretty_version' => 'v4.1.4',
- 'version' => '4.1.4.0',
- 'reference' => '7da6c396d7ebe142bc857c20479d5e70a5e1aac7',
- 'type' => 'library',
- 'install_path' => __DIR__ . '/../nette/utils',
- 'aliases' => array(),
- 'dev_requirement' => true,
- ),
'phpstan/extension-installer' => array(
'pretty_version' => '1.4.3',
'version' => '1.4.3.0',
@@ -65,9 +56,9 @@
'dev_requirement' => true,
),
'tomasvotruba/type-coverage' => array(
- 'pretty_version' => '2.2.1',
- 'version' => '2.2.1.0',
- 'reference' => '4087caa4639bdd4c646f2984bc333efeddf69e4b',
+ 'pretty_version' => '2.2.2',
+ 'version' => '2.2.2.0',
+ 'reference' => '25f298265c823e8fb0505169135855e1e6a91021',
'type' => 'phpstan-extension',
'install_path' => __DIR__ . '/../tomasvotruba/type-coverage',
'aliases' => array(),
diff --git a/tools/.phpstan/vendor/nette/utils/.phpstorm.meta.php b/tools/.phpstan/vendor/nette/utils/.phpstorm.meta.php
deleted file mode 100644
index 64dc487..0000000
--- a/tools/.phpstan/vendor/nette/utils/.phpstorm.meta.php
+++ /dev/null
@@ -1,11 +0,0 @@
-
-✅ [Callback](https://doc.nette.org/utils/callback) - PHP callbacks
-✅ [Filesystem](https://doc.nette.org/utils/filesystem) - copying, renaming, …
-✅ [Finder](https://doc.nette.org/utils/finder) - finds files and directories
-✅ [Floats](https://doc.nette.org/utils/floats) - floating point numbers
-✅ [Helper Functions](https://doc.nette.org/utils/helpers)
-✅ [HTML elements](https://doc.nette.org/utils/html-elements) - generate HTML
-✅ [Images](https://doc.nette.org/utils/images) - crop, resize, rotate images
-✅ [Iterables](https://doc.nette.org/utils/iterables)
-✅ [JSON](https://doc.nette.org/utils/json) - encoding and decoding
-✅ [Generating Random Strings](https://doc.nette.org/utils/random)
-✅ [Paginator](https://doc.nette.org/utils/paginator) - pagination math
-✅ [PHP Reflection](https://doc.nette.org/utils/reflection)
-✅ [Strings](https://doc.nette.org/utils/strings) - useful text functions
-✅ [SmartObject](https://doc.nette.org/utils/smartobject) - PHP object enhancements
-✅ [Type](https://doc.nette.org/utils/type) - PHP data type
-✅ [Validation](https://doc.nette.org/utils/validators) - validate inputs
-
-
-
-Installation
-------------
-
-The recommended way to install is via Composer:
-
-```
-composer require nette/utils
-```
-
-Nette Utils 4.1 is compatible with PHP 8.2 to 8.5.
-
-
-
-[Support Me](https://github.com/sponsors/dg)
---------------------------------------------
-
-Do you like Nette Utils? Are you looking forward to the new features?
-
-[](https://github.com/sponsors/dg)
-
-Thank you!
diff --git a/tools/.phpstan/vendor/nette/utils/src/HtmlStringable.php b/tools/.phpstan/vendor/nette/utils/src/HtmlStringable.php
deleted file mode 100644
index c9600d2..0000000
--- a/tools/.phpstan/vendor/nette/utils/src/HtmlStringable.php
+++ /dev/null
@@ -1,23 +0,0 @@
->
- * @property-read bool $first
- * @property-read bool $last
- * @property-read bool $empty
- * @property-read bool $odd
- * @property-read bool $even
- * @property-read int $counter
- * @property-read TKey $nextKey
- * @property-read TValue $nextValue
- */
-class CachingIterator extends \CachingIterator implements \Countable
-{
- use Nette\SmartObject;
-
- private int $counter = 0;
-
-
- /** @param iterable|\stdClass $iterable */
- public function __construct(iterable|\stdClass $iterable)
- {
- $iterable = $iterable instanceof \stdClass
- ? new \ArrayIterator((array) $iterable)
- : Nette\Utils\Iterables::toIterator($iterable);
- parent::__construct($iterable, 0);
- }
-
-
- /**
- * Is the current element the first one?
- */
- public function isFirst(?int $gridWidth = null): bool
- {
- return $this->counter === 1 || ($gridWidth && $this->counter !== 0 && (($this->counter - 1) % $gridWidth) === 0);
- }
-
-
- /**
- * Is the current element the last one?
- */
- public function isLast(?int $gridWidth = null): bool
- {
- return !$this->hasNext() || ($gridWidth && ($this->counter % $gridWidth) === 0);
- }
-
-
- public function isEmpty(): bool
- {
- return $this->counter === 0;
- }
-
-
- public function isOdd(): bool
- {
- return $this->counter % 2 === 1;
- }
-
-
- public function isEven(): bool
- {
- return $this->counter % 2 === 0;
- }
-
-
- public function getCounter(): int
- {
- return $this->counter;
- }
-
-
- public function count(): int
- {
- $inner = $this->getInnerIterator();
- if ($inner instanceof \Countable) {
- return $inner->count();
-
- } else {
- throw new Nette\NotSupportedException('Iterator is not countable.');
- }
- }
-
-
- /**
- * Forwards to the next element.
- */
- public function next(): void
- {
- parent::next();
- if (parent::valid()) {
- $this->counter++;
- }
- }
-
-
- /**
- * Rewinds the Iterator.
- */
- public function rewind(): void
- {
- parent::rewind();
- $this->counter = parent::valid() ? 1 : 0;
- }
-
-
- /** @return TKey */
- public function getNextKey(): mixed
- {
- return $this->getInnerIterator()->key();
- }
-
-
- /** @return TValue */
- public function getNextValue(): mixed
- {
- return $this->getInnerIterator()->current();
- }
-}
diff --git a/tools/.phpstan/vendor/nette/utils/src/Iterators/Mapper.php b/tools/.phpstan/vendor/nette/utils/src/Iterators/Mapper.php
deleted file mode 100644
index a9cfba0..0000000
--- a/tools/.phpstan/vendor/nette/utils/src/Iterators/Mapper.php
+++ /dev/null
@@ -1,30 +0,0 @@
-callback = $callback(...);
- }
-
-
- public function current(): mixed
- {
- return ($this->callback)(parent::current(), parent::key());
- }
-}
diff --git a/tools/.phpstan/vendor/nette/utils/src/SmartObject.php b/tools/.phpstan/vendor/nette/utils/src/SmartObject.php
deleted file mode 100644
index d9742c8..0000000
--- a/tools/.phpstan/vendor/nette/utils/src/SmartObject.php
+++ /dev/null
@@ -1,141 +0,0 @@
-$name ?? null;
- if (is_iterable($handlers)) {
- foreach ($handlers as $handler) {
- $handler(...$args);
- }
- } elseif ($handlers !== null) {
- throw new UnexpectedValueException("Property $class::$$name must be iterable or null, " . get_debug_type($handlers) . ' given.');
- }
-
- return null;
- }
-
- ObjectHelpers::strictCall($class, $name);
- }
-
-
- /**
- * @param mixed[] $args
- * @return never
- * @throws MemberAccessException
- */
- public static function __callStatic(string $name, array $args)
- {
- ObjectHelpers::strictStaticCall(static::class, $name);
- }
-
-
- /**
- * @return mixed
- * @throws MemberAccessException if the property is not defined.
- */
- public function &__get(string $name)
- {
- $class = static::class;
-
- if ($prop = ObjectHelpers::getMagicProperties($class)[$name] ?? null) { // property getter
- if (!($prop & 0b0001)) {
- throw new MemberAccessException("Cannot read a write-only property $class::\$$name.");
- }
-
- $m = ($prop & 0b0010 ? 'get' : 'is') . ucfirst($name);
- if ($prop & 0b10000) {
- $trace = debug_backtrace(0, 1)[0]; // suppose this method is called from __call()
- $loc = isset($trace['file'], $trace['line'])
- ? " in $trace[file] on line $trace[line]"
- : '';
- trigger_error("Property $class::\$$name is deprecated, use $class::$m() method$loc.", E_USER_DEPRECATED);
- }
-
- if ($prop & 0b0100) { // return by reference
- return $this->$m();
- } else {
- $val = $this->$m();
- return $val;
- }
- } else {
- ObjectHelpers::strictGet($class, $name);
- }
- }
-
-
- /**
- * @throws MemberAccessException if the property is not defined or is read-only
- */
- public function __set(string $name, mixed $value): void
- {
- $class = static::class;
-
- if (ObjectHelpers::hasProperty($class, $name)) { // unsetted property
- $this->$name = $value;
-
- } elseif ($prop = ObjectHelpers::getMagicProperties($class)[$name] ?? null) { // property setter
- if (!($prop & 0b1000)) {
- throw new MemberAccessException("Cannot write to a read-only property $class::\$$name.");
- }
-
- $m = 'set' . ucfirst($name);
- if ($prop & 0b10000) {
- $trace = debug_backtrace(0, 1)[0]; // suppose this method is called from __call()
- $loc = isset($trace['file'], $trace['line'])
- ? " in $trace[file] on line $trace[line]"
- : '';
- trigger_error("Property $class::\$$name is deprecated, use $class::$m() method$loc.", E_USER_DEPRECATED);
- }
-
- $this->$m($value);
-
- } else {
- ObjectHelpers::strictSet($class, $name);
- }
- }
-
-
- /**
- * @throws MemberAccessException
- */
- public function __unset(string $name): void
- {
- $class = static::class;
- if (!ObjectHelpers::hasProperty($class, $name)) {
- throw new MemberAccessException("Cannot unset the property $class::\$$name.");
- }
- }
-
-
- public function __isset(string $name): bool
- {
- return isset(ObjectHelpers::getMagicProperties(static::class)[$name]);
- }
-}
diff --git a/tools/.phpstan/vendor/nette/utils/src/StaticClass.php b/tools/.phpstan/vendor/nette/utils/src/StaticClass.php
deleted file mode 100644
index e88a74b..0000000
--- a/tools/.phpstan/vendor/nette/utils/src/StaticClass.php
+++ /dev/null
@@ -1,22 +0,0 @@
-
- * @implements \ArrayAccess
- */
-class ArrayHash extends \stdClass implements \ArrayAccess, \Countable, \IteratorAggregate
-{
- /**
- * Transforms array to ArrayHash.
- * @param array $array
- */
- public static function from(array $array, bool $recursive = true): static
- {
- $obj = new static;
- foreach ($array as $key => $value) {
- $obj->$key = $recursive && is_array($value)
- ? static::from($value)
- : $value;
- }
-
- return $obj;
- }
-
-
- /**
- * @return \Iterator
- */
- public function &getIterator(): \Iterator
- {
- foreach ((array) $this as $key => $foo) {
- yield $key => $this->$key;
- }
- }
-
-
- public function count(): int
- {
- return count((array) $this);
- }
-
-
- /**
- * Replaces or appends an item.
- * @param array-key $key
- * @param T $value
- */
- public function offsetSet($key, $value): void
- {
- if (!is_scalar($key)) { // prevents null
- throw new Nette\InvalidArgumentException(sprintf('Key must be either a string or an integer, %s given.', get_debug_type($key)));
- }
-
- $this->$key = $value;
- }
-
-
- /**
- * Returns an item.
- * @param array-key $key
- * @return T
- */
- public function offsetGet($key): mixed
- {
- return $this->$key;
- }
-
-
- /**
- * Determines whether an item exists.
- * @param array-key $key
- */
- public function offsetExists($key): bool
- {
- return isset($this->$key);
- }
-
-
- /**
- * Removes the element from this list.
- * @param array-key $key
- */
- public function offsetUnset($key): void
- {
- unset($this->$key);
- }
-}
diff --git a/tools/.phpstan/vendor/nette/utils/src/Utils/ArrayList.php b/tools/.phpstan/vendor/nette/utils/src/Utils/ArrayList.php
deleted file mode 100644
index 628cc45..0000000
--- a/tools/.phpstan/vendor/nette/utils/src/Utils/ArrayList.php
+++ /dev/null
@@ -1,130 +0,0 @@
-
- * @implements \ArrayAccess
- */
-class ArrayList implements \ArrayAccess, \Countable, \IteratorAggregate
-{
- /** @var list */
- private array $list = [];
-
-
- /**
- * Transforms array to ArrayList.
- * @param list $array
- */
- public static function from(array $array): static
- {
- if (!Arrays::isList($array)) {
- throw new Nette\InvalidArgumentException('Array is not valid list.');
- }
-
- $obj = new static;
- $obj->list = $array;
- return $obj;
- }
-
-
- /**
- * @return \Iterator
- */
- public function &getIterator(): \Iterator
- {
- foreach ($this->list as &$item) {
- yield $item;
- }
- }
-
-
- public function count(): int
- {
- return count($this->list);
- }
-
-
- /**
- * Replaces or appends an item.
- * @param ?int $index
- * @param T $value
- * @throws Nette\OutOfRangeException
- */
- public function offsetSet($index, $value): void
- {
- if ($index === null) {
- $this->list[] = $value;
-
- } elseif (!is_int($index) || $index < 0 || $index >= count($this->list)) {
- throw new Nette\OutOfRangeException('Offset invalid or out of range');
-
- } else {
- $this->list[$index] = $value;
- }
- }
-
-
- /**
- * Returns an item.
- * @param int $index
- * @return T
- * @throws Nette\OutOfRangeException
- */
- public function offsetGet($index): mixed
- {
- if (!is_int($index) || $index < 0 || $index >= count($this->list)) {
- throw new Nette\OutOfRangeException('Offset invalid or out of range');
- }
-
- return $this->list[$index];
- }
-
-
- /**
- * Determines whether an item exists.
- * @param int $index
- */
- public function offsetExists($index): bool
- {
- return is_int($index) && $index >= 0 && $index < count($this->list);
- }
-
-
- /**
- * Removes the element at the specified position in this list.
- * @param int $index
- * @throws Nette\OutOfRangeException
- */
- public function offsetUnset($index): void
- {
- if (!is_int($index) || $index < 0 || $index >= count($this->list)) {
- throw new Nette\OutOfRangeException('Offset invalid or out of range');
- }
-
- array_splice($this->list, $index, 1);
- }
-
-
- /**
- * Prepends an item.
- * @param T $value
- */
- public function prepend(mixed $value): void
- {
- $first = array_slice($this->list, 0, 1);
- $this->offsetSet(0, $value);
- array_splice($this->list, 1, 0, $first);
- }
-}
diff --git a/tools/.phpstan/vendor/nette/utils/src/Utils/Arrays.php b/tools/.phpstan/vendor/nette/utils/src/Utils/Arrays.php
deleted file mode 100644
index 3769433..0000000
--- a/tools/.phpstan/vendor/nette/utils/src/Utils/Arrays.php
+++ /dev/null
@@ -1,571 +0,0 @@
- $array
- * @param array-key|array-key[] $key
- * @param ?T $default
- * @return ?T
- * @throws Nette\InvalidArgumentException if item does not exist and default value is not provided
- */
- public static function get(array $array, string|int|array $key, mixed $default = null): mixed
- {
- foreach (is_array($key) ? $key : [$key] as $k) {
- if (is_array($array) && array_key_exists($k, $array)) {
- $array = $array[$k];
- } else {
- if (func_num_args() < 3) {
- throw new Nette\InvalidArgumentException("Missing item '$k'.");
- }
-
- return $default;
- }
- }
-
- return $array;
- }
-
-
- /**
- * Returns reference to array item. If the index does not exist, new one is created with value null.
- * @template T
- * @param array $array
- * @param array-key|array-key[] $key
- * @return ?T
- * @throws Nette\InvalidArgumentException if traversed item is not an array
- */
- public static function &getRef(array &$array, string|int|array $key): mixed
- {
- foreach (is_array($key) ? $key : [$key] as $k) {
- if (is_array($array) || $array === null) {
- $array = &$array[$k];
- } else {
- throw new Nette\InvalidArgumentException('Traversed item is not an array.');
- }
- }
-
- return $array;
- }
-
-
- /**
- * Recursively merges two arrays. Useful for merging tree structures. Behaves like the + operator:
- * key/value pairs from the second array are added to the first, with the first array's values taking
- * precedence on key collisions. Nested arrays are merged recursively instead of replaced.
- * @template T1
- * @template T2
- * @param array $array1
- * @param array $array2
- * @return array>
- */
- public static function mergeTree(array $array1, array $array2): array
- {
- $res = $array1 + $array2;
- foreach (array_intersect_key($array1, $array2) as $k => $v) {
- if (is_array($v) && is_array($array2[$k])) {
- $res[$k] = self::mergeTree($v, $array2[$k]);
- }
- }
-
- return $res;
- }
-
-
- /**
- * Returns zero-indexed position of given array key. Returns null if key is not found.
- * @param array $array
- */
- public static function getKeyOffset(array $array, string|int $key): ?int
- {
- return Helpers::falseToNull(array_search(self::toKey($key), array_keys($array), strict: true));
- }
-
-
- /**
- * @param array $array
- * @deprecated use getKeyOffset()
- */
- public static function searchKey(array $array, string|int $key): ?int
- {
- return self::getKeyOffset($array, $key);
- }
-
-
- /**
- * Tests an array for the presence of value.
- * @param array $array
- */
- public static function contains(array $array, mixed $value): bool
- {
- return in_array($value, $array, strict: true);
- }
-
-
- /**
- * Returns the first item (matching the specified predicate if given). If there is no such item, it returns result of invoking $else or null.
- * @template K of int|string
- * @template V
- * @template E
- * @param array $array
- * @param ?callable(V, K, array): bool $predicate
- * @param ?callable(): E $else
- * @return ($else is null ? ?V : V|E)
- */
- public static function first(array $array, ?callable $predicate = null, ?callable $else = null): mixed
- {
- $key = self::firstKey($array, $predicate);
- return $key === null
- ? ($else ? $else() : null)
- : $array[$key];
- }
-
-
- /**
- * Returns the last item (matching the specified predicate if given). If there is no such item, it returns result of invoking $else or null.
- * @template K of int|string
- * @template V
- * @template E
- * @param array $array
- * @param ?callable(V, K, array): bool $predicate
- * @param ?callable(): E $else
- * @return ($else is null ? ?V : V|E)
- */
- public static function last(array $array, ?callable $predicate = null, ?callable $else = null): mixed
- {
- $key = self::lastKey($array, $predicate);
- return $key === null
- ? ($else ? $else() : null)
- : $array[$key];
- }
-
-
- /**
- * Returns the key of first item (matching the specified predicate if given) or null if there is no such item.
- * @template K of int|string
- * @template V
- * @param array $array
- * @param ?callable(V, K, array): bool $predicate
- * @return ?K
- */
- public static function firstKey(array $array, ?callable $predicate = null): int|string|null
- {
- if (!$predicate) {
- return array_key_first($array);
- }
- foreach ($array as $k => $v) {
- if ($predicate($v, $k, $array)) {
- return $k;
- }
- }
- return null;
- }
-
-
- /**
- * Returns the key of last item (matching the specified predicate if given) or null if there is no such item.
- * @template K of int|string
- * @template V
- * @param array $array
- * @param ?callable(V, K, array): bool $predicate
- * @return ?K
- */
- public static function lastKey(array $array, ?callable $predicate = null): int|string|null
- {
- return $predicate
- ? self::firstKey(array_reverse($array, preserve_keys: true), $predicate)
- : array_key_last($array);
- }
-
-
- /**
- * Inserts the contents of the $inserted array into the $array immediately before the $key.
- * If $key is null (or does not exist), it is inserted at the beginning.
- * @param array $array
- * @param array $inserted
- */
- public static function insertBefore(array &$array, string|int|null $key, array $inserted): void
- {
- $offset = $key === null ? 0 : (int) self::getKeyOffset($array, $key);
- $array = array_slice($array, 0, $offset, preserve_keys: true)
- + $inserted
- + array_slice($array, $offset, count($array), preserve_keys: true);
- }
-
-
- /**
- * Inserts the contents of the $inserted array into the $array immediately after the $key.
- * If $key is null (or does not exist), it is inserted at the end.
- * @param array $array
- * @param array $inserted
- */
- public static function insertAfter(array &$array, string|int|null $key, array $inserted): void
- {
- if ($key === null || ($offset = self::getKeyOffset($array, $key)) === null) {
- $offset = count($array) - 1;
- }
-
- $array = array_slice($array, 0, $offset + 1, preserve_keys: true)
- + $inserted
- + array_slice($array, $offset + 1, count($array), preserve_keys: true);
- }
-
-
- /**
- * Renames key in array.
- * @param array $array
- */
- public static function renameKey(array &$array, string|int $oldKey, string|int $newKey): bool
- {
- $offset = self::getKeyOffset($array, $oldKey);
- if ($offset === null) {
- return false;
- }
-
- $val = &$array[$oldKey];
- $keys = array_keys($array);
- $keys[$offset] = $newKey;
- $array = array_combine($keys, $array);
- $array[$newKey] = &$val;
- return true;
- }
-
-
- /**
- * Returns only those array items, which matches a regular expression $pattern.
- * @param string[] $array
- * @return string[]
- */
- public static function grep(
- array $array,
- #[Language('RegExp')]
- string $pattern,
- bool|int $invert = false,
- ): array
- {
- $flags = $invert ? PREG_GREP_INVERT : 0;
- return Strings::pcre('preg_grep', [$pattern, $array, $flags]);
- }
-
-
- /**
- * Transforms multidimensional array to flat array.
- * @param array $array
- * @return array
- */
- public static function flatten(array $array, bool $preserveKeys = false): array
- {
- $res = [];
- $cb = $preserveKeys
- ? function ($v, $k) use (&$res): void { $res[$k] = $v; }
- : function ($v) use (&$res): void { $res[] = $v; };
- array_walk_recursive($array, $cb);
- return $res;
- }
-
-
- /**
- * Checks if the array is indexed in ascending order of numeric keys from zero, a.k.a list.
- * @return ($value is list ? true : false)
- */
- public static function isList(mixed $value): bool
- {
- return is_array($value) && array_is_list($value);
- }
-
-
- /**
- * Transforms a flat array of rows into an associative tree using a path expression like 'field|field[]field->field=field'.
- * @param array $array
- * @param string|list $path
- * @return array|\stdClass
- */
- public static function associate(array $array, string|array $path): array|\stdClass
- {
- $parts = is_array($path)
- ? $path
- : preg_split('#(\[\]|->|=|\|)#', $path, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
-
- if (!$parts || $parts === ['->'] || $parts[0] === '=' || $parts[0] === '|') {
- throw new Nette\InvalidArgumentException("Invalid path '" . (is_array($path) ? implode('', $path) : $path) . "'.");
- }
-
- $res = $parts[0] === '->' ? new \stdClass : [];
-
- foreach ($array as $rowOrig) {
- $row = (array) $rowOrig;
- $x = &$res;
-
- for ($i = 0; $i < count($parts); $i++) {
- $part = $parts[$i];
- if ($part === '[]') {
- $x = &$x[];
-
- } elseif ($part === '=') {
- if (isset($parts[++$i])) {
- $x = $row[$parts[$i]];
- $row = null;
- }
- break; // '=' is always the final operation
-
- } elseif ($part === '->') {
- if (isset($parts[++$i])) {
- if ($x === null) {
- $x = new \stdClass;
- }
-
- $x = &$x->{$row[$parts[$i]]};
- } else {
- $row = is_object($rowOrig) ? $rowOrig : (object) $row;
- }
- } elseif ($part !== '|') {
- $x = &$x[(string) $row[$part]];
- }
- }
-
- if ($x === null) {
- $x = $row;
- }
- }
-
- return $res;
- }
-
-
- /**
- * Converts array to associative: items with numeric keys are converted to keys, with $filling as their value.
- * @param array $array
- * @return array
- */
- public static function normalize(array $array, mixed $filling = null): array
- {
- $res = [];
- foreach ($array as $k => $v) {
- $res[is_int($k) ? $v : $k] = is_int($k) ? $filling : $v;
- }
-
- return $res;
- }
-
-
- /**
- * Returns and removes the value of an item from an array. If it does not exist, it throws an exception,
- * or returns $default, if provided.
- * @template T
- * @param array $array
- * @param ?T $default
- * @return ?T
- * @throws Nette\InvalidArgumentException if item does not exist and default value is not provided
- */
- public static function pick(array &$array, string|int $key, mixed $default = null): mixed
- {
- if (array_key_exists($key, $array)) {
- $value = $array[$key];
- unset($array[$key]);
- return $value;
-
- } elseif (func_num_args() < 3) {
- throw new Nette\InvalidArgumentException("Missing item '$key'.");
-
- } else {
- return $default;
- }
- }
-
-
- /**
- * Tests whether at least one element in the array passes the test implemented by the provided function.
- * @template K of int|string
- * @template V
- * @param array $array
- * @param callable(V, K, array): bool $predicate
- */
- public static function some(iterable $array, callable $predicate): bool
- {
- foreach ($array as $k => $v) {
- if ($predicate($v, $k, $array)) {
- return true;
- }
- }
-
- return false;
- }
-
-
- /**
- * Tests whether all elements in the array pass the test implemented by the provided function.
- * @template K of int|string
- * @template V
- * @param array $array
- * @param callable(V, K, array): bool $predicate
- */
- public static function every(iterable $array, callable $predicate): bool
- {
- foreach ($array as $k => $v) {
- if (!$predicate($v, $k, $array)) {
- return false;
- }
- }
-
- return true;
- }
-
-
- /**
- * Returns a new array containing all key-value pairs matching the given $predicate.
- * @template K of int|string
- * @template V
- * @param array $array
- * @param callable(V, K, array): bool $predicate
- * @return array
- */
- public static function filter(array $array, callable $predicate): array
- {
- $res = [];
- foreach ($array as $k => $v) {
- if ($predicate($v, $k, $array)) {
- $res[$k] = $v;
- }
- }
- return $res;
- }
-
-
- /**
- * Returns an array containing the original keys and results of applying the given transform function to each element.
- * @template K of int|string
- * @template V
- * @template R
- * @param array $array
- * @param callable(V, K, array): R $transformer
- * @return array
- */
- public static function map(iterable $array, callable $transformer): array
- {
- $res = [];
- foreach ($array as $k => $v) {
- $res[$k] = $transformer($v, $k, $array);
- }
-
- return $res;
- }
-
-
- /**
- * Returns an array containing new keys and values generated by applying the given transform function to each element.
- * If the function returns null, the element is skipped.
- * @template K of int|string
- * @template V
- * @template ResK of int|string
- * @template ResV
- * @param array $array
- * @param callable(V, K, array): ?array{ResK, ResV} $transformer
- * @return array
- */
- public static function mapWithKeys(array $array, callable $transformer): array
- {
- $res = [];
- foreach ($array as $k => $v) {
- $pair = $transformer($v, $k, $array);
- if ($pair) {
- $res[$pair[0]] = $pair[1];
- }
- }
-
- return $res;
- }
-
-
- /**
- * Invokes all callbacks and returns array of results.
- * @param iterable $callbacks
- * @return array
- */
- public static function invoke(iterable $callbacks, mixed ...$args): array
- {
- $res = [];
- foreach ($callbacks as $k => $cb) {
- $res[$k] = $cb(...$args);
- }
-
- return $res;
- }
-
-
- /**
- * Invokes method on every object in an array and returns array of results.
- * @param iterable