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

Extracted common base for TextBlock and TextLine field types #406

Merged
merged 6 commits into from
Aug 27, 2024

Conversation

alongosz
Copy link
Member

@alongosz alongosz commented Jul 17, 2024

🎫 Issue Related to IBX-8138

Related PRs:

Description:

This PR addresses one of the many code redundancy issues found by SonarCloud while working on #385.

class \Ibexa\Core\FieldType\TextBlock\Value extends \Ibexa\Core\FieldType\TextLine\Value { }

☝️ because of that we can have a common base type-hinting just on TextValue contravariant base type.

  • Extracted common base for TextBlock and TextLine field types
  • [Tests] Aligned tests with TextBlock and TextLine changes
  • [Tests] Reduced complexity of TextBlock and TextLine test classes
  • [Tests] Aligned TextLine and TextBlock integration tests with the changes
  • [PHPStan] Aligned baseline with the changes

For QA:

Regression build should be enough (ibexa/commerce#1006).

@alongosz alongosz force-pushed the ibx-8138/fieldtype-text-line-block-dry-fix branch from 84b5e6b to fa2d717 Compare August 7, 2024 10:48
@alongosz alongosz force-pushed the ibx-8138/fieldtype-text-line-block-dry-fix branch from fa2d717 to 2b4d468 Compare August 26, 2024 12:23
@alongosz alongosz requested a review from Steveb-p August 26, 2024 12:23
Copy link

sonarcloud bot commented Aug 26, 2024

@alongosz alongosz merged commit 13a0cf1 into main Aug 27, 2024
14 checks passed
@alongosz alongosz deleted the ibx-8138/fieldtype-text-line-block-dry-fix branch August 27, 2024 09:27
barw4 pushed a commit that referenced this pull request Oct 17, 2024
For more details see #406

Key changes:

* Extracted common base for TextBlock and TextLine field types

* [Tests] Aligned tests with TextBlock and TextLine changes

* [Tests] Reduced complexity of TextBlock and TextLine test classes

* [PHPStan] Aligned baseline with the changes

---------

Co-authored-by: Paweł Niedzielski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants