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

@@ -2,28 +2,29 @@
namespace PhpParser;
interface Node
{
interface Node {
/**
* Gets the type of the node.
*
* @return string Type of the node
*/
public function getType() : string;
public function getType(): string;
/**
* Gets the names of the sub nodes.
*
* @return array Names of sub nodes
* @return string[] Names of sub nodes
*/
public function getSubNodeNames() : array;
public function getSubNodeNames(): array;
/**
* Gets line the node started in (alias of getStartLine).
*
* @return int Start line (or -1 if not available)
*
* @deprecated Use getStartLine() instead
*/
public function getLine() : int;
public function getLine(): int;
/**
* Gets line the node started in.
@@ -32,7 +33,7 @@ interface Node
*
* @return int Start line (or -1 if not available)
*/
public function getStartLine() : int;
public function getStartLine(): int;
/**
* Gets the line the node ended in.
@@ -41,7 +42,7 @@ interface Node
*
* @return int End line (or -1 if not available)
*/
public function getEndLine() : int;
public function getEndLine(): int;
/**
* Gets the token offset of the first token that is part of this node.
@@ -52,7 +53,7 @@ interface Node
*
* @return int Token start position (or -1 if not available)
*/
public function getStartTokenPos() : int;
public function getStartTokenPos(): int;
/**
* Gets the token offset of the last token that is part of this node.
@@ -63,7 +64,7 @@ interface Node
*
* @return int Token end position (or -1 if not available)
*/
public function getEndTokenPos() : int;
public function getEndTokenPos(): int;
/**
* Gets the file offset of the first character that is part of this node.
@@ -72,7 +73,7 @@ interface Node
*
* @return int File start position (or -1 if not available)
*/
public function getStartFilePos() : int;
public function getStartFilePos(): int;
/**
* Gets the file offset of the last character that is part of this node.
@@ -81,7 +82,7 @@ interface Node
*
* @return int File end position (or -1 if not available)
*/
public function getEndFilePos() : int;
public function getEndFilePos(): int;
/**
* Gets all comments directly preceding this node.
@@ -90,14 +91,14 @@ interface Node
*
* @return Comment[]
*/
public function getComments() : array;
public function getComments(): array;
/**
* Gets the doc comment of the node.
*
* @return null|Comment\Doc Doc comment object or null
*/
public function getDocComment();
public function getDocComment(): ?Comment\Doc;
/**
* Sets the doc comment of the node.
@@ -106,30 +107,24 @@ interface Node
*
* @param Comment\Doc $docComment Doc comment to set
*/
public function setDocComment(Comment\Doc $docComment);
public function setDocComment(Comment\Doc $docComment): void;
/**
* Sets an attribute on a node.
*
* @param string $key
* @param mixed $value
* @param mixed $value
*/
public function setAttribute(string $key, $value);
public function setAttribute(string $key, $value): void;
/**
* Returns whether an attribute exists.
*
* @param string $key
*
* @return bool
*/
public function hasAttribute(string $key) : bool;
public function hasAttribute(string $key): bool;
/**
* Returns the value of an attribute.
*
* @param string $key
* @param mixed $default
* @param mixed $default
*
* @return mixed
*/
@@ -138,14 +133,14 @@ interface Node
/**
* Returns all the attributes of this node.
*
* @return array
* @return array<string, mixed>
*/
public function getAttributes() : array;
public function getAttributes(): array;
/**
* Replaces all the attributes of this node.
*
* @param array $attributes
* @param array<string, mixed> $attributes
*/
public function setAttributes(array $attributes);
public function setAttributes(array $attributes): void;
}