Skip to content

Refactor shadow style handling in HTML writer#887

Open
phili67 wants to merge 1 commit intoPHPOffice:masterfrom
phili67:patch-2
Open

Refactor shadow style handling in HTML writer#887
phili67 wants to merge 1 commit intoPHPOffice:masterfrom
phili67:patch-2

Conversation

@phili67
Copy link
Copy Markdown

@phili67 phili67 commented Feb 12, 2026

Description

There is a bug in the case the is_null($style) and !is_null($shape->getShadow()) too

Fixes # (issue)

Checklist:

  • My CI is 🟢
  • I have covered by unit tests my new code (check build/coverage for coverage report)
  • I have updated the documentation to describe the changes
  • I have updated the changelog

Copy link
Copy Markdown
Member

@Progi1984 Progi1984 left a comment

Choose a reason for hiding this comment

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

Hi,

Could you add an unit test?

Thanks

protected function getStyleShadow(Shadow $style): array
{
if (!$style->isVisible()) {
if (is_null($style) or !is_null($style) and !$style->isVisible()) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
if (is_null($style) or !is_null($style) and !$style->isVisible()) {
if (!$style->isVisible()) {

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