Skip to content

Commit bdfec7c

Browse files
committed
Update build-cs
1 parent 2c7df21 commit bdfec7c

File tree

89 files changed

+1463
-1751
lines changed

Some content is hidden

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

89 files changed

+1463
-1751
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
with:
5757
repository: "phpstan/build-cs"
5858
path: "build-cs"
59-
ref: "1.x"
59+
ref: "2.x"
6060

6161
- name: "Install PHP"
6262
uses: "shivammathur/setup-php@v2"

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ lint:
1616
.PHONY: cs-install
1717
cs-install:
1818
git clone https://github.com/phpstan/build-cs.git || true
19-
git -C build-cs fetch origin && git -C build-cs reset --hard origin/1.x
19+
git -C build-cs fetch origin && git -C build-cs reset --hard origin/2.x
2020
composer install --working-dir build-cs
2121

2222
.PHONY: cs

src/Ast/ConstExpr/ConstExprArrayItemNode.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@ class ConstExprArrayItemNode implements ConstExprNode
1010

1111
use NodeAttributes;
1212

13-
/** @var ConstExprNode|null */
14-
public $key;
13+
public ?ConstExprNode $key = null;
1514

16-
/** @var ConstExprNode */
17-
public $value;
15+
public ConstExprNode $value;
1816

1917
public function __construct(?ConstExprNode $key, ConstExprNode $value)
2018
{

src/Ast/ConstExpr/ConstExprArrayNode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class ConstExprArrayNode implements ConstExprNode
1111
use NodeAttributes;
1212

1313
/** @var ConstExprArrayItemNode[] */
14-
public $items;
14+
public array $items;
1515

1616
/**
1717
* @param ConstExprArrayItemNode[] $items

src/Ast/ConstExpr/ConstExprFloatNode.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ class ConstExprFloatNode implements ConstExprNode
99

1010
use NodeAttributes;
1111

12-
/** @var string */
13-
public $value;
12+
public string $value;
1413

1514
public function __construct(string $value)
1615
{

src/Ast/ConstExpr/ConstExprIntegerNode.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ class ConstExprIntegerNode implements ConstExprNode
99

1010
use NodeAttributes;
1111

12-
/** @var string */
13-
public $value;
12+
public string $value;
1413

1514
public function __construct(string $value)
1615
{

src/Ast/ConstExpr/ConstExprStringNode.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ class ConstExprStringNode implements ConstExprNode
2121

2222
use NodeAttributes;
2323

24-
/** @var string */
25-
public $value;
24+
public string $value;
2625

2726
/** @var self::SINGLE_QUOTED|self::DOUBLE_QUOTED */
2827
public $quoteType;

src/Ast/ConstExpr/ConstFetchNode.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@ class ConstFetchNode implements ConstExprNode
1010
use NodeAttributes;
1111

1212
/** @var string class name for class constants or empty string for non-class constants */
13-
public $className;
13+
public string $className;
1414

15-
/** @var string */
16-
public $name;
15+
public string $name;
1716

1817
public function __construct(string $className, string $name)
1918
{

src/Ast/ConstExpr/DoctrineConstExprStringNode.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ class DoctrineConstExprStringNode extends ConstExprStringNode
1313

1414
use NodeAttributes;
1515

16-
/** @var string */
17-
public $value;
16+
public string $value;
1817

1918
public function __construct(string $value)
2019
{

src/Ast/NodeAttributes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ trait NodeAttributes
88
{
99

1010
/** @var array<string, mixed> */
11-
private $attributes = [];
11+
private array $attributes = [];
1212

1313
/**
1414
* @param mixed $value

0 commit comments

Comments
 (0)