Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/old/vendor/webonyx/graphql-php/src/Error/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/old/vendor/webonyx/graphql-php/src/Error/CoercionError.php
<?php declare(strict_types=1);

namespace GraphQL\Error;

use GraphQL\Utils\Utils;

/**
 * @phpstan-type InputPath list<string|int>
 */
class CoercionError extends Error
{
    /** @var InputPath|null */
    public ?array $inputPath;

    /** @var mixed whatever invalid value was passed */
    public $invalidValue;

    /**
     * @param InputPath|null $inputPath
     * @param mixed $invalidValue whatever invalid value was passed
     *
     * @return static
     */
    public static function make(
        string $message,
        ?array $inputPath,
        $invalidValue,
        \Throwable $previous = null
    ): self {
        $instance = new static($message, null, null, [], null, $previous);
        $instance->inputPath = $inputPath;
        $instance->invalidValue = $invalidValue;

        return $instance;
    }

    public function printInputPath(): ?string
    {
        if ($this->inputPath === null) {
            return null;
        }

        $path = '';
        foreach ($this->inputPath as $segment) {
            $path .= is_int($segment)
                ? "[{$segment}]"
                : ".{$segment}";
        }

        return $path;
    }

    public function printInvalidValue(): string
    {
        return Utils::printSafeJson($this->invalidValue);
    }
}

Spamworldpro Mini