Skip to content

Fix PHPStan issues in SuluNodeHelperTest #7858

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

Merged

Conversation

alexander-schranz
Copy link
Member

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets fixes #
Related issues/PRs #
License MIT
Documentation PR sulu/sulu-docs#

What's in this PR?

Fix PHPStan issues in SuluNodeHelperTest.

Why?

New detected errors with strange code.

@alexander-schranz alexander-schranz added the DX Affecting the end developer label Mar 25, 2025
@@ -95,7 +95,7 @@ public function locate(string $query, ?GeolocatorOptions $options = null): Geolo
'setCountry' => 'country_code',
] as $method => $key) {
if (isset($result['address'][$key])) {
$location->$method($result['address'][$key]);
$location->$method($result['address'][$key]); // @phpstan-ignore-line
Copy link
Member Author

Choose a reason for hiding this comment

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

ignoring currently not worth the struggle here with phpstan

@@ -41,7 +41,7 @@ public function testToArray(): void
];

foreach ($data as $propName => $value) {
$this->location->{'set' . \ucfirst($propName)}($value);
$this->location->{'set' . \ucfirst($propName)}($value); // @phpstan-ignore-line
Copy link
Member Author

Choose a reason for hiding this comment

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

ignoring currently not worth the struggle here with phpstan

@alexander-schranz alexander-schranz merged commit b605ff3 into sulu:2.6 Mar 25, 2025
8 of 9 checks passed
@alexander-schranz alexander-schranz deleted the enhancement/phpstan-update-2 branch March 25, 2025 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DX Affecting the end developer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant