Aggiornato Composer

This commit is contained in:
Paolo A
2024-05-17 12:24:19 +00:00
parent 4ac62108b5
commit ec201d75b2
2238 changed files with 38684 additions and 59785 deletions

View File

@@ -1,6 +1,6 @@
<?php declare(strict_types=1);
/*
* This file is part of the Recursion Context package.
* This file is part of sebastian/recursion-context.
*
* (c) Sebastian Bergmann <sebastian@phpunit.de>
*
@@ -11,6 +11,7 @@ namespace SebastianBergmann\RecursionContext;
use const PHP_INT_MAX;
use const PHP_INT_MIN;
use function array_key_exists;
use function array_pop;
use function array_slice;
use function count;
@@ -128,19 +129,23 @@ final class Context
$key = count($this->arrays);
$this->arrays[] = &$array;
if (!isset($array[PHP_INT_MAX]) && !isset($array[PHP_INT_MAX - 1])) {
if (!array_key_exists(PHP_INT_MAX, $array) && !array_key_exists(PHP_INT_MAX - 1, $array)) {
$array[] = $key;
$array[] = $this->objects;
} else { /* cover the improbable case too */
/* Note that array_slice (used in containsArray) will return the
* last two values added *not necessarily* the highest integer
* keys in the array, so the order of these writes to $array
* is important, but the actual keys used is not. */
do {
$key = random_int(PHP_INT_MIN, PHP_INT_MAX);
} while (isset($array[$key]));
} while (array_key_exists($key, $array));
$array[$key] = $key;
do {
$key = random_int(PHP_INT_MIN, PHP_INT_MAX);
} while (isset($array[$key]));
} while (array_key_exists($key, $array));
$array[$key] = $this->objects;
}

View File

@@ -1,6 +1,6 @@
<?php declare(strict_types=1);
/*
* This file is part of the Recursion Context package.
* This file is part of sebastian/recursion-context.
*
* (c) Sebastian Bergmann <sebastian@phpunit.de>
*

View File

@@ -1,6 +1,6 @@
<?php declare(strict_types=1);
/*
* This file is part of the Recursion Context package.
* This file is part of sebastian/recursion-context.
*
* (c) Sebastian Bergmann <sebastian@phpunit.de>
*