Aggiornato Composer

This commit is contained in:
Paolo A
2024-05-17 12:24:19 +00:00
parent 4ac62108b5
commit ec201d75b2
2238 changed files with 38684 additions and 59785 deletions

View File

@@ -7,12 +7,12 @@ use PhpParser\NodeAbstract;
/**
* Represents a non-namespaced name. Namespaced names are represented using Name nodes.
*/
class Identifier extends NodeAbstract
{
class Identifier extends NodeAbstract {
/** @var string Identifier as string */
public $name;
public string $name;
private static $specialClassNames = [
/** @var array<string, bool> */
private static array $specialClassNames = [
'self' => true,
'parent' => true,
'static' => true,
@@ -21,15 +21,15 @@ class Identifier extends NodeAbstract
/**
* Constructs an identifier node.
*
* @param string $name Identifier as string
* @param array $attributes Additional attributes
* @param string $name Identifier as string
* @param array<string, mixed> $attributes Additional attributes
*/
public function __construct(string $name, array $attributes = []) {
$this->attributes = $attributes;
$this->name = $name;
}
public function getSubNodeNames() : array {
public function getSubNodeNames(): array {
return ['name'];
}
@@ -38,7 +38,7 @@ class Identifier extends NodeAbstract
*
* @return string Identifier as string.
*/
public function toString() : string {
public function toString(): string {
return $this->name;
}
@@ -47,7 +47,7 @@ class Identifier extends NodeAbstract
*
* @return string Lowercased identifier as string
*/
public function toLowerString() : string {
public function toLowerString(): string {
return strtolower($this->name);
}
@@ -56,7 +56,7 @@ class Identifier extends NodeAbstract
*
* @return bool Whether identifier is a special class name
*/
public function isSpecialClassName() : bool {
public function isSpecialClassName(): bool {
return isset(self::$specialClassNames[strtolower($this->name)]);
}
@@ -65,11 +65,11 @@ class Identifier extends NodeAbstract
*
* @return string Identifier as string
*/
public function __toString() : string {
public function __toString(): string {
return $this->name;
}
public function getType() : string {
public function getType(): string {
return 'Identifier';
}
}