Skip to content

Fix return type for getBlock on BlockPropertyWrapper method #7832

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

Conversation

alexander-schranz
Copy link
Member

@alexander-schranz alexander-schranz commented Mar 5, 2025

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

What's in this PR?

Fix return type for getBlock on BlockPropertyWrapper method.

Why?

PHPStan says in the ImageMapContentTypeTest that $blockProperty->getBlock() === $property is always false but that is a false positive.

getBlock is marked as return a BlockPropertyInterface but that seems not be true as constructor says it can be a PropertyInterface.

@alexander-schranz alexander-schranz added the DX Affecting the end developer label Mar 5, 2025
@alexander-schranz alexander-schranz changed the base branch from 2.6 to 2.5 March 5, 2025 14:49
@alexander-schranz alexander-schranz force-pushed the enhancement/phpstan-issue-block-property-return-type branch from 38f99d6 to 4495bf5 Compare March 5, 2025 14:50
@alexander-schranz alexander-schranz marked this pull request as ready for review March 5, 2025 15:01
@alexander-schranz alexander-schranz merged commit 617e49c into sulu:2.5 Mar 5, 2025
8 of 9 checks passed
@alexander-schranz alexander-schranz deleted the enhancement/phpstan-issue-block-property-return-type branch March 5, 2025 15:01
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