Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Phpstan to level 4 #4494

Merged
merged 1 commit into from
Dec 2, 2024
Merged

Bump Phpstan to level 4 #4494

merged 1 commit into from
Dec 2, 2024

Conversation

VincentLanglet
Copy link
Contributor

No description provided.

src/Error/Error.php Show resolved Hide resolved
src/Extension/CoreExtension.php Show resolved Hide resolved
@@ -362,7 +365,7 @@ private function filterBodyNodes(Node $node, bool $nested = false): ?Node
// we need to discard the wrapping "Node" for the "body" node
$nested = $nested || !$node instanceof Nodes;
foreach ($node as $k => $n) {
if (null !== $n && null === $this->filterBodyNodes($n, $nested)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

node is @implements \IteratorAggregate<int|string, Node> so $n is never null.

@VincentLanglet VincentLanglet marked this pull request as ready for review December 2, 2024 15:56
src/Extension/CoreExtension.php Show resolved Hide resolved
} else {
$name = json_encode($this->name);
}
$name = \sprintf('"%s"', $this->name);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As $name is not used anywhere else, maybe we can merge this line with the next?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, Done in 8a2f2c0

src/Error/Error.php Show resolved Hide resolved
@VincentLanglet VincentLanglet requested a review from fabpot December 2, 2024 19:01
@fabpot
Copy link
Contributor

fabpot commented Dec 2, 2024

Thank you @VincentLanglet.

@fabpot fabpot merged commit 6e88a90 into twigphp:4.x Dec 2, 2024
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants