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

SetImageResource receives unsupported output #807

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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/Shape/Drawing/Gd.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

namespace PhpOffice\PhpPresentation\Shape\Drawing;

use GdImage;

class Gd extends AbstractDrawingAdapter
{
// Rendering functions
Expand Down Expand Up @@ -83,15 +85,15 @@
/**
* Set image resource.
*
* @param resource $value
* @param resource|false|GdImage|null $value
*
* @return $this
*/
public function setImageResource($value = null)

Check failure on line 92 in src/PhpPresentation/Shape/Drawing/Gd.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis (7.4)

Parameter $value of method PhpOffice\PhpPresentation\Shape\Drawing\Gd::setImageResource() has invalid type GdImage.

Check failure on line 92 in src/PhpPresentation/Shape/Drawing/Gd.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis (7.3)

Parameter $value of method PhpOffice\PhpPresentation\Shape\Drawing\Gd::setImageResource() has invalid type GdImage.

Check failure on line 92 in src/PhpPresentation/Shape/Drawing/Gd.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis (7.2)

Parameter $value of method PhpOffice\PhpPresentation\Shape\Drawing\Gd::setImageResource() has invalid type GdImage.

Check failure on line 92 in src/PhpPresentation/Shape/Drawing/Gd.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis (7.1)

Parameter $value of method PhpOffice\PhpPresentation\Shape\Drawing\Gd::setImageResource() has invalid type GdImage.
{
$this->imageResource = $value;

if (null !== $this->imageResource) {
if (null !== $this->imageResource && false !== $value) {
// Get width/height
$this->width = imagesx($this->imageResource);
$this->height = imagesy($this->imageResource);
Expand Down
Loading