Skip to content

Commit

Permalink
SetImageResource receives the output from imagecreatetruecolor which …
Browse files Browse the repository at this point in the history
…can also be false or GdImage
  • Loading branch information
jaapdh committed Jun 27, 2024
1 parent 6738a06 commit f21a90e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PhpPresentation/Shape/Drawing/Gd.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@ public function getImageResource()
/**
* Set image resource.
*
* @param resource $value
* @param resource|false|\GdImage|null $value
*
* @return $this
*/
public function setImageResource($value = null)

Check failure on line 90 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 90 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 90 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 90 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

0 comments on commit f21a90e

Please sign in to comment.