1
0
mirror of https://github.com/Intervention/image.git synced 2025-09-01 18:02:45 +02:00

Add code improvements

This commit is contained in:
Oliver Vogel
2024-03-10 12:25:07 +01:00
parent 88c24d178e
commit 992b866562
9 changed files with 2 additions and 12 deletions

View File

@@ -6,5 +6,4 @@ namespace Intervention\Image\Colors\Cmyk\Channels;
class Key extends Cyan class Key extends Cyan
{ {
//
} }

View File

@@ -6,5 +6,4 @@ namespace Intervention\Image\Colors\Cmyk\Channels;
class Magenta extends Cyan class Magenta extends Cyan
{ {
//
} }

View File

@@ -6,5 +6,4 @@ namespace Intervention\Image\Colors\Cmyk\Channels;
class Yellow extends Cyan class Yellow extends Cyan
{ {
//
} }

View File

@@ -32,7 +32,6 @@ class Frame implements FrameInterface
protected int $offset_left = 0, protected int $offset_left = 0,
protected int $offset_top = 0 protected int $offset_top = 0
) { ) {
//
} }
/** /**

View File

@@ -17,7 +17,6 @@ class ModifierStack implements ModifierInterface
*/ */
public function __construct(protected array $modifiers) public function __construct(protected array $modifiers)
{ {
//
} }
/** /**

View File

@@ -24,14 +24,12 @@ class CoverModifier extends SpecializableModifier
public function getCropSize(ImageInterface $image): SizeInterface public function getCropSize(ImageInterface $image): SizeInterface
{ {
$imagesize = $image->size(); $imagesize = $image->size();
$crop = new Rectangle($this->width, $this->height); $crop = new Rectangle($this->width, $this->height);
$crop = $crop->contain(
return $crop->contain(
$imagesize->width(), $imagesize->width(),
$imagesize->height() $imagesize->height()
)->alignPivotTo($imagesize, $this->position); )->alignPivotTo($imagesize, $this->position);
return $crop;
} }
/** /**

View File

@@ -8,6 +8,5 @@ class GammaModifier extends SpecializableModifier
{ {
public function __construct(public float $gamma) public function __construct(public float $gamma)
{ {
//
} }
} }

View File

@@ -13,7 +13,6 @@ class RemoveAnimationModifier extends SpecializableModifier
{ {
public function __construct(public int|string $position = 0) public function __construct(public int|string $position = 0)
{ {
//
} }
/** /**

View File

@@ -23,7 +23,6 @@ class Resolution implements ResolutionInterface
protected float $y, protected float $y,
protected int $per_unit = self::PER_INCH protected int $per_unit = self::PER_INCH
) { ) {
//
} }
/** /**