summaryrefslogtreecommitdiff
path: root/vendor/sebastian/recursion-context
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sebastian/recursion-context')
-rw-r--r--vendor/sebastian/recursion-context/.psalm/baseline.xml8
-rw-r--r--vendor/sebastian/recursion-context/.psalm/config.xml16
-rw-r--r--vendor/sebastian/recursion-context/ChangeLog.md33
-rw-r--r--vendor/sebastian/recursion-context/LICENSE33
-rw-r--r--vendor/sebastian/recursion-context/README.md18
-rw-r--r--vendor/sebastian/recursion-context/composer.json44
-rw-r--r--vendor/sebastian/recursion-context/src/Context.php186
-rw-r--r--vendor/sebastian/recursion-context/src/Exception.php16
-rw-r--r--vendor/sebastian/recursion-context/src/InvalidArgumentException.php14
9 files changed, 0 insertions, 368 deletions
diff --git a/vendor/sebastian/recursion-context/.psalm/baseline.xml b/vendor/sebastian/recursion-context/.psalm/baseline.xml
deleted file mode 100644
index b946db1a5..000000000
--- a/vendor/sebastian/recursion-context/.psalm/baseline.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<files psalm-version="4.0.1@b1e2e30026936ef8d5bf6a354d1c3959b6231f44">
- <file src="src/Context.php">
- <RedundantConditionGivenDocblockType occurrences="1">
- <code>is_array($array)</code>
- </RedundantConditionGivenDocblockType>
- </file>
-</files>
diff --git a/vendor/sebastian/recursion-context/.psalm/config.xml b/vendor/sebastian/recursion-context/.psalm/config.xml
deleted file mode 100644
index 2a4b16f22..000000000
--- a/vendor/sebastian/recursion-context/.psalm/config.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0"?>
-<psalm
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="https://getpsalm.org/schema/config"
- xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
- resolveFromConfigFile="false"
- totallyTyped="false"
- errorBaseline=".psalm/baseline.xml"
->
- <projectFiles>
- <directory name="src" />
- <ignoreFiles>
- <directory name="vendor" />
- </ignoreFiles>
- </projectFiles>
-</psalm>
diff --git a/vendor/sebastian/recursion-context/ChangeLog.md b/vendor/sebastian/recursion-context/ChangeLog.md
deleted file mode 100644
index 2fbacc2c3..000000000
--- a/vendor/sebastian/recursion-context/ChangeLog.md
+++ /dev/null
@@ -1,33 +0,0 @@
-# ChangeLog
-
-All notable changes are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles.
-
-## [4.0.4] - 2020-10-26
-
-### Fixed
-
-* `SebastianBergmann\RecursionContext\Exception` now correctly extends `\Throwable`
-
-## [4.0.3] - 2020-09-28
-
-### Changed
-
-* [#21](https://github.com/sebastianbergmann/recursion-context/pull/21): Add type annotations for in/out parameters
-* Changed PHP version constraint in `composer.json` from `^7.3 || ^8.0` to `>=7.3`
-
-## [4.0.2] - 2020-06-26
-
-### Added
-
-* This component is now supported on PHP 8
-
-## [4.0.1] - 2020-06-15
-
-### Changed
-
-* Tests etc. are now ignored for archive exports
-
-[4.0.4]: https://github.com/sebastianbergmann/recursion-context/compare/4.0.3...4.0.4
-[4.0.3]: https://github.com/sebastianbergmann/recursion-context/compare/4.0.2...4.0.3
-[4.0.2]: https://github.com/sebastianbergmann/recursion-context/compare/4.0.1...4.0.2
-[4.0.1]: https://github.com/sebastianbergmann/recursion-context/compare/4.0.0...4.0.1
diff --git a/vendor/sebastian/recursion-context/LICENSE b/vendor/sebastian/recursion-context/LICENSE
deleted file mode 100644
index 0faffbbb2..000000000
--- a/vendor/sebastian/recursion-context/LICENSE
+++ /dev/null
@@ -1,33 +0,0 @@
-Recursion Context
-
-Copyright (c) 2002-2020, Sebastian Bergmann <sebastian@phpunit.de>.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- * Neither the name of Sebastian Bergmann nor the names of his
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/sebastian/recursion-context/README.md b/vendor/sebastian/recursion-context/README.md
deleted file mode 100644
index 8e4d2a084..000000000
--- a/vendor/sebastian/recursion-context/README.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# sebastian/recursion-context
-
-[![CI Status](https://github.com/sebastianbergmann/recursion-context/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/recursion-context/actions)
-[![Type Coverage](https://shepherd.dev/github/sebastianbergmann/recursion-context/coverage.svg)](https://shepherd.dev/github/sebastianbergmann/recursion-context)
-
-## Installation
-
-You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/):
-
-```
-composer require sebastian/recursion-context
-```
-
-If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency:
-
-```
-composer require --dev sebastian/recursion-context
-```
diff --git a/vendor/sebastian/recursion-context/composer.json b/vendor/sebastian/recursion-context/composer.json
deleted file mode 100644
index 8a5408232..000000000
--- a/vendor/sebastian/recursion-context/composer.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
- "name": "sebastian/recursion-context",
- "description": "Provides functionality to recursively process PHP variables",
- "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
- "license": "BSD-3-Clause",
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- },
- {
- "name": "Jeff Welch",
- "email": "whatthejeff@gmail.com"
- },
- {
- "name": "Adam Harvey",
- "email": "aharvey@php.net"
- }
- ],
- "prefer-stable": true,
- "config": {
- "platform": {
- "php": "7.3.0"
- },
- "optimize-autoloader": true,
- "sort-packages": true
- },
- "require": {
- "php": ">=7.3"
- },
- "require-dev": {
- "phpunit/phpunit": "^9.3"
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "extra": {
- "branch-alias": {
- "dev-master": "4.0-dev"
- }
- }
-}
diff --git a/vendor/sebastian/recursion-context/src/Context.php b/vendor/sebastian/recursion-context/src/Context.php
deleted file mode 100644
index 87fe7b04f..000000000
--- a/vendor/sebastian/recursion-context/src/Context.php
+++ /dev/null
@@ -1,186 +0,0 @@
-<?php declare(strict_types=1);
-/*
- * This file is part of the Recursion Context package.
- *
- * (c) Sebastian Bergmann <sebastian@phpunit.de>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-namespace SebastianBergmann\RecursionContext;
-
-use const PHP_INT_MAX;
-use const PHP_INT_MIN;
-use function array_pop;
-use function array_slice;
-use function count;
-use function is_array;
-use function is_object;
-use function random_int;
-use function spl_object_hash;
-use SplObjectStorage;
-
-/**
- * A context containing previously processed arrays and objects
- * when recursively processing a value.
- */
-final class Context
-{
- /**
- * @var array[]
- */
- private $arrays;
-
- /**
- * @var SplObjectStorage
- */
- private $objects;
-
- /**
- * Initialises the context.
- */
- public function __construct()
- {
- $this->arrays = [];
- $this->objects = new SplObjectStorage;
- }
-
- /**
- * @codeCoverageIgnore
- */
- public function __destruct()
- {
- foreach ($this->arrays as &$array) {
- if (is_array($array)) {
- array_pop($array);
- array_pop($array);
- }
- }
- }
-
- /**
- * Adds a value to the context.
- *
- * @param array|object $value the value to add
- *
- * @throws InvalidArgumentException Thrown if $value is not an array or object
- *
- * @return bool|int|string the ID of the stored value, either as a string or integer
- *
- * @psalm-template T
- * @psalm-param T $value
- * @param-out T $value
- */
- public function add(&$value)
- {
- if (is_array($value)) {
- return $this->addArray($value);
- }
-
- if (is_object($value)) {
- return $this->addObject($value);
- }
-
- throw new InvalidArgumentException(
- 'Only arrays and objects are supported'
- );
- }
-
- /**
- * Checks if the given value exists within the context.
- *
- * @param array|object $value the value to check
- *
- * @throws InvalidArgumentException Thrown if $value is not an array or object
- *
- * @return false|int|string the string or integer ID of the stored value if it has already been seen, or false if the value is not stored
- *
- * @psalm-template T
- * @psalm-param T $value
- * @param-out T $value
- */
- public function contains(&$value)
- {
- if (is_array($value)) {
- return $this->containsArray($value);
- }
-
- if (is_object($value)) {
- return $this->containsObject($value);
- }
-
- throw new InvalidArgumentException(
- 'Only arrays and objects are supported'
- );
- }
-
- /**
- * @return bool|int
- */
- private function addArray(array &$array)
- {
- $key = $this->containsArray($array);
-
- if ($key !== false) {
- return $key;
- }
-
- $key = count($this->arrays);
- $this->arrays[] = &$array;
-
- if (!isset($array[PHP_INT_MAX]) && !isset($array[PHP_INT_MAX - 1])) {
- $array[] = $key;
- $array[] = $this->objects;
- } else { /* cover the improbable case too */
- do {
- $key = random_int(PHP_INT_MIN, PHP_INT_MAX);
- } while (isset($array[$key]));
-
- $array[$key] = $key;
-
- do {
- $key = random_int(PHP_INT_MIN, PHP_INT_MAX);
- } while (isset($array[$key]));
-
- $array[$key] = $this->objects;
- }
-
- return $key;
- }
-
- /**
- * @param object $object
- */
- private function addObject($object): string
- {
- if (!$this->objects->contains($object)) {
- $this->objects->attach($object);
- }
-
- return spl_object_hash($object);
- }
-
- /**
- * @return false|int
- */
- private function containsArray(array &$array)
- {
- $end = array_slice($array, -2);
-
- return isset($end[1]) && $end[1] === $this->objects ? $end[0] : false;
- }
-
- /**
- * @param object $value
- *
- * @return false|string
- */
- private function containsObject($value)
- {
- if ($this->objects->contains($value)) {
- return spl_object_hash($value);
- }
-
- return false;
- }
-}
diff --git a/vendor/sebastian/recursion-context/src/Exception.php b/vendor/sebastian/recursion-context/src/Exception.php
deleted file mode 100644
index e3a9c017d..000000000
--- a/vendor/sebastian/recursion-context/src/Exception.php
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php declare(strict_types=1);
-/*
- * This file is part of the Recursion Context package.
- *
- * (c) Sebastian Bergmann <sebastian@phpunit.de>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-namespace SebastianBergmann\RecursionContext;
-
-use Throwable;
-
-interface Exception extends Throwable
-{
-}
diff --git a/vendor/sebastian/recursion-context/src/InvalidArgumentException.php b/vendor/sebastian/recursion-context/src/InvalidArgumentException.php
deleted file mode 100644
index 627c8bdf4..000000000
--- a/vendor/sebastian/recursion-context/src/InvalidArgumentException.php
+++ /dev/null
@@ -1,14 +0,0 @@
-<?php declare(strict_types=1);
-/*
- * This file is part of the Recursion Context package.
- *
- * (c) Sebastian Bergmann <sebastian@phpunit.de>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-namespace SebastianBergmann\RecursionContext;
-
-final class InvalidArgumentException extends \InvalidArgumentException implements Exception
-{
-}