Fix e2e tests

This commit is contained in:
Daniil Gentili 2022-11-10 17:10:28 +01:00
parent b17b0f59d5
commit 3dd05968a1
4 changed files with 5 additions and 4 deletions

View File

@ -11,7 +11,7 @@ use Psl\Filesystem;
*/
function current_exec(): string
{
$executable = (string) Filesystem\canonicalize((string) $_SERVER['SCRIPT_NAME']);
$executable = (string) Filesystem\canonicalize($_SERVER['SCRIPT_NAME'] ?? '');
// @codeCoverageIgnoreStart
if (Filesystem\is_symbolic_link($executable)) {
/** @psalm-suppress MissingThrowsDocblock */

View File

@ -92,6 +92,7 @@ final class Context
$internal_context = hash_copy($this->internalContext);
// @codeCoverageIgnoreStart
/** @psalm-suppress ImpureFunctionCall */
if (!hash_update($internal_context, $data)) {
throw new Exception\RuntimeException('Unable to pump data into the active hashing context.');
}

View File

@ -15,7 +15,7 @@ use Psl\Vec;
*
* @param iterable<Tk, Tv> $iterable
*
* @return Iterator<int, array{0: Tk, 1: Tv}>
* @return Iterator<int, strict-array{0: Tk, 1: Tv}>
*
* @deprecated use `Vec\enumerate` instead.
* @see Vec\enumerate()

View File

@ -14,9 +14,9 @@ use function password_get_info;
* When passed in a valid hash created by an algorithm supported by `Psl\Password\hash()`,
* this function will return an array of information about that hash.
*
* @return array{
* @return strict-array{
* algorithm: string,
* options: array{cost: int}|array{memory_cost: int, time_cost: int, threads: int}
* options: strict-array{cost: int}|strict-array{memory_cost: int, time_cost: int, threads: int}
* }
*
* @pure