Skip to content

Commit

Permalink
Fix type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
olivervogel committed May 2, 2024
1 parent e56700f commit dca2a1e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/Drivers/Gd/Modifiers/FillModifier.php
Expand Up @@ -4,8 +4,8 @@

namespace Intervention\Image\Drivers\Gd\Modifiers;

use Intervention\Image\Drivers\Gd\Frame;
use Intervention\Image\Exceptions\RuntimeException;
use Intervention\Image\Interfaces\FrameInterface;
use Intervention\Image\Interfaces\ImageInterface;
use Intervention\Image\Interfaces\SpecializedInterface;
use Intervention\Image\Modifiers\FillModifier as GenericFillModifier;
Expand Down Expand Up @@ -37,7 +37,7 @@ private function color(ImageInterface $image): int
);
}

private function floodFillWithColor(Frame $frame, int $color): void
private function floodFillWithColor(FrameInterface $frame, int $color): void
{
imagefill(
$frame->native(),
Expand All @@ -47,7 +47,7 @@ private function floodFillWithColor(Frame $frame, int $color): void
);
}

private function fillAllWithColor(Frame $frame, int $color): void
private function fillAllWithColor(FrameInterface $frame, int $color): void
{
imagealphablending($frame->native(), true);
imagefilledrectangle(
Expand Down
6 changes: 3 additions & 3 deletions src/Drivers/Imagick/Modifiers/FillModifier.php
Expand Up @@ -7,7 +7,7 @@
use Imagick;
use ImagickDraw;
use ImagickPixel;
use Intervention\Image\Drivers\Imagick\Frame;
use Intervention\Image\Interfaces\FrameInterface;
use Intervention\Image\Interfaces\ImageInterface;
use Intervention\Image\Interfaces\SpecializedInterface;
use Intervention\Image\Modifiers\FillModifier as ModifiersFillModifier;
Expand All @@ -32,7 +32,7 @@ public function apply(ImageInterface $image): ImageInterface
return $image;
}

private function floodFillWithColor(Frame $frame, ImagickPixel $pixel): void
private function floodFillWithColor(FrameInterface $frame, ImagickPixel $pixel): void
{
$target = $frame->native()->getImagePixelColor(
$this->position->x(),
Expand All @@ -50,7 +50,7 @@ private function floodFillWithColor(Frame $frame, ImagickPixel $pixel): void
);
}

private function fillAllWithColor(Frame $frame, ImagickPixel $pixel): void
private function fillAllWithColor(FrameInterface $frame, ImagickPixel $pixel): void
{
$draw = new ImagickDraw();
$draw->setFillColor($pixel);
Expand Down
4 changes: 2 additions & 2 deletions src/Drivers/Imagick/Modifiers/PixelateModifier.php
Expand Up @@ -4,7 +4,7 @@

namespace Intervention\Image\Drivers\Imagick\Modifiers;

use Intervention\Image\Drivers\Imagick\Frame;
use Intervention\Image\Interfaces\FrameInterface;
use Intervention\Image\Interfaces\ImageInterface;
use Intervention\Image\Interfaces\SpecializedInterface;
use Intervention\Image\Modifiers\PixelateModifier as GenericPixelateModifier;
Expand All @@ -20,7 +20,7 @@ public function apply(ImageInterface $image): ImageInterface
return $image;
}

protected function pixelateFrame(Frame $frame): void
protected function pixelateFrame(FrameInterface $frame): void
{
$size = $frame->size();

Expand Down
6 changes: 3 additions & 3 deletions src/Drivers/Imagick/Modifiers/TextModifier.php
Expand Up @@ -8,12 +8,12 @@
use ImagickDrawException;
use ImagickException;
use Intervention\Image\Drivers\Imagick\FontProcessor;
use Intervention\Image\Drivers\Imagick\Frame;
use Intervention\Image\Exceptions\ColorException;
use Intervention\Image\Exceptions\FontException;
use Intervention\Image\Exceptions\RuntimeException;
use Intervention\Image\Geometry\Point;
use Intervention\Image\Interfaces\FontInterface;
use Intervention\Image\Interfaces\FrameInterface;
use Intervention\Image\Interfaces\ImageInterface;
use Intervention\Image\Interfaces\SpecializedInterface;
use Intervention\Image\Modifiers\TextModifier as GenericTextModifier;
Expand Down Expand Up @@ -109,14 +109,14 @@ private function imagickDrawStroke(ImageInterface $image, FontInterface $font):
* Maybe draw given line of text on frame instance depending on given
* ImageDraw instance. Optionally move line position by given offset.
*
* @param Frame $frame
* @param FrameInterface $frame
* @param Line $textline
* @param null|ImagickDraw $draw
* @param Point $offset
* @return void
*/
private function maybeDrawTextline(
Frame $frame,
FrameInterface $frame,
Line $textline,
?ImagickDraw $draw = null,
Point $offset = new Point(),
Expand Down

0 comments on commit dca2a1e

Please sign in to comment.