Skip to content

Commit 529d436

Browse files
committed
cs
1 parent 501995f commit 529d436

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+122
-86
lines changed

src/Ast/AbstractNode.php renamed to src/Ast/BaseNode.php

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22

33
namespace PHPStan\PhpDocParser\Ast;
44

5-
abstract class AbstractNode implements Node
5+
abstract class BaseNode implements Node
66
{
77

8-
/**
9-
* @var array<string, mixed>
10-
*/
11-
protected $attributes = [];
8+
/** @var array<string, mixed> */
9+
private $attributes = [];
1210

11+
/**
12+
* @param mixed $value
13+
*/
1314
public function setAttribute(string $key, $value): void
1415
{
1516
$this->attributes[$key] = $value;
@@ -20,6 +21,10 @@ public function hasAttribute(string $key): bool
2021
return array_key_exists($key, $this->attributes);
2122
}
2223

24+
/**
25+
* @param mixed|null $default
26+
* @return mixed|null
27+
*/
2328
public function getAttribute(string $key, $default = null)
2429
{
2530
if ($this->hasAttribute($key)) {

src/Ast/ConstExpr/ConstExprArrayItemNode.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
namespace PHPStan\PhpDocParser\Ast\ConstExpr;
44

5-
use PHPStan\PhpDocParser\Ast\AbstractNode;
5+
use PHPStan\PhpDocParser\Ast\BaseNode;
66

7-
class ConstExprArrayItemNode extends AbstractNode implements ConstExprNode
7+
class ConstExprArrayItemNode extends BaseNode implements ConstExprNode
88
{
99

1010
/** @var ConstExprNode|null */

src/Ast/ConstExpr/ConstExprArrayNode.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
namespace PHPStan\PhpDocParser\Ast\ConstExpr;
44

5-
use PHPStan\PhpDocParser\Ast\AbstractNode;
5+
use PHPStan\PhpDocParser\Ast\BaseNode;
66

7-
class ConstExprArrayNode extends AbstractNode implements ConstExprNode
7+
class ConstExprArrayNode extends BaseNode implements ConstExprNode
88
{
99

1010
/** @var ConstExprArrayItemNode[] */

src/Ast/ConstExpr/ConstExprFalseNode.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
namespace PHPStan\PhpDocParser\Ast\ConstExpr;
44

5-
use PHPStan\PhpDocParser\Ast\AbstractNode;
5+
use PHPStan\PhpDocParser\Ast\BaseNode;
66

7-
class ConstExprFalseNode extends AbstractNode implements ConstExprNode
7+
class ConstExprFalseNode extends BaseNode implements ConstExprNode
88
{
99

1010
public function __toString(): string

src/Ast/ConstExpr/ConstExprFloatNode.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
namespace PHPStan\PhpDocParser\Ast\ConstExpr;
44

5-
use PHPStan\PhpDocParser\Ast\AbstractNode;
5+
use PHPStan\PhpDocParser\Ast\BaseNode;
66

7-
class ConstExprFloatNode extends AbstractNode implements ConstExprNode
7+
class ConstExprFloatNode extends BaseNode implements ConstExprNode
88
{
99

1010
/** @var string */

src/Ast/ConstExpr/ConstExprIntegerNode.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
namespace PHPStan\PhpDocParser\Ast\ConstExpr;
44

5-
use PHPStan\PhpDocParser\Ast\AbstractNode;
5+
use PHPStan\PhpDocParser\Ast\BaseNode;
66

7-
class ConstExprIntegerNode extends AbstractNode implements ConstExprNode
7+
class ConstExprIntegerNode extends BaseNode implements ConstExprNode
88
{
99

1010
/** @var string */

src/Ast/ConstExpr/ConstExprNullNode.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
namespace PHPStan\PhpDocParser\Ast\ConstExpr;
44

5-
use PHPStan\PhpDocParser\Ast\AbstractNode;
5+
use PHPStan\PhpDocParser\Ast\BaseNode;
66

7-
class ConstExprNullNode extends AbstractNode implements ConstExprNode
7+
class ConstExprNullNode extends BaseNode implements ConstExprNode
88
{
99

1010
public function __toString(): string

src/Ast/ConstExpr/ConstExprStringNode.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
namespace PHPStan\PhpDocParser\Ast\ConstExpr;
44

5-
use PHPStan\PhpDocParser\Ast\AbstractNode;
5+
use PHPStan\PhpDocParser\Ast\BaseNode;
66

7-
class ConstExprStringNode extends AbstractNode implements ConstExprNode
7+
class ConstExprStringNode extends BaseNode implements ConstExprNode
88
{
99

1010
/** @var string */

src/Ast/ConstExpr/ConstExprTrueNode.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
namespace PHPStan\PhpDocParser\Ast\ConstExpr;
44

5-
use PHPStan\PhpDocParser\Ast\AbstractNode;
5+
use PHPStan\PhpDocParser\Ast\BaseNode;
66

7-
class ConstExprTrueNode extends AbstractNode implements ConstExprNode
7+
class ConstExprTrueNode extends BaseNode implements ConstExprNode
88
{
99

1010
public function __toString(): string

src/Ast/ConstExpr/ConstFetchNode.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
namespace PHPStan\PhpDocParser\Ast\ConstExpr;
44

5-
use PHPStan\PhpDocParser\Ast\AbstractNode;
5+
use PHPStan\PhpDocParser\Ast\BaseNode;
66

7-
class ConstFetchNode extends AbstractNode implements ConstExprNode
7+
class ConstFetchNode extends BaseNode implements ConstExprNode
88
{
99

1010
/** @var string class name for class constants or empty string for non-class constants */

0 commit comments

Comments
 (0)