Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
timvandijck authored and github-actions[bot] committed Dec 8, 2023
1 parent 19234bc commit 2516228
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public static function useImageDriver(ImageDriverEnum|string $imageDriver): Imag
return $image;
}

public function new(int $width, int $height, string $backgroundColor = null): ImageDriver
public function new(int $width, int $height, ?string $backgroundColor = null): ImageDriver
{
$this->imageDriver->new($width, $height, $backgroundColor);

Expand Down Expand Up @@ -168,7 +168,7 @@ public function getSize(): Size
return $this->imageDriver->getSize();
}

public function fit(Fit $fit, int $desiredWidth = null, int $desiredHeight = null): ImageDriver
public function fit(Fit $fit, ?int $desiredWidth = null, ?int $desiredHeight = null): ImageDriver
{
$this->imageDriver->fit($fit, $desiredWidth, $desiredHeight);

Expand All @@ -180,7 +180,7 @@ public function pickColor(int $x, int $y, ColorFormat $colorFormat): mixed
return $this->imageDriver->pickColor($x, $y, $colorFormat);
}

public function resizeCanvas(int $width = null, int $height = null, AlignPosition $position = null, bool $relative = false, string $backgroundColor = '#000000'): ImageDriver
public function resizeCanvas(?int $width = null, ?int $height = null, ?AlignPosition $position = null, bool $relative = false, string $backgroundColor = '#000000'): ImageDriver
{
$this->imageDriver->resizeCanvas($width, $height, $position, $relative, $backgroundColor);

Expand Down Expand Up @@ -227,7 +227,7 @@ public function overlay(ImageDriver $bottomImage, ImageDriver $topImage, int $x,
return $this;
}

public function orientation(Orientation $orientation = null): ImageDriver
public function orientation(?Orientation $orientation = null): ImageDriver
{
$this->imageDriver->orientation($orientation);

Expand Down Expand Up @@ -255,7 +255,7 @@ public function pixelate(int $pixelate = 50): ImageDriver
return $this;
}

public function insert(ImageDriver|string $otherImage, AlignPosition $position = AlignPosition::Center, int $x = 0, int $y = 0,): ImageDriver
public function insert(ImageDriver|string $otherImage, AlignPosition $position = AlignPosition::Center, int $x = 0, int $y = 0): ImageDriver
{
$this->imageDriver->insert($otherImage, $position, $x, $y);

Expand Down
1 change: 0 additions & 1 deletion tests/ImageTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php

use Spatie\Image\Drivers\ImageDriver;
use Spatie\Image\Drivers\Imagick\ImagickDriver;
use Spatie\Image\Exceptions\CouldNotLoadImage;
use Spatie\Image\Exceptions\InvalidImageDriver;
use Spatie\Image\Image;
Expand Down

0 comments on commit 2516228

Please sign in to comment.