Skip to content

Commit

Permalink
Use property promotion in ImageWrapper
Browse files Browse the repository at this point in the history
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
  • Loading branch information
kamil-tekiela committed Feb 12, 2023
1 parent ed87488 commit 5163263
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions libraries/classes/Image/ImageWrapper.php
Expand Up @@ -4,6 +4,8 @@

namespace PhpMyAdmin\Image;

use GdImage;

use function extension_loaded;
use function function_exists;
use function imagearc;
Expand All @@ -23,21 +25,11 @@

final class ImageWrapper
{
/** @var resource */
private $image;

/**
* @param resource $image
*/
private function __construct($image)
private function __construct(private GdImage $image)
{
$this->image = $image;
}

/**
* @return resource
*/
public function getImage()
public function getImage(): GdImage
{
return $this->image;
}
Expand Down

0 comments on commit 5163263

Please sign in to comment.