mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-11-19 23:02:40 +09:00
Update to laravel 7
This commit is contained in:
@@ -15,10 +15,12 @@ class ClassMethod extends Node\Stmt implements FunctionLike
|
||||
public $name;
|
||||
/** @var Node\Param[] Parameters */
|
||||
public $params;
|
||||
/** @var null|Node\Identifier|Node\Name|Node\NullableType Return type */
|
||||
/** @var null|Node\Identifier|Node\Name|Node\ComplexType Return type */
|
||||
public $returnType;
|
||||
/** @var Node\Stmt[]|null Statements */
|
||||
public $stmts;
|
||||
/** @var Node\AttributeGroup[] PHP attribute groups */
|
||||
public $attrGroups;
|
||||
|
||||
private static $magicNames = [
|
||||
'__construct' => true,
|
||||
@@ -48,6 +50,7 @@ class ClassMethod extends Node\Stmt implements FunctionLike
|
||||
* 'params' => array() : Parameters
|
||||
* 'returnType' => null : Return type
|
||||
* 'stmts' => array() : Statements
|
||||
* 'attrGroups' => array() : PHP attribute groups
|
||||
* @param array $attributes Additional attributes
|
||||
*/
|
||||
public function __construct($name, array $subNodes = [], array $attributes = []) {
|
||||
@@ -59,10 +62,11 @@ class ClassMethod extends Node\Stmt implements FunctionLike
|
||||
$returnType = $subNodes['returnType'] ?? null;
|
||||
$this->returnType = \is_string($returnType) ? new Node\Identifier($returnType) : $returnType;
|
||||
$this->stmts = array_key_exists('stmts', $subNodes) ? $subNodes['stmts'] : [];
|
||||
$this->attrGroups = $subNodes['attrGroups'] ?? [];
|
||||
}
|
||||
|
||||
public function getSubNodeNames() : array {
|
||||
return ['flags', 'byRef', 'name', 'params', 'returnType', 'stmts'];
|
||||
return ['attrGroups', 'flags', 'byRef', 'name', 'params', 'returnType', 'stmts'];
|
||||
}
|
||||
|
||||
public function returnsByRef() : bool {
|
||||
@@ -81,6 +85,10 @@ class ClassMethod extends Node\Stmt implements FunctionLike
|
||||
return $this->stmts;
|
||||
}
|
||||
|
||||
public function getAttrGroups() : array {
|
||||
return $this->attrGroups;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the method is explicitly or implicitly public.
|
||||
*
|
||||
@@ -120,7 +128,7 @@ class ClassMethod extends Node\Stmt implements FunctionLike
|
||||
|
||||
/**
|
||||
* Whether the method is final.
|
||||
*
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isFinal() : bool {
|
||||
@@ -144,7 +152,7 @@ class ClassMethod extends Node\Stmt implements FunctionLike
|
||||
public function isMagic() : bool {
|
||||
return isset(self::$magicNames[$this->name->toLowerString()]);
|
||||
}
|
||||
|
||||
|
||||
public function getType() : string {
|
||||
return 'Stmt_ClassMethod';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user