Skip to content

Commit

Permalink
Revert back to using \Bolt\Filesystem\Handler\Image\Type for BC
Browse files Browse the repository at this point in the history
  • Loading branch information
GwendolenLynch committed Feb 13, 2017
1 parent 89194b1 commit 715c86b
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/ImageResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ImageResource
{
/** @var resource */
protected $resource;
/** @var Image\TypeInterface */
/** @var Image\Type */
protected $type;
/** @var Image\Info */
protected $info;
Expand All @@ -33,11 +33,11 @@ class ImageResource
*
* Either type or info need to be provided.
*
* @param resource $resource A GD resource
* @param Image\TypeInterface $type Image type
* @param Image\Info $info Image info
* @param resource $resource A GD resource
* @param Image\Type $type Image type
* @param Image\Info $info Image info
*/
public function __construct($resource, Image\TypeInterface $type = null, Image\Info $info = null)
public function __construct($resource, Image\Type $type = null, Image\Info $info = null)
{
if (!is_resource($resource) || !get_resource_type($resource) === 'gd') {
throw new InvalidArgumentException('Given resource must be a GD resource');
Expand Down Expand Up @@ -106,12 +106,12 @@ public static function createFromString($data)
/**
* Creates a new image given the width and height.
*
* @param Dimensions $dimensions Image dimensions
* @param Image\TypeInterface $type Type of image
* @param Dimensions $dimensions Image dimensions
* @param Image\Type $type Type of image
*
* @return ImageResource
*/
public static function createNew(Dimensions $dimensions, Image\TypeInterface $type)
public static function createNew(Dimensions $dimensions, Image\Type $type)
{
$resource = imagecreatetruecolor($dimensions->getWidth(), $dimensions->getHeight());
if ($resource === false) {
Expand Down Expand Up @@ -148,7 +148,7 @@ public function getDimensions()
/**
* Returns the image type.
*
* @return Image\TypeInterface
* @return Image\Type
*/
public function getType()
{
Expand Down

0 comments on commit 715c86b

Please sign in to comment.