mirror of
https://gh.wpcy.net/https://github.com/djav1985/v-wordpress-plugin-updater.git
synced 2026-04-28 08:02:16 +08:00
modified: composer.lock modified: mu-plugin/v-sys-plugin-updater-mu.php modified: mu-plugin/v-sys-plugin-updater.php modified: mu-plugin/v-sys-theme-updater-mu.php modified: mu-plugin/v-sys-theme-updater.php modified: tests/ApiKeyHelperTest.php modified: update-api/app/Controllers/ApiController.php modified: update-api/app/Controllers/HomeController.php deleted: update-api/app/Controllers/KeyController.php modified: update-api/app/Core/Router.php modified: update-api/app/Models/HostsModel.php modified: update-api/config.php modified: update-api/public/install.php deleted: update-api/storage/test.sqlite
43 lines
1.2 KiB
PHP
43 lines
1.2 KiB
PHP
<?php declare(strict_types=1);
|
|
|
|
namespace PhpParser\Node;
|
|
|
|
use PhpParser\NodeAbstract;
|
|
|
|
class ArrayItem extends NodeAbstract {
|
|
/** @var null|Expr Key */
|
|
public ?Expr $key;
|
|
/** @var Expr Value */
|
|
public Expr $value;
|
|
/** @var bool Whether to assign by reference */
|
|
public bool $byRef;
|
|
/** @var bool Whether to unpack the argument */
|
|
public bool $unpack;
|
|
|
|
/**
|
|
* Constructs an array item node.
|
|
*
|
|
* @param Expr $value Value
|
|
* @param null|Expr $key Key
|
|
* @param bool $byRef Whether to assign by reference
|
|
* @param array<string, mixed> $attributes Additional attributes
|
|
*/
|
|
public function __construct(Expr $value, ?Expr $key = null, bool $byRef = false, array $attributes = [], bool $unpack = false) {
|
|
$this->attributes = $attributes;
|
|
$this->key = $key;
|
|
$this->value = $value;
|
|
$this->byRef = $byRef;
|
|
$this->unpack = $unpack;
|
|
}
|
|
|
|
public function getSubNodeNames(): array {
|
|
return ['key', 'value', 'byRef', 'unpack'];
|
|
}
|
|
|
|
public function getType(): string {
|
|
return 'ArrayItem';
|
|
}
|
|
}
|
|
|
|
// @deprecated compatibility alias
|
|
class_alias(ArrayItem::class, Expr\ArrayItem::class);
|