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/cartforge.co/vendor/laminas/laminas-validator/src/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/cartforge.co/vendor/laminas/laminas-validator/src/IsArray.php
<?php

declare(strict_types=1);

namespace Laminas\Validator;

use function get_debug_type;
use function is_array;

final class IsArray extends AbstractValidator
{
    public const NOT_ARRAY = 'NotArray';

    /** @var array<non-empty-string, non-empty-string> */
    protected $messageTemplates = [
        self::NOT_ARRAY => 'Expected an array value but %type% provided',
    ];

    /** @var array<string, string> */
    protected $messageVariables = [
        'type' => 'type',
    ];

    protected ?string $type = null;

    /** @var array<never, never> */
    protected $options = [];

    public function isValid(mixed $value): bool
    {
        if (is_array($value)) {
            return true;
        }

        $this->type = get_debug_type($value);
        $this->error(self::NOT_ARRAY);

        return false;
    }
}

Spamworldpro Mini