/opt/cpanel/ea-wappspector/vendor/rector/rector/vendor/nette/utils/src/Utils
NameSizeModeActions
ArrayHash.php22290644editdlrm
ArrayList.php31500644editdlrm
Arrays.php167780644editdlrm
Callback.php42850644editdlrm
DateTime.php33430644editdlrm
exceptions.php7840644editdlrm
FileInfo.php14780644editdlrm
FileSystem.php105470644editdlrm
Finder.php165400644editdlrm
Floats.php24130644editdlrm
Helpers.php34120644editdlrm
Html.php224180644editdlrm
Image.php284440644editdlrm
ImageColor.php20750644editdlrm
ImageType.php4150644editdlrm
Iterables.php72240644editdlrm
Json.php25610644editdlrm
ObjectHelpers.php80910644editdlrm
Paginator.php50950644editdlrm
Random.php14130644editdlrm
Reflection.php107460644editdlrm
ReflectionMethod.php9680644editdlrm
Strings.php264690644editdlrm
Type.php76340644editdlrm
Validators.php125200644editdlrm
Edit: /opt/cpanel/ea-wappspector/vendor/rector/rector/vendor/nette/utils/src/Utils/ArrayList.php (3150B)
* @implements \ArrayAccess */ class ArrayList implements \ArrayAccess, \Countable, \IteratorAggregate { use Nette\SmartObject; /** * @var mixed[] */ private $list = []; /** * Transforms array to ArrayList. * @param list $array * @return static */ public static function from(array $array) { if (!Arrays::isList($array)) { throw new Nette\InvalidArgumentException('Array is not valid list.'); } $obj = new static(); $obj->list = $array; return $obj; } /** * Returns an iterator over all items. * @return \Iterator */ public function &getIterator() : \Iterator { foreach ($this->list as &$item) { (yield $item); } } /** * Returns items count. */ public function count() : int { return \count($this->list); } /** * Replaces or appends a item. * @param int|null $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 a item. * @param int $index * @return T * @throws Nette\OutOfRangeException */ #[\ReturnTypeWillChange] public function offsetGet($index) { 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 a 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 a item. * @param T $value */ public function prepend($value) : void { $first = \array_slice($this->list, 0, 1); $this->offsetSet(0, $value); \array_splice($this->list, 1, 0, $first); } }