🚀 Hostinger Optimized
🖥️ Server: Apache
💻 System: Linux webm015.cluster127.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
👤 User: stakrfrcol (69043)
🐘 PHP: 8.3.31
🚫 Disabled: _dyuweyrj4,_dyuweyrj4r,dl

💻 Terminal

📁 /home/stakrfrcol/agency
$

📄 LiteralArgument.php

📁 Path: ./wp-content/plugins/wp-rocket/inc/Dependencies/League/Container/Argument/LiteralArgument.php
📊 Size: 1.2 KB
🔒 Perm: 0644
📝 MIME: text/x-php
<?php

declare(strict_types=1);

namespace WP_Rocket\Dependencies\League\Container\Argument;

use InvalidArgumentException;

class LiteralArgument implements LiteralArgumentInterface
{
    public const TYPE_ARRAY    = 'array';
    public const TYPE_BOOL     = 'boolean';
    public const TYPE_BOOLEAN  = 'boolean';
    public const TYPE_CALLABLE = 'callable';
    public const TYPE_DOUBLE   = 'double';
    public const TYPE_FLOAT    = 'double';
    public const TYPE_INT      = 'integer';
    public const TYPE_INTEGER  = 'integer';
    public const TYPE_OBJECT   = 'object';
    public const TYPE_STRING   = 'string';

    /**
     * @var mixed
     */
    protected $value;

    public function __construct($value, string $type = null)
    {
        if (
            null === $type
            || ($type === self::TYPE_CALLABLE && is_callable($value))
            || ($type === self::TYPE_OBJECT && is_object($value))
            || gettype($value) === $type
        ) {
            $this->value = $value;
        } else {
            throw new InvalidArgumentException('Incorrect type for value.');
        }
    }

    /**
     * {@inheritdoc}
     */
    public function getValue()
    {
        return $this->value;
    }
}
← Back📥 Raw✏️ Edit🔒 Chmod
✨ File Manager Magic ✨