1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-29 08:40:33 +02:00

Merge branch 'develop' into feature/standard-rules

This commit is contained in:
Oliver Vogel
2024-01-30 19:37:39 +01:00
31 changed files with 209 additions and 209 deletions

View File

@@ -20,7 +20,7 @@ class Collection implements CollectionInterface, IteratorAggregate, Countable
/**
* Static constructor
*
* @param array $items
* @param array $items
* @return self
*/
public static function create(array $items = []): self
@@ -61,7 +61,7 @@ class Collection implements CollectionInterface, IteratorAggregate, Countable
/**
* Append new item to collection
*
* @param mixed $item
* @param mixed $item
* @return CollectionInterface
*/
public function push($item): CollectionInterface
@@ -102,7 +102,7 @@ class Collection implements CollectionInterface, IteratorAggregate, Countable
/**
* Return item at given position starting at 0
*
* @param integer $key
* @param integer $key
* @return mixed
*/
public function getAtPosition(int $key = 0, $default = null): mixed

View File

@@ -16,7 +16,7 @@ class StringColorDecoder extends AbstractDecoder implements DecoderInterface
/**
* Decode CMYK color strings
*
* @param mixed $input
* @param mixed $input
* @return ImageInterface|ColorInterface
*/
public function decode(mixed $input): ImageInterface|ColorInterface

View File

@@ -16,7 +16,7 @@ class StringColorDecoder extends AbstractDecoder implements DecoderInterface
/**
* Decode hsl color strings
*
* @param mixed $input
* @param mixed $input
* @return ImageInterface|ColorInterface
*/
public function decode(mixed $input): ImageInterface|ColorInterface

View File

@@ -16,7 +16,7 @@ class StringColorDecoder extends AbstractDecoder implements DecoderInterface
/**
* Decode hsv/hsb color strings
*
* @param mixed $input
* @param mixed $input
* @return ImageInterface|ColorInterface
*/
public function decode(mixed $input): ImageInterface|ColorInterface

View File

@@ -16,7 +16,7 @@ class HexColorDecoder extends AbstractDecoder implements DecoderInterface
/**
* Decode hexadecimal rgb colors with and without transparency
*
* @param mixed $input
* @param mixed $input
* @return ImageInterface|ColorInterface
*/
public function decode(mixed $input): ImageInterface|ColorInterface

View File

@@ -12,151 +12,151 @@ use Intervention\Image\Interfaces\ImageInterface;
class HtmlColornameDecoder extends HexColorDecoder implements DecoderInterface
{
protected static $names = [
'lightsalmon' => '#ffa07a',
'salmon' => '#fa8072',
'darksalmon' => '#e9967a',
'lightcoral' => '#f08080',
'indianred' => '#cd5c5c',
'crimson' => '#dc143c',
'firebrick' => '#b22222',
'red' => '#ff0000',
'darkred' => '#8b0000',
'coral' => '#ff7f50',
'tomato' => '#ff6347',
'orangered' => '#ff4500',
'gold' => '#ffd700',
'orange' => '#ffa500',
'darkorange' => '#ff8c00',
'lightyellow' => '#ffffe0',
'lemonchiffon' => '#fffacd',
'lightgoldenrodyellow' => '#fafad2',
'papayawhip' => '#ffefd5',
'moccasin' => '#ffe4b5',
'peachpuff' => '#ffdab9',
'palegoldenrod' => '#eee8aa',
'khaki' => '#f0e68c',
'darkkhaki' => '#bdb76b',
'yellow' => '#ffff00',
'lawngreen' => '#7cfc00',
'chartreuse' => '#7fff00',
'limegreen' => '#32cd32',
'lime' => '#00ff00',
'forestgreen' => '#228b22',
'green' => '#008000',
'darkgreen' => '#006400',
'greenyellow' => '#adff2f',
'yellowgreen' => '#9acd32',
'springgreen' => '#00ff7f',
'mediumspringgreen' => '#00fa9a',
'lightgreen' => '#90ee90',
'palegreen' => '#98fb98',
'darkseagreen' => '#8fbc8f',
'mediumseagre' => 'en #3cb371',
'seagreen' => '#2e8b57',
'olive' => '#808000',
'darkolivegreen' => '#556b2f',
'olivedrab' => '#6b8e23',
'lightcyan' => '#e0ffff',
'cyan' => '#00ffff',
'aqua' => '#00ffff',
'aquamarine' => '#7fffd4',
'mediumaquamarine' => '#66cdaa',
'paleturquoise' => '#afeeee',
'turquoise' => '#40e0d0',
'mediumturquoise' => '#48d1cc',
'darkturquoise' => '#00ced1',
'lightseagreen' => '#20b2aa',
'cadetblue' => '#5f9ea0',
'darkcyan' => '#008b8b',
'teal' => '#008080',
'powderblue' => '#b0e0e6',
'lightblue' => '#add8e6',
'lightskyblue' => '#87cefa',
'skyblue' => '#87ceeb',
'deepskyblue' => '#00bfff',
'lightsteelblue' => '#b0c4de',
'dodgerblue' => '#1e90ff',
'cornflowerblue' => '#6495ed',
'steelblue' => '#4682b4',
'royalblue' => '#4169e1',
'blue' => '#0000ff',
'mediumblue' => '#0000cd',
'darkblue' => '#00008b',
'navy' => '#000080',
'midnightblue' => '#191970',
'mediumslateblue' => '#7b68ee',
'slateblue' => '#6a5acd',
'darkslateblue' => '#483d8b',
'lavender' => '#e6e6fa',
'thistle' => '#d8bfd8',
'plum' => '#dda0dd',
'violet' => '#ee82ee',
'orchid' => '#da70d6',
'fuchsia' => '#ff00ff',
'magenta' => '#ff00ff',
'mediumorchid' => '#ba55d3',
'mediumpurple' => '#9370db',
'blueviolet' => '#8a2be2',
'darkviolet' => '#9400d3',
'darkorchid' => '#9932cc',
'darkmagenta' => '#8b008b',
'purple' => '#800080',
'indigo' => '#4b0082',
'pink' => '#ffc0cb',
'lightpink' => '#ffb6c1',
'hotpink' => '#ff69b4',
'deeppink' => '#ff1493',
'palevioletred' => '#db7093',
'mediumvioletred' => '#c71585',
'white' => '#ffffff',
'snow' => '#fffafa',
'honeydew' => '#f0fff0',
'mintcream' => '#f5fffa',
'azure' => '#f0ffff',
'aliceblue' => '#f0f8ff',
'ghostwhite' => '#f8f8ff',
'whitesmoke' => '#f5f5f5',
'seashell' => '#fff5ee',
'beige' => '#f5f5dc',
'oldlace' => '#fdf5e6',
'floralwhite' => '#fffaf0',
'ivory' => '#fffff0',
'antiquewhite' => '#faebd7',
'linen' => '#faf0e6',
'lavenderblush' => '#fff0f5',
'mistyrose' => '#ffe4e1',
'gainsboro' => '#dcdcdc',
'lightgray' => '#d3d3d3',
'silver' => '#c0c0c0',
'darkgray' => '#a9a9a9',
'gray' => '#808080',
'dimgray' => '#696969',
'lightslategray' => '#778899',
'slategray' => '#708090',
'darkslategray' => '#2f4f4f',
'black' => '#000000',
'cornsilk' => '#fff8dc',
'blanchedalmond' => '#ffebcd',
'bisque' => '#ffe4c4',
'navajowhite' => '#ffdead',
'wheat' => '#f5deb3',
'burlywood' => '#deb887',
'tan' => '#d2b48c',
'rosybrown' => '#bc8f8f',
'sandybrown' => '#f4a460',
'goldenrod' => '#daa520',
'peru' => '#cd853f',
'chocolate' => '#d2691e',
'saddlebrown' => '#8b4513',
'sienna' => '#a0522d',
'brown' => '#a52a2a',
'maroon' => '#800000',
];
'lightsalmon' => '#ffa07a',
'salmon' => '#fa8072',
'darksalmon' => '#e9967a',
'lightcoral' => '#f08080',
'indianred' => '#cd5c5c',
'crimson' => '#dc143c',
'firebrick' => '#b22222',
'red' => '#ff0000',
'darkred' => '#8b0000',
'coral' => '#ff7f50',
'tomato' => '#ff6347',
'orangered' => '#ff4500',
'gold' => '#ffd700',
'orange' => '#ffa500',
'darkorange' => '#ff8c00',
'lightyellow' => '#ffffe0',
'lemonchiffon' => '#fffacd',
'lightgoldenrodyellow' => '#fafad2',
'papayawhip' => '#ffefd5',
'moccasin' => '#ffe4b5',
'peachpuff' => '#ffdab9',
'palegoldenrod' => '#eee8aa',
'khaki' => '#f0e68c',
'darkkhaki' => '#bdb76b',
'yellow' => '#ffff00',
'lawngreen' => '#7cfc00',
'chartreuse' => '#7fff00',
'limegreen' => '#32cd32',
'lime' => '#00ff00',
'forestgreen' => '#228b22',
'green' => '#008000',
'darkgreen' => '#006400',
'greenyellow' => '#adff2f',
'yellowgreen' => '#9acd32',
'springgreen' => '#00ff7f',
'mediumspringgreen' => '#00fa9a',
'lightgreen' => '#90ee90',
'palegreen' => '#98fb98',
'darkseagreen' => '#8fbc8f',
'mediumseagre' => 'en #3cb371',
'seagreen' => '#2e8b57',
'olive' => '#808000',
'darkolivegreen' => '#556b2f',
'olivedrab' => '#6b8e23',
'lightcyan' => '#e0ffff',
'cyan' => '#00ffff',
'aqua' => '#00ffff',
'aquamarine' => '#7fffd4',
'mediumaquamarine' => '#66cdaa',
'paleturquoise' => '#afeeee',
'turquoise' => '#40e0d0',
'mediumturquoise' => '#48d1cc',
'darkturquoise' => '#00ced1',
'lightseagreen' => '#20b2aa',
'cadetblue' => '#5f9ea0',
'darkcyan' => '#008b8b',
'teal' => '#008080',
'powderblue' => '#b0e0e6',
'lightblue' => '#add8e6',
'lightskyblue' => '#87cefa',
'skyblue' => '#87ceeb',
'deepskyblue' => '#00bfff',
'lightsteelblue' => '#b0c4de',
'dodgerblue' => '#1e90ff',
'cornflowerblue' => '#6495ed',
'steelblue' => '#4682b4',
'royalblue' => '#4169e1',
'blue' => '#0000ff',
'mediumblue' => '#0000cd',
'darkblue' => '#00008b',
'navy' => '#000080',
'midnightblue' => '#191970',
'mediumslateblue' => '#7b68ee',
'slateblue' => '#6a5acd',
'darkslateblue' => '#483d8b',
'lavender' => '#e6e6fa',
'thistle' => '#d8bfd8',
'plum' => '#dda0dd',
'violet' => '#ee82ee',
'orchid' => '#da70d6',
'fuchsia' => '#ff00ff',
'magenta' => '#ff00ff',
'mediumorchid' => '#ba55d3',
'mediumpurple' => '#9370db',
'blueviolet' => '#8a2be2',
'darkviolet' => '#9400d3',
'darkorchid' => '#9932cc',
'darkmagenta' => '#8b008b',
'purple' => '#800080',
'indigo' => '#4b0082',
'pink' => '#ffc0cb',
'lightpink' => '#ffb6c1',
'hotpink' => '#ff69b4',
'deeppink' => '#ff1493',
'palevioletred' => '#db7093',
'mediumvioletred' => '#c71585',
'white' => '#ffffff',
'snow' => '#fffafa',
'honeydew' => '#f0fff0',
'mintcream' => '#f5fffa',
'azure' => '#f0ffff',
'aliceblue' => '#f0f8ff',
'ghostwhite' => '#f8f8ff',
'whitesmoke' => '#f5f5f5',
'seashell' => '#fff5ee',
'beige' => '#f5f5dc',
'oldlace' => '#fdf5e6',
'floralwhite' => '#fffaf0',
'ivory' => '#fffff0',
'antiquewhite' => '#faebd7',
'linen' => '#faf0e6',
'lavenderblush' => '#fff0f5',
'mistyrose' => '#ffe4e1',
'gainsboro' => '#dcdcdc',
'lightgray' => '#d3d3d3',
'silver' => '#c0c0c0',
'darkgray' => '#a9a9a9',
'gray' => '#808080',
'dimgray' => '#696969',
'lightslategray' => '#778899',
'slategray' => '#708090',
'darkslategray' => '#2f4f4f',
'black' => '#000000',
'cornsilk' => '#fff8dc',
'blanchedalmond' => '#ffebcd',
'bisque' => '#ffe4c4',
'navajowhite' => '#ffdead',
'wheat' => '#f5deb3',
'burlywood' => '#deb887',
'tan' => '#d2b48c',
'rosybrown' => '#bc8f8f',
'sandybrown' => '#f4a460',
'goldenrod' => '#daa520',
'peru' => '#cd853f',
'chocolate' => '#d2691e',
'saddlebrown' => '#8b4513',
'sienna' => '#a0522d',
'brown' => '#a52a2a',
'maroon' => '#800000',
];
/**
* Decode html color names
*
* @param mixed $input
* @param mixed $input
* @return ImageInterface|ColorInterface
*/
public function decode(mixed $input): ImageInterface|ColorInterface

View File

@@ -16,7 +16,7 @@ class StringColorDecoder extends AbstractDecoder implements DecoderInterface
/**
* Decode rgb color strings
*
* @param mixed $input
* @param mixed $input
* @return ImageInterface|ColorInterface
*/
public function decode(mixed $input): ImageInterface|ColorInterface

View File

@@ -11,7 +11,7 @@ abstract class DriverSpecializedEncoder extends DriverSpecialized implements Enc
/**
* Get return value of callback through output buffer
*
* @param callable $callback
* @param callable $callback
* @return string
*/
protected function getBuffered(callable $callback): string

View File

@@ -17,7 +17,7 @@ class BlendTransparencyModifier extends DriverSpecialized implements ModifierInt
public function apply(ImageInterface $image): ImageInterface
{
// decode blending color
$color = $this->driver()->handleInput(
$color = $this->driver()->handleInput(
$this->color ? $this->color : $image->blendingColor()
);

View File

@@ -19,7 +19,7 @@ class ResizeModifier extends DriverSpecialized implements ModifierInterface
{
public function apply(ImageInterface $image): ImageInterface
{
$resizeTo = $this->getAdjustedSize($image);
$resizeTo = $this->getAdjustedSize($image);
foreach ($image as $frame) {
$this->resizeFrame($frame, $resizeTo);
}

View File

@@ -17,7 +17,7 @@ class BlendTransparencyModifier extends DriverSpecialized implements ModifierInt
public function apply(ImageInterface $image): ImageInterface
{
// decode blending color
$color = $this->driver()->handleInput(
$color = $this->driver()->handleInput(
$this->color ? $this->color : $image->blendingColor()
);

View File

@@ -11,8 +11,8 @@ class EncodedImage extends File implements EncodedImageInterface
/**
* Create new instance
*
* @param string $data
* @param string $mediaType
* @param string $data
* @param string $mediaType
*/
public function __construct(
protected string $data,

View File

@@ -15,7 +15,7 @@ class File implements FileInterface
/**
* Create new instance
*
* @param string $data
* @param string $data
*/
public function __construct(protected string $data)
{
@@ -25,7 +25,7 @@ class File implements FileInterface
* Save encoded image data in file system
*
* @codeCoverageIgnore
* @param string $filepath
* @param string $filepath
* @return void
*/
public function save(string $filepath): void

View File

@@ -97,8 +97,8 @@ class Point implements PointInterface
/**
* Sets both X and Y coordinate
*
* @param integer $x
* @param integer $y
* @param integer $x
* @param integer $y
* @return Point
*/
public function setPosition(int $x, int $y): self
@@ -112,8 +112,8 @@ class Point implements PointInterface
/**
* Rotate point ccw around pivot
*
* @param float $angle
* @param Point $pivot
* @param float $angle
* @param Point $pivot
* @return Point
*/
public function rotate(float $angle, Point $pivot): self

View File

@@ -116,7 +116,7 @@ class Polygon implements IteratorAggregate, Countable, ArrayAccess, DrawableInte
/**
* Determine if point exists at given offset
*
* @param mixed $offset
* @param mixed $offset
* @return bool
*/
public function offsetExists($offset): bool
@@ -397,7 +397,7 @@ class Polygon implements IteratorAggregate, Countable, ArrayAccess, DrawableInte
/**
* Move all points by given amount on the x-axis
*
* @param int $amount
* @param int $amount
* @return Polygon
*/
public function movePointsX(int $amount): self

View File

@@ -200,7 +200,7 @@ class RectangleResizer
/**
* Scale given size to cover target size
*
* @param SizeInterface $size Size to be resized
* @param SizeInterface $size Size to be resized
* @return SizeInterface
*/
public function cover(SizeInterface $size): SizeInterface
@@ -223,7 +223,7 @@ class RectangleResizer
/**
* Scale given size to contain target size
*
* @param SizeInterface $size Size to be resized
* @param SizeInterface $size Size to be resized
* @return SizeInterface
*/
public function contain(SizeInterface $size): SizeInterface
@@ -246,7 +246,7 @@ class RectangleResizer
/**
* Scale given size to contain target size but prevent upsizing
*
* @param SizeInterface $size Size to be resized
* @param SizeInterface $size Size to be resized
* @return SizeInterface
*/
public function containDown(SizeInterface $size): SizeInterface
@@ -278,8 +278,8 @@ class RectangleResizer
/**
* Crop target size out of given size at given position (i.e. move the pivot point)
*
* @param SizeInterface $size
* @param string $position
* @param SizeInterface $size
* @param string $position
* @return SizeInterface
*/
public function crop(SizeInterface $size, string $position = 'top-left'): SizeInterface

View File

@@ -911,7 +911,7 @@ final class Image implements ImageInterface
/**
* ALias of self::toJpeg2000()
*
* @param mixed $options
* @param mixed $options
* @return EncodedImageInterface
*/
public function toJp2(mixed ...$options): EncodedImageInterface

View File

@@ -61,7 +61,7 @@ interface ColorInterface
/**
* Retrieve the color channel by its classname
*
* @param string $classname
* @param string $classname
* @return ColorChannelInterface
*/
public function channel(string $classname): ColorChannelInterface;

View File

@@ -9,7 +9,7 @@ interface ColorspaceInterface
/**
* Convert given color to the format of the current colorspace
*
* @param ColorInterface $color
* @param ColorInterface $color
* @return ColorInterface
*/
public function importColor(ColorInterface $color): ColorInterface;

View File

@@ -16,7 +16,7 @@ interface DrawableInterface
/**
* Set the background color of the drawable object
*
* @param mixed $color
* @param mixed $color
* @return DrawableInterface
*/
public function setBackgroundColor(mixed $color): DrawableInterface;

View File

@@ -9,7 +9,7 @@ interface FileInterface
/**
* Save data in given path in file system
*
* @param string $filepath
* @param string $filepath
* @return void
*/
public function save(string $filepath): void;

View File

@@ -109,7 +109,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* string values must represent a percentage value between '0%' and '100%'
* and the respective frame position is only determined approximately.
*
* @param int|string $position
* @param int|string $position
* @return ImageInterface
*/
public function removeAnimation(int|string $position = 0): ImageInterface;
@@ -216,7 +216,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Set blending color will have no effect unless image is converted into a format
* which does not support transparency.
*
* @param mixed $color
* @param mixed $color
* @return ImageInterface
*/
public function setBlendingColor(mixed $color): ImageInterface;
@@ -239,7 +239,7 @@ interface ImageInterface extends IteratorAggregate, Countable
/**
* Set given icc color profile to image
*
* @param ProfileInterface $profile
* @param ProfileInterface $profile
* @return ImageInterface
*/
public function setProfile(ProfileInterface $profile): ImageInterface;
@@ -263,7 +263,7 @@ interface ImageInterface extends IteratorAggregate, Countable
/**
* Sharpen the current image with given strength
*
* @param int $amount
* @param int $amount
* @return ImageInterface
*/
public function sharpen(int $amount = 10): ImageInterface;
@@ -278,7 +278,7 @@ interface ImageInterface extends IteratorAggregate, Countable
/**
* Adjust brightness of the current image
*
* @param int $level
* @param int $level
* @return ImageInterface
*/
public function brightness(int $level): ImageInterface;
@@ -286,7 +286,7 @@ interface ImageInterface extends IteratorAggregate, Countable
/**
* Adjust color contrast of the current image
*
* @param int $level
* @param int $level
* @return ImageInterface
*/
public function contrast(int $level): ImageInterface;
@@ -294,7 +294,7 @@ interface ImageInterface extends IteratorAggregate, Countable
/**
* Apply gamma correction on the current image
*
* @param float $gamma
* @param float $gamma
* @return ImageInterface
*/
public function gamma(float $gamma): ImageInterface;
@@ -302,9 +302,9 @@ interface ImageInterface extends IteratorAggregate, Countable
/**
* Adjust the intensity of the RGB color channels
*
* @param int $red
* @param int $green
* @param int $blue
* @param int $red
* @param int $green
* @param int $blue
* @return ImageInterface
*/
public function colorize(int $red = 0, int $green = 0, int $blue = 0): ImageInterface;
@@ -349,18 +349,18 @@ interface ImageInterface extends IteratorAggregate, Countable
/**
* Rotate current image by given angle
*
* @param float $angle
* @param float $angle
* @param string $background
* @return ImageInterface
* @return ImageInterface
*/
public function rotate(float $angle, mixed $background = 'ffffff'): ImageInterface;
/**
* Draw text on image
*
* @param string $text
* @param int $x
* @param int $y
* @param string $text
* @param int $x
* @param int $y
* @param callable|FontInterface $font
* @return ImageInterface
*/
@@ -526,11 +526,11 @@ interface ImageInterface extends IteratorAggregate, Countable
/**
* Place another image into the current image instance
*
* @param mixed $element
* @param mixed $element
* @param string $position
* @param int $offset_x
* @param int $offset_y
* @param int $opacity
* @param int $offset_x
* @param int $offset_y
* @param int $opacity
* @return ImageInterface
*/
public function place(
@@ -561,8 +561,8 @@ interface ImageInterface extends IteratorAggregate, Countable
/**
* Draw a single pixel at given position defined by the coordinates x and y in a given color.
*
* @param int $x
* @param int $y
* @param int $x
* @param int $y
* @param mixed $color
* @return ImageInterface
*/

View File

@@ -9,7 +9,7 @@ interface InputHandlerInterface
/**
* Try to decode the given input with each decoder of the the handler chain
*
* @param mixed $input
* @param mixed $input
* @return ImageInterface|ColorInterface
*/
public function handle($input): ImageInterface|ColorInterface;

View File

@@ -23,8 +23,8 @@ interface PointInterface
/**
* Set position of point
*
* @param int $x
* @param int $y
* @param int $x
* @param int $y
* @return PointInterface
*/
public function setPosition(int $x, int $y): PointInterface;

View File

@@ -16,7 +16,7 @@ interface ResolutionInterface
/**
* Set resolution on x-axix
*
* @param float $x
* @param float $x
* @return ResolutionInterface
*/
public function setX(float $x): ResolutionInterface;
@@ -31,7 +31,7 @@ interface ResolutionInterface
/**
* Set resolution on y-axis
*
* @param float $y
* @param float $y
* @return ResolutionInterface
*/
public function setY(float $y): ResolutionInterface;

View File

@@ -95,7 +95,7 @@ interface SizeInterface
* Calculate the relative position to another Size
* based on the pivot point settings of both sizes.
*
* @param SizeInterface $size
* @param SizeInterface $size
* @return PointInterface
*/
public function relativePositionTo(SizeInterface $size): PointInterface;

View File

@@ -29,10 +29,10 @@ class ChannelTest extends TestCase
$this->assertInstanceOf(Channel::class, $channel);
$this->expectException(ColorException::class);
$channel = new Channel();
new Channel();
$this->expectException(ColorException::class);
$channel = new Channel(normalized: 2);
new Channel(normalized: 2);
}
public function testConstructorFail(): void

View File

@@ -29,10 +29,10 @@ class ChannelTest extends TestCase
$this->assertInstanceOf(Hue::class, $channel);
$this->expectException(ColorException::class);
$channel = new Hue();
new Hue();
$this->expectException(ColorException::class);
$channel = new Hue(normalized: 2);
new Hue(normalized: 2);
}
public function testConstructorFail(): void

View File

@@ -30,10 +30,10 @@ class ChannelTest extends TestCase
$this->assertInstanceOf(Hue::class, $channel);
$this->expectException(ColorException::class);
$channel = new Hue();
new Hue();
$this->expectException(ColorException::class);
$channel = new Hue(normalized: 2);
new Hue(normalized: 2);
}
public function testConstructorFail(): void

View File

@@ -28,10 +28,10 @@ class ChannelTest extends TestCase
$this->assertInstanceOf(Channel::class, $channel);
$this->expectException(ColorException::class);
$channel = new Channel();
new Channel();
$this->expectException(ColorException::class);
$channel = new Channel(normalized: 2);
new Channel(normalized: 2);
}
public function testConstructorFail(): void

View File

@@ -22,6 +22,6 @@ class ColorProcessorTest extends TestCase
public function testNativeToColor(): void
{
$processor = new ColorProcessor(new Colorspace());
$result = $processor->nativeToColor(new ImagickPixel('rgb(255, 55, 0)'));
$processor->nativeToColor(new ImagickPixel('rgb(255, 55, 0)'));
}
}