Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/PhpPresentation/Writer/HTML.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,9 @@
$styles[] = 'height: ' . $shape->getHeight() . 'px';
$styles[] = 'top: ' . $shape->getOffsetY() . 'px';
$styles[] = 'left: ' . $shape->getOffsetX() . 'px';
$styles = array_merge($styles, $this->getStyleShadow($shape->getShadow()));
if (!is_null($shape->getShadow())) {
$styles = array_merge($styles, $this->getStyleShadow($shape->getShadow()));
}

$this->bodySlides .= '<img src="' . $imageData . '" style="' . implode(';', $styles) . '" alt="' . $shape->getDescription() . '" title="' . $shape->getDescription() . '" />';
}
Expand Down Expand Up @@ -365,7 +367,7 @@
*/
protected function getStyleShadow(Shadow $style): array
{
if (!$style->isVisible()) {
if (is_null($style) or !is_null($style) and !$style->isVisible()) {

Check failure on line 370 in src/PhpPresentation/Writer/HTML.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis (8.4)

Call to function is_null() with PhpOffice\PhpPresentation\Style\Shadow will always evaluate to false.

Check failure on line 370 in src/PhpPresentation/Writer/HTML.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis (8.4)

Call to function is_null() with PhpOffice\PhpPresentation\Style\Shadow will always evaluate to false.

Check failure on line 370 in src/PhpPresentation/Writer/HTML.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis (7.1)

Call to function is_null() with PhpOffice\PhpPresentation\Style\Shadow will always evaluate to false.

Check failure on line 370 in src/PhpPresentation/Writer/HTML.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis (7.1)

Call to function is_null() with PhpOffice\PhpPresentation\Style\Shadow will always evaluate to false.

Check failure on line 370 in src/PhpPresentation/Writer/HTML.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis (8.2)

Call to function is_null() with PhpOffice\PhpPresentation\Style\Shadow will always evaluate to false.

Check failure on line 370 in src/PhpPresentation/Writer/HTML.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis (8.2)

Call to function is_null() with PhpOffice\PhpPresentation\Style\Shadow will always evaluate to false.

Check failure on line 370 in src/PhpPresentation/Writer/HTML.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis (7.4)

Call to function is_null() with PhpOffice\PhpPresentation\Style\Shadow will always evaluate to false.

Check failure on line 370 in src/PhpPresentation/Writer/HTML.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis (7.4)

Call to function is_null() with PhpOffice\PhpPresentation\Style\Shadow will always evaluate to false.

Check failure on line 370 in src/PhpPresentation/Writer/HTML.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis (8.3)

Call to function is_null() with PhpOffice\PhpPresentation\Style\Shadow will always evaluate to false.

Check failure on line 370 in src/PhpPresentation/Writer/HTML.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis (8.3)

Call to function is_null() with PhpOffice\PhpPresentation\Style\Shadow will always evaluate to false.

Check failure on line 370 in src/PhpPresentation/Writer/HTML.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis (8.0)

Call to function is_null() with PhpOffice\PhpPresentation\Style\Shadow will always evaluate to false.

Check failure on line 370 in src/PhpPresentation/Writer/HTML.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis (8.0)

Call to function is_null() with PhpOffice\PhpPresentation\Style\Shadow will always evaluate to false.

Check failure on line 370 in src/PhpPresentation/Writer/HTML.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis (8.1)

Call to function is_null() with PhpOffice\PhpPresentation\Style\Shadow will always evaluate to false.

Check failure on line 370 in src/PhpPresentation/Writer/HTML.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis (8.1)

Call to function is_null() with PhpOffice\PhpPresentation\Style\Shadow will always evaluate to false.
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()) {

return [];
}
$boxShadow = '';
Expand Down
Loading