diff --git a/src/Colors/Hsl/Color.php b/src/Colors/Hsl/Color.php index 20ca0e5d2..ad03c6cca 100644 --- a/src/Colors/Hsl/Color.php +++ b/src/Colors/Hsl/Color.php @@ -16,6 +16,14 @@ class Color extends AbstractColor { + /** + * Create new color object + * + * @param int $h + * @param int $s + * @param int $l + * @return void + */ public function __construct(int $h, int $s, int $l) { /** @throws void */ diff --git a/src/Colors/Hsv/Color.php b/src/Colors/Hsv/Color.php index 8a4f18b2c..62893ec02 100644 --- a/src/Colors/Hsv/Color.php +++ b/src/Colors/Hsv/Color.php @@ -16,6 +16,14 @@ class Color extends AbstractColor { + /** + * Create new color object + * + * @param int $h + * @param int $s + * @param int $v + * @return void + */ public function __construct(int $h, int $s, int $v) { /** @throws void */ diff --git a/src/Colors/Rgb/Decoders/TransparentColorDecoder.php b/src/Colors/Rgb/Decoders/TransparentColorDecoder.php index c3823d744..f818b7909 100644 --- a/src/Colors/Rgb/Decoders/TransparentColorDecoder.php +++ b/src/Colors/Rgb/Decoders/TransparentColorDecoder.php @@ -10,6 +10,11 @@ class TransparentColorDecoder extends HexColorDecoder { + /** + * {@inheritdoc} + * + * @see DecoderInterface::decode() + */ public function decode(mixed $input): ImageInterface|ColorInterface { if (!is_string($input)) { diff --git a/src/Drivers/Gd/Analyzers/ColorspaceAnalyzer.php b/src/Drivers/Gd/Analyzers/ColorspaceAnalyzer.php index b1082cfd3..73057f72a 100644 --- a/src/Drivers/Gd/Analyzers/ColorspaceAnalyzer.php +++ b/src/Drivers/Gd/Analyzers/ColorspaceAnalyzer.php @@ -11,6 +11,11 @@ class ColorspaceAnalyzer extends GenericColorspaceAnalyzer implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see AnalyzerInterface::analyze() + */ public function analyze(ImageInterface $image): mixed { return new Colorspace(); diff --git a/src/Drivers/Gd/Analyzers/HeightAnalyzer.php b/src/Drivers/Gd/Analyzers/HeightAnalyzer.php index 40ffb9bc7..cf8ed31bd 100644 --- a/src/Drivers/Gd/Analyzers/HeightAnalyzer.php +++ b/src/Drivers/Gd/Analyzers/HeightAnalyzer.php @@ -10,6 +10,11 @@ class HeightAnalyzer extends GenericHeightAnalyzer implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see AnalyzerInterface::analyze() + */ public function analyze(ImageInterface $image): mixed { return imagesy($image->core()->native()); diff --git a/src/Drivers/Gd/Analyzers/PixelColorAnalyzer.php b/src/Drivers/Gd/Analyzers/PixelColorAnalyzer.php index 60a0f7fc6..b27583a3c 100644 --- a/src/Drivers/Gd/Analyzers/PixelColorAnalyzer.php +++ b/src/Drivers/Gd/Analyzers/PixelColorAnalyzer.php @@ -15,6 +15,11 @@ class PixelColorAnalyzer extends GenericPixelColorAnalyzer implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see AnalyzerInterface::analyze() + */ public function analyze(ImageInterface $image): mixed { return $this->colorAt( diff --git a/src/Drivers/Gd/Analyzers/PixelColorsAnalyzer.php b/src/Drivers/Gd/Analyzers/PixelColorsAnalyzer.php index 41d7135ab..862d41e13 100644 --- a/src/Drivers/Gd/Analyzers/PixelColorsAnalyzer.php +++ b/src/Drivers/Gd/Analyzers/PixelColorsAnalyzer.php @@ -9,6 +9,11 @@ class PixelColorsAnalyzer extends PixelColorAnalyzer { + /** + * {@inheritdoc} + * + * @see AnalyzerInterface::analyze() + */ public function analyze(ImageInterface $image): mixed { $colors = new Collection(); diff --git a/src/Drivers/Gd/Analyzers/ResolutionAnalyzer.php b/src/Drivers/Gd/Analyzers/ResolutionAnalyzer.php index 21ed03060..93d37f24a 100644 --- a/src/Drivers/Gd/Analyzers/ResolutionAnalyzer.php +++ b/src/Drivers/Gd/Analyzers/ResolutionAnalyzer.php @@ -11,6 +11,11 @@ class ResolutionAnalyzer extends GenericResolutionAnalyzer implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see AnalyzerInterface::analyze() + */ public function analyze(ImageInterface $image): mixed { return new Resolution(...imageresolution($image->core()->native())); diff --git a/src/Drivers/Gd/Analyzers/WidthAnalyzer.php b/src/Drivers/Gd/Analyzers/WidthAnalyzer.php index b57a7e143..9c6b793b2 100644 --- a/src/Drivers/Gd/Analyzers/WidthAnalyzer.php +++ b/src/Drivers/Gd/Analyzers/WidthAnalyzer.php @@ -10,6 +10,11 @@ class WidthAnalyzer extends GenericWidthAnalyzer implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see AnalyzerInterface::analyze() + */ public function analyze(ImageInterface $image): mixed { return imagesx($image->core()->native()); diff --git a/src/Drivers/Gd/ColorProcessor.php b/src/Drivers/Gd/ColorProcessor.php index c26603407..305837390 100644 --- a/src/Drivers/Gd/ColorProcessor.php +++ b/src/Drivers/Gd/ColorProcessor.php @@ -17,10 +17,21 @@ class ColorProcessor implements ColorProcessorInterface { + /** + * Create new color processor object + * + * @param ColorspaceInterface $colorspace + * @return void + */ public function __construct(protected ColorspaceInterface $colorspace = new Colorspace()) { } + /** + * {@inheritdoc} + * + * @see ColorProcessorInterface::colorToNative() + */ public function colorToNative(ColorInterface $color): int { // convert color to colorspace @@ -39,6 +50,11 @@ public function colorToNative(ColorInterface $color): int return ($a << 24) + ($r << 16) + ($g << 8) + $b; } + /** + * {@inheritdoc} + * + * @see ColorProcessorInterface::nativeToColor() + */ public function nativeToColor(mixed $value): ColorInterface { if (!is_int($value)) { diff --git a/src/Drivers/Gd/Decoders/Base64ImageDecoder.php b/src/Drivers/Gd/Decoders/Base64ImageDecoder.php index f8970b657..7b3686ad0 100644 --- a/src/Drivers/Gd/Decoders/Base64ImageDecoder.php +++ b/src/Drivers/Gd/Decoders/Base64ImageDecoder.php @@ -11,6 +11,11 @@ class Base64ImageDecoder extends BinaryImageDecoder implements DecoderInterface { + /** + * {@inheritdoc} + * + * @see DecoderInterface::decode() + */ public function decode(mixed $input): ImageInterface|ColorInterface { if (!$this->isValidBase64($input)) { diff --git a/src/Drivers/Gd/Decoders/DataUriImageDecoder.php b/src/Drivers/Gd/Decoders/DataUriImageDecoder.php index 939b1e0e8..fe3abe6f5 100644 --- a/src/Drivers/Gd/Decoders/DataUriImageDecoder.php +++ b/src/Drivers/Gd/Decoders/DataUriImageDecoder.php @@ -11,6 +11,11 @@ class DataUriImageDecoder extends BinaryImageDecoder implements DecoderInterface { + /** + * {@inheritdoc} + * + * @see DecoderInterface::decode() + */ public function decode(mixed $input): ImageInterface|ColorInterface { if (!is_string($input)) { diff --git a/src/Drivers/Gd/Decoders/FilePathImageDecoder.php b/src/Drivers/Gd/Decoders/FilePathImageDecoder.php index 59b984f7a..bb6ddd5c0 100644 --- a/src/Drivers/Gd/Decoders/FilePathImageDecoder.php +++ b/src/Drivers/Gd/Decoders/FilePathImageDecoder.php @@ -13,6 +13,11 @@ class FilePathImageDecoder extends NativeObjectDecoder implements DecoderInterface { + /** + * {@inheritdoc} + * + * @see DecoderInterface::decode() + */ public function decode(mixed $input): ImageInterface|ColorInterface { if (!$this->isFile($input)) { diff --git a/src/Drivers/Gd/Decoders/FilePointerImageDecoder.php b/src/Drivers/Gd/Decoders/FilePointerImageDecoder.php index 66a39f015..0bf649dc3 100644 --- a/src/Drivers/Gd/Decoders/FilePointerImageDecoder.php +++ b/src/Drivers/Gd/Decoders/FilePointerImageDecoder.php @@ -10,6 +10,11 @@ class FilePointerImageDecoder extends BinaryImageDecoder { + /** + * {@inheritdoc} + * + * @see DecoderInterface::decode() + */ public function decode(mixed $input): ImageInterface|ColorInterface { if (!is_resource($input) || !in_array(get_resource_type($input), ['file', 'stream'])) { diff --git a/src/Drivers/Gd/Decoders/SplFileInfoImageDecoder.php b/src/Drivers/Gd/Decoders/SplFileInfoImageDecoder.php index 7febefb0e..7aee8f588 100644 --- a/src/Drivers/Gd/Decoders/SplFileInfoImageDecoder.php +++ b/src/Drivers/Gd/Decoders/SplFileInfoImageDecoder.php @@ -12,6 +12,11 @@ class SplFileInfoImageDecoder extends FilePathImageDecoder implements DecoderInterface { + /** + * {@inheritdoc} + * + * @see DecoderInterface::decode() + */ public function decode(mixed $input): ImageInterface|ColorInterface { if (!is_a($input, SplFileInfo::class)) { diff --git a/src/Drivers/Gd/Encoders/AvifEncoder.php b/src/Drivers/Gd/Encoders/AvifEncoder.php index cc5908738..87e5d9e4d 100644 --- a/src/Drivers/Gd/Encoders/AvifEncoder.php +++ b/src/Drivers/Gd/Encoders/AvifEncoder.php @@ -11,6 +11,11 @@ class AvifEncoder extends GenericAvifEncoder implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see EncoderInterface::encode() + */ public function encode(ImageInterface $image): EncodedImage { $gd = $image->core()->native(); diff --git a/src/Drivers/Gd/Encoders/BmpEncoder.php b/src/Drivers/Gd/Encoders/BmpEncoder.php index 811cb93e5..4cf0dbfaf 100644 --- a/src/Drivers/Gd/Encoders/BmpEncoder.php +++ b/src/Drivers/Gd/Encoders/BmpEncoder.php @@ -11,6 +11,11 @@ class BmpEncoder extends GenericBmpEncoder implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see EncoderInterface::encode() + */ public function encode(ImageInterface $image): EncodedImage { $data = $this->buffered(function () use ($image) { diff --git a/src/Drivers/Gd/Encoders/GifEncoder.php b/src/Drivers/Gd/Encoders/GifEncoder.php index 1031a528c..875df7871 100644 --- a/src/Drivers/Gd/Encoders/GifEncoder.php +++ b/src/Drivers/Gd/Encoders/GifEncoder.php @@ -15,6 +15,11 @@ class GifEncoder extends GenericGifEncoder implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see EncoderInterface::encode() + */ public function encode(ImageInterface $image): EncodedImage { if ($image->isAnimated()) { diff --git a/src/Drivers/Gd/Encoders/JpegEncoder.php b/src/Drivers/Gd/Encoders/JpegEncoder.php index b408a197b..268a6f4b3 100644 --- a/src/Drivers/Gd/Encoders/JpegEncoder.php +++ b/src/Drivers/Gd/Encoders/JpegEncoder.php @@ -12,6 +12,11 @@ class JpegEncoder extends GenericJpegEncoder implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see EncoderInterface::encode() + */ public function encode(ImageInterface $image): EncodedImage { $blendingColor = $this->driver()->handleInput( diff --git a/src/Drivers/Gd/Encoders/WebpEncoder.php b/src/Drivers/Gd/Encoders/WebpEncoder.php index 5a838c769..5e06ab48c 100644 --- a/src/Drivers/Gd/Encoders/WebpEncoder.php +++ b/src/Drivers/Gd/Encoders/WebpEncoder.php @@ -11,6 +11,11 @@ class WebpEncoder extends GenericWebpEncoder implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see EncoderInterface::encode() + */ public function encode(ImageInterface $image): EncodedImage { $quality = $this->quality === 100 ? IMG_WEBP_LOSSLESS : $this->quality; diff --git a/src/Drivers/Gd/Modifiers/AlignRotationModifier.php b/src/Drivers/Gd/Modifiers/AlignRotationModifier.php index daf152fb6..791ae7db7 100644 --- a/src/Drivers/Gd/Modifiers/AlignRotationModifier.php +++ b/src/Drivers/Gd/Modifiers/AlignRotationModifier.php @@ -10,6 +10,11 @@ class AlignRotationModifier extends GenericAlignRotationModifier implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see ModifierInterface::apply() + */ public function apply(ImageInterface $image): ImageInterface { $image = match ($image->exif('IFD0.Orientation')) { diff --git a/src/Drivers/Gd/Modifiers/BlendTransparencyModifier.php b/src/Drivers/Gd/Modifiers/BlendTransparencyModifier.php index c2cec921d..555a163f8 100644 --- a/src/Drivers/Gd/Modifiers/BlendTransparencyModifier.php +++ b/src/Drivers/Gd/Modifiers/BlendTransparencyModifier.php @@ -11,6 +11,11 @@ class BlendTransparencyModifier extends GenericBlendTransparencyModifier implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see ModifierInterface::apply() + */ public function apply(ImageInterface $image): ImageInterface { // decode blending color diff --git a/src/Drivers/Gd/Modifiers/BlurModifier.php b/src/Drivers/Gd/Modifiers/BlurModifier.php index 5357c40e1..14fe41a4a 100644 --- a/src/Drivers/Gd/Modifiers/BlurModifier.php +++ b/src/Drivers/Gd/Modifiers/BlurModifier.php @@ -10,6 +10,11 @@ class BlurModifier extends GenericBlurModifier implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see ModifierInterface::apply() + */ public function apply(ImageInterface $image): ImageInterface { foreach ($image as $frame) { diff --git a/src/Drivers/Gd/Modifiers/BrightnessModifier.php b/src/Drivers/Gd/Modifiers/BrightnessModifier.php index 747d51d65..022c679a8 100644 --- a/src/Drivers/Gd/Modifiers/BrightnessModifier.php +++ b/src/Drivers/Gd/Modifiers/BrightnessModifier.php @@ -10,6 +10,11 @@ class BrightnessModifier extends GenericBrightnessModifier implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see ModifierInterface::apply() + */ public function apply(ImageInterface $image): ImageInterface { foreach ($image as $frame) { diff --git a/src/Drivers/Gd/Modifiers/ColorizeModifier.php b/src/Drivers/Gd/Modifiers/ColorizeModifier.php index 4458a5532..c753e438c 100644 --- a/src/Drivers/Gd/Modifiers/ColorizeModifier.php +++ b/src/Drivers/Gd/Modifiers/ColorizeModifier.php @@ -10,6 +10,11 @@ class ColorizeModifier extends GenericColorizeModifier implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see ModifierInterface::apply() + */ public function apply(ImageInterface $image): ImageInterface { // normalize colorize levels diff --git a/src/Drivers/Gd/Modifiers/ColorspaceModifier.php b/src/Drivers/Gd/Modifiers/ColorspaceModifier.php index 748ebc7a4..a94f82dd7 100644 --- a/src/Drivers/Gd/Modifiers/ColorspaceModifier.php +++ b/src/Drivers/Gd/Modifiers/ColorspaceModifier.php @@ -12,6 +12,11 @@ class ColorspaceModifier extends GenericColorspaceModifier implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see ModifierInterface::apply() + */ public function apply(ImageInterface $image): ImageInterface { if (!is_a($this->targetColorspace(), RgbColorspace::class)) { diff --git a/src/Drivers/Gd/Modifiers/ContainModifier.php b/src/Drivers/Gd/Modifiers/ContainModifier.php index 8761111ec..8462e8efd 100644 --- a/src/Drivers/Gd/Modifiers/ContainModifier.php +++ b/src/Drivers/Gd/Modifiers/ContainModifier.php @@ -18,6 +18,11 @@ class ContainModifier extends GenericContainModifier implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see ModifierInterface::apply() + */ public function apply(ImageInterface $image): ImageInterface { $crop = $this->getCropSize($image); diff --git a/src/Drivers/Gd/Modifiers/ContrastModifier.php b/src/Drivers/Gd/Modifiers/ContrastModifier.php index 8567ac357..7a0ac6b8e 100644 --- a/src/Drivers/Gd/Modifiers/ContrastModifier.php +++ b/src/Drivers/Gd/Modifiers/ContrastModifier.php @@ -10,6 +10,11 @@ class ContrastModifier extends GenericContrastModifier implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see ModifierInterface::apply() + */ public function apply(ImageInterface $image): ImageInterface { foreach ($image as $frame) { diff --git a/src/Drivers/Gd/Modifiers/CoverModifier.php b/src/Drivers/Gd/Modifiers/CoverModifier.php index 4343d43d1..e676e663e 100644 --- a/src/Drivers/Gd/Modifiers/CoverModifier.php +++ b/src/Drivers/Gd/Modifiers/CoverModifier.php @@ -14,6 +14,11 @@ class CoverModifier extends GenericCoverModifier implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see ModifierInterface::apply() + */ public function apply(ImageInterface $image): ImageInterface { $crop = $this->getCropSize($image); diff --git a/src/Drivers/Gd/Modifiers/CropModifier.php b/src/Drivers/Gd/Modifiers/CropModifier.php index 56a019fdf..fabdf7f77 100644 --- a/src/Drivers/Gd/Modifiers/CropModifier.php +++ b/src/Drivers/Gd/Modifiers/CropModifier.php @@ -14,6 +14,11 @@ class CropModifier extends GenericCropModifier implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see ModifierInterface::apply() + */ public function apply(ImageInterface $image): ImageInterface { $originalSize = $image->size(); diff --git a/src/Drivers/Gd/Modifiers/DrawBezierModifier.php b/src/Drivers/Gd/Modifiers/DrawBezierModifier.php index a0dfaf913..d8da4937c 100644 --- a/src/Drivers/Gd/Modifiers/DrawBezierModifier.php +++ b/src/Drivers/Gd/Modifiers/DrawBezierModifier.php @@ -13,6 +13,9 @@ class DrawBezierModifier extends ModifiersDrawBezierModifier implements SpecializedInterface { /** + * {@inheritdoc} + * + * @see ModifierInterface::apply() * @throws RuntimeException * @throws GeometryException */ diff --git a/src/Drivers/Gd/Modifiers/DrawEllipseModifier.php b/src/Drivers/Gd/Modifiers/DrawEllipseModifier.php index b070349d8..2a80af951 100644 --- a/src/Drivers/Gd/Modifiers/DrawEllipseModifier.php +++ b/src/Drivers/Gd/Modifiers/DrawEllipseModifier.php @@ -12,6 +12,9 @@ class DrawEllipseModifier extends GenericDrawEllipseModifier implements SpecializedInterface { /** + * {@inheritdoc} + * + * @see ModifierInterface::apply() * @throws RuntimeException */ public function apply(ImageInterface $image): ImageInterface diff --git a/src/Drivers/Gd/Modifiers/DrawPixelModifier.php b/src/Drivers/Gd/Modifiers/DrawPixelModifier.php index f626ddfbc..9fc954cd9 100644 --- a/src/Drivers/Gd/Modifiers/DrawPixelModifier.php +++ b/src/Drivers/Gd/Modifiers/DrawPixelModifier.php @@ -10,6 +10,11 @@ class DrawPixelModifier extends GenericDrawPixelModifier implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see ModifierInterface::apply() + */ public function apply(ImageInterface $image): ImageInterface { $color = $this->driver()->colorProcessor($image->colorspace())->colorToNative( diff --git a/src/Drivers/Gd/Modifiers/DrawPolygonModifier.php b/src/Drivers/Gd/Modifiers/DrawPolygonModifier.php index e09fbfc52..55e542727 100644 --- a/src/Drivers/Gd/Modifiers/DrawPolygonModifier.php +++ b/src/Drivers/Gd/Modifiers/DrawPolygonModifier.php @@ -12,6 +12,9 @@ class DrawPolygonModifier extends ModifiersDrawPolygonModifier implements SpecializedInterface { /** + * {@inheritdoc} + * + * @see ModifierInterface::apply() * @throws RuntimeException */ public function apply(ImageInterface $image): ImageInterface diff --git a/src/Drivers/Gd/Modifiers/DrawRectangleModifier.php b/src/Drivers/Gd/Modifiers/DrawRectangleModifier.php index 9b024dbd1..2b23c5ee0 100644 --- a/src/Drivers/Gd/Modifiers/DrawRectangleModifier.php +++ b/src/Drivers/Gd/Modifiers/DrawRectangleModifier.php @@ -12,6 +12,9 @@ class DrawRectangleModifier extends GenericDrawRectangleModifier implements SpecializedInterface { /** + * {@inheritdoc} + * + * @see ModifierInterface::apply() * @throws RuntimeException */ public function apply(ImageInterface $image): ImageInterface diff --git a/src/Drivers/Gd/Modifiers/FillModifier.php b/src/Drivers/Gd/Modifiers/FillModifier.php index 0fe860faf..412f80597 100644 --- a/src/Drivers/Gd/Modifiers/FillModifier.php +++ b/src/Drivers/Gd/Modifiers/FillModifier.php @@ -12,6 +12,11 @@ class FillModifier extends GenericFillModifier implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see ModifierInterface::apply() + */ public function apply(ImageInterface $image): ImageInterface { $color = $this->color($image); diff --git a/src/Drivers/Gd/Modifiers/FlipModifier.php b/src/Drivers/Gd/Modifiers/FlipModifier.php index 8e832cce0..0107200a3 100644 --- a/src/Drivers/Gd/Modifiers/FlipModifier.php +++ b/src/Drivers/Gd/Modifiers/FlipModifier.php @@ -10,6 +10,11 @@ class FlipModifier extends GenericFlipModifier implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see ModifierInterface::apply() + */ public function apply(ImageInterface $image): ImageInterface { foreach ($image as $frame) { diff --git a/src/Drivers/Gd/Modifiers/FlopModifier.php b/src/Drivers/Gd/Modifiers/FlopModifier.php index 238bc264a..703317546 100644 --- a/src/Drivers/Gd/Modifiers/FlopModifier.php +++ b/src/Drivers/Gd/Modifiers/FlopModifier.php @@ -10,6 +10,11 @@ class FlopModifier extends GenericFlopModifier implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see ModifierInterface::apply() + */ public function apply(ImageInterface $image): ImageInterface { foreach ($image as $frame) { diff --git a/src/Drivers/Gd/Modifiers/GammaModifier.php b/src/Drivers/Gd/Modifiers/GammaModifier.php index 0815a7bad..8da6499e7 100644 --- a/src/Drivers/Gd/Modifiers/GammaModifier.php +++ b/src/Drivers/Gd/Modifiers/GammaModifier.php @@ -10,6 +10,11 @@ class GammaModifier extends GenericGammaModifier implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see ModifierInterface::apply() + */ public function apply(ImageInterface $image): ImageInterface { foreach ($image as $frame) { diff --git a/src/Drivers/Gd/Modifiers/GreyscaleModifier.php b/src/Drivers/Gd/Modifiers/GreyscaleModifier.php index 2eb04c236..a1cf280a6 100644 --- a/src/Drivers/Gd/Modifiers/GreyscaleModifier.php +++ b/src/Drivers/Gd/Modifiers/GreyscaleModifier.php @@ -10,6 +10,11 @@ class GreyscaleModifier extends GenericGreyscaleModifier implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see ModifierInterface::apply() + */ public function apply(ImageInterface $image): ImageInterface { foreach ($image as $frame) { diff --git a/src/Drivers/Gd/Modifiers/InvertModifier.php b/src/Drivers/Gd/Modifiers/InvertModifier.php index 65d42b4e7..e2c8dc674 100644 --- a/src/Drivers/Gd/Modifiers/InvertModifier.php +++ b/src/Drivers/Gd/Modifiers/InvertModifier.php @@ -10,6 +10,11 @@ class InvertModifier extends GenericInvertModifier implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see ModifierInterface::apply() + */ public function apply(ImageInterface $image): ImageInterface { foreach ($image as $frame) { diff --git a/src/Drivers/Gd/Modifiers/PixelateModifier.php b/src/Drivers/Gd/Modifiers/PixelateModifier.php index 06ddde149..ecbe3e584 100644 --- a/src/Drivers/Gd/Modifiers/PixelateModifier.php +++ b/src/Drivers/Gd/Modifiers/PixelateModifier.php @@ -10,6 +10,11 @@ class PixelateModifier extends GenericPixelateModifier implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see ModifierInterface::apply() + */ public function apply(ImageInterface $image): ImageInterface { foreach ($image as $frame) { diff --git a/src/Drivers/Gd/Modifiers/PlaceModifier.php b/src/Drivers/Gd/Modifiers/PlaceModifier.php index eaad5c2b2..9bc264d04 100644 --- a/src/Drivers/Gd/Modifiers/PlaceModifier.php +++ b/src/Drivers/Gd/Modifiers/PlaceModifier.php @@ -13,6 +13,11 @@ class PlaceModifier extends GenericPlaceModifier implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see ModifierInterface::apply() + */ public function apply(ImageInterface $image): ImageInterface { $watermark = $this->driver()->handleInput($this->element); diff --git a/src/Drivers/Gd/Modifiers/ProfileModifier.php b/src/Drivers/Gd/Modifiers/ProfileModifier.php index 5a5310a13..a862395b7 100644 --- a/src/Drivers/Gd/Modifiers/ProfileModifier.php +++ b/src/Drivers/Gd/Modifiers/ProfileModifier.php @@ -11,6 +11,11 @@ class ProfileModifier extends GenericProfileModifier implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see ModifierInterface::apply() + */ public function apply(ImageInterface $image): ImageInterface { throw new NotSupportedException( diff --git a/src/Drivers/Gd/Modifiers/ProfileRemovalModifier.php b/src/Drivers/Gd/Modifiers/ProfileRemovalModifier.php index 1121036ae..2960cd5fc 100644 --- a/src/Drivers/Gd/Modifiers/ProfileRemovalModifier.php +++ b/src/Drivers/Gd/Modifiers/ProfileRemovalModifier.php @@ -10,6 +10,11 @@ class ProfileRemovalModifier extends GenericProfileRemovalModifier implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see ModifierInterface::apply() + */ public function apply(ImageInterface $image): ImageInterface { // Color profiles are not supported by GD, so the decoded diff --git a/src/Drivers/Gd/Modifiers/QuantizeColorsModifier.php b/src/Drivers/Gd/Modifiers/QuantizeColorsModifier.php index 36e254963..603078446 100644 --- a/src/Drivers/Gd/Modifiers/QuantizeColorsModifier.php +++ b/src/Drivers/Gd/Modifiers/QuantizeColorsModifier.php @@ -12,6 +12,11 @@ class QuantizeColorsModifier extends GenericQuantizeColorsModifier implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see ModifierInterface::apply() + */ public function apply(ImageInterface $image): ImageInterface { if ($this->limit <= 0) { diff --git a/src/Drivers/Gd/Modifiers/RemoveAnimationModifier.php b/src/Drivers/Gd/Modifiers/RemoveAnimationModifier.php index 345798f93..6160cab43 100644 --- a/src/Drivers/Gd/Modifiers/RemoveAnimationModifier.php +++ b/src/Drivers/Gd/Modifiers/RemoveAnimationModifier.php @@ -10,6 +10,11 @@ class RemoveAnimationModifier extends GenericRemoveAnimationModifier implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see ModifierInterface::apply() + */ public function apply(ImageInterface $image): ImageInterface { $image->core()->setNative( diff --git a/src/Drivers/Gd/Modifiers/ResizeCanvasModifier.php b/src/Drivers/Gd/Modifiers/ResizeCanvasModifier.php index 458a4fd09..65314783c 100644 --- a/src/Drivers/Gd/Modifiers/ResizeCanvasModifier.php +++ b/src/Drivers/Gd/Modifiers/ResizeCanvasModifier.php @@ -18,6 +18,11 @@ class ResizeCanvasModifier extends GenericResizeCanvasModifier implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see ModifierInterface::apply() + */ public function apply(ImageInterface $image): ImageInterface { $resize = $this->cropSize($image); diff --git a/src/Drivers/Gd/Modifiers/ResizeModifier.php b/src/Drivers/Gd/Modifiers/ResizeModifier.php index faf67aaf6..3b6663f47 100644 --- a/src/Drivers/Gd/Modifiers/ResizeModifier.php +++ b/src/Drivers/Gd/Modifiers/ResizeModifier.php @@ -6,6 +6,7 @@ use Intervention\Image\Drivers\Gd\Cloner; use Intervention\Image\Exceptions\ColorException; +use Intervention\Image\Exceptions\GeometryException; use Intervention\Image\Exceptions\RuntimeException; use Intervention\Image\Interfaces\FrameInterface; use Intervention\Image\Interfaces\ImageInterface; @@ -15,6 +16,11 @@ class ResizeModifier extends GenericResizeModifier implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see ModifierInterface::apply() + */ public function apply(ImageInterface $image): ImageInterface { $resizeTo = $this->getAdjustedSize($image); @@ -52,7 +58,12 @@ private function resizeFrame(FrameInterface $frame, SizeInterface $resizeTo): vo } /** + * Return the size the modifier will resize to + * + * @param ImageInterface $image * @throws RuntimeException + * @throws GeometryException + * @return SizeInterface */ protected function getAdjustedSize(ImageInterface $image): SizeInterface { diff --git a/src/Drivers/Gd/Modifiers/ResolutionModifier.php b/src/Drivers/Gd/Modifiers/ResolutionModifier.php index 6fcc23355..d6fd504c2 100644 --- a/src/Drivers/Gd/Modifiers/ResolutionModifier.php +++ b/src/Drivers/Gd/Modifiers/ResolutionModifier.php @@ -10,6 +10,11 @@ class ResolutionModifier extends GenericResolutionModifier implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see ModifierInterface::apply() + */ public function apply(ImageInterface $image): ImageInterface { $x = intval(round($this->x)); diff --git a/src/Drivers/Gd/Modifiers/RotateModifier.php b/src/Drivers/Gd/Modifiers/RotateModifier.php index 868112681..2fe5e5cfe 100644 --- a/src/Drivers/Gd/Modifiers/RotateModifier.php +++ b/src/Drivers/Gd/Modifiers/RotateModifier.php @@ -18,6 +18,11 @@ class RotateModifier extends GenericRotateModifier implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see ModifierInterface::apply() + */ public function apply(ImageInterface $image): ImageInterface { $background = $this->driver()->handleInput($this->background); diff --git a/src/Drivers/Gd/Modifiers/ScaleDownModifier.php b/src/Drivers/Gd/Modifiers/ScaleDownModifier.php index 606978d48..15287e6c8 100644 --- a/src/Drivers/Gd/Modifiers/ScaleDownModifier.php +++ b/src/Drivers/Gd/Modifiers/ScaleDownModifier.php @@ -9,6 +9,11 @@ class ScaleDownModifier extends ResizeModifier { + /** + * {@inheritdoc} + * + * @see ResizeModifier::getAdjustedSize() + */ protected function getAdjustedSize(ImageInterface $image): SizeInterface { return $image->size()->scaleDown($this->width, $this->height); diff --git a/src/Drivers/Gd/Modifiers/SharpenModifier.php b/src/Drivers/Gd/Modifiers/SharpenModifier.php index a1c593970..3943d2cbf 100644 --- a/src/Drivers/Gd/Modifiers/SharpenModifier.php +++ b/src/Drivers/Gd/Modifiers/SharpenModifier.php @@ -10,6 +10,11 @@ class SharpenModifier extends GenericSharpenModifier implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see ModifierInterface::apply() + */ public function apply(ImageInterface $image): ImageInterface { $matrix = $this->matrix(); diff --git a/src/Drivers/Gd/Modifiers/SliceAnimationModifier.php b/src/Drivers/Gd/Modifiers/SliceAnimationModifier.php index 84b04c366..8986e7fe1 100644 --- a/src/Drivers/Gd/Modifiers/SliceAnimationModifier.php +++ b/src/Drivers/Gd/Modifiers/SliceAnimationModifier.php @@ -11,6 +11,11 @@ class SliceAnimationModifier extends GenericSliceAnimationModifier implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see ModifierInterface::apply() + */ public function apply(ImageInterface $image): ImageInterface { if ($this->offset >= $image->count()) { diff --git a/src/Drivers/Gd/Modifiers/TrimModifier.php b/src/Drivers/Gd/Modifiers/TrimModifier.php index 7c011e0d5..26be5d9ef 100644 --- a/src/Drivers/Gd/Modifiers/TrimModifier.php +++ b/src/Drivers/Gd/Modifiers/TrimModifier.php @@ -14,6 +14,11 @@ class TrimModifier extends GenericTrimModifier implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see ModifierInterface::apply() + */ public function apply(ImageInterface $image): ImageInterface { if ($image->isAnimated()) { diff --git a/src/Drivers/Imagick/Decoders/Base64ImageDecoder.php b/src/Drivers/Imagick/Decoders/Base64ImageDecoder.php index ecddde3cb..03fd07ba1 100644 --- a/src/Drivers/Imagick/Decoders/Base64ImageDecoder.php +++ b/src/Drivers/Imagick/Decoders/Base64ImageDecoder.php @@ -10,6 +10,11 @@ class Base64ImageDecoder extends BinaryImageDecoder { + /** + * {@inheritdoc} + * + * @see DecoderInterface::decode() + */ public function decode(mixed $input): ImageInterface|ColorInterface { if (!$this->isValidBase64($input)) { diff --git a/src/Drivers/Imagick/Decoders/BinaryImageDecoder.php b/src/Drivers/Imagick/Decoders/BinaryImageDecoder.php index 25dc5ee3e..96850b3c4 100644 --- a/src/Drivers/Imagick/Decoders/BinaryImageDecoder.php +++ b/src/Drivers/Imagick/Decoders/BinaryImageDecoder.php @@ -13,6 +13,11 @@ class BinaryImageDecoder extends NativeObjectDecoder { + /** + * {@inheritdoc} + * + * @see DecoderInterface::decode() + */ public function decode(mixed $input): ImageInterface|ColorInterface { if (!is_string($input)) { diff --git a/src/Drivers/Imagick/Decoders/DataUriImageDecoder.php b/src/Drivers/Imagick/Decoders/DataUriImageDecoder.php index 82a39e686..f395cb00e 100644 --- a/src/Drivers/Imagick/Decoders/DataUriImageDecoder.php +++ b/src/Drivers/Imagick/Decoders/DataUriImageDecoder.php @@ -10,6 +10,11 @@ class DataUriImageDecoder extends BinaryImageDecoder { + /** + * {@inheritdoc} + * + * @see DecoderInterface::decode() + */ public function decode(mixed $input): ImageInterface|ColorInterface { if (!is_string($input)) { diff --git a/src/Drivers/Imagick/Decoders/FilePathImageDecoder.php b/src/Drivers/Imagick/Decoders/FilePathImageDecoder.php index 4a8d4e119..a418099cc 100644 --- a/src/Drivers/Imagick/Decoders/FilePathImageDecoder.php +++ b/src/Drivers/Imagick/Decoders/FilePathImageDecoder.php @@ -12,6 +12,11 @@ class FilePathImageDecoder extends NativeObjectDecoder { + /** + * {@inheritdoc} + * + * @see DecoderInterface::decode() + */ public function decode(mixed $input): ImageInterface|ColorInterface { if (!$this->isFile($input)) { diff --git a/src/Drivers/Imagick/Decoders/FilePointerImageDecoder.php b/src/Drivers/Imagick/Decoders/FilePointerImageDecoder.php index 3145a2b7a..08717e094 100644 --- a/src/Drivers/Imagick/Decoders/FilePointerImageDecoder.php +++ b/src/Drivers/Imagick/Decoders/FilePointerImageDecoder.php @@ -10,6 +10,11 @@ class FilePointerImageDecoder extends BinaryImageDecoder { + /** + * {@inheritdoc} + * + * @see DecoderInterface::decode() + */ public function decode(mixed $input): ImageInterface|ColorInterface { if (!is_resource($input) || !in_array(get_resource_type($input), ['file', 'stream'])) { diff --git a/src/Drivers/Imagick/Decoders/NativeObjectDecoder.php b/src/Drivers/Imagick/Decoders/NativeObjectDecoder.php index 48e50b4ba..dec2d8fdd 100644 --- a/src/Drivers/Imagick/Decoders/NativeObjectDecoder.php +++ b/src/Drivers/Imagick/Decoders/NativeObjectDecoder.php @@ -17,6 +17,11 @@ class NativeObjectDecoder extends SpecializableDecoder implements SpecializedInterface { + /** + * {@inheritdoc} + * + * @see DecoderInterface::decode() + */ public function decode(mixed $input): ImageInterface|ColorInterface { if (!is_object($input)) { diff --git a/src/Drivers/Imagick/Decoders/SplFileInfoImageDecoder.php b/src/Drivers/Imagick/Decoders/SplFileInfoImageDecoder.php index ad96b7cec..8850123ed 100644 --- a/src/Drivers/Imagick/Decoders/SplFileInfoImageDecoder.php +++ b/src/Drivers/Imagick/Decoders/SplFileInfoImageDecoder.php @@ -11,6 +11,11 @@ class SplFileInfoImageDecoder extends FilePathImageDecoder { + /** + * {@inheritdoc} + * + * @see DecoderInterface::decode() + */ public function decode(mixed $input): ImageInterface|ColorInterface { if (!is_a($input, SplFileInfo::class)) { diff --git a/src/Drivers/Imagick/Frame.php b/src/Drivers/Imagick/Frame.php index 2439c855d..354504cf4 100644 --- a/src/Drivers/Imagick/Frame.php +++ b/src/Drivers/Imagick/Frame.php @@ -5,6 +5,7 @@ namespace Intervention\Image\Drivers\Imagick; use Imagick; +use ImagickException; use ImagickPixel; use Intervention\Image\Geometry\Rectangle; use Intervention\Image\Image; @@ -15,6 +16,13 @@ class Frame implements FrameInterface { + /** + * Create new frame object + * + * @param Imagick $native + * @throws ImagickException + * @return void + */ public function __construct(protected Imagick $native) { $background = new ImagickPixel('rgba(255, 255, 255, 0)'); diff --git a/src/Drivers/SpecializableDecoder.php b/src/Drivers/SpecializableDecoder.php index 8a9916f6f..9b0bf8bce 100644 --- a/src/Drivers/SpecializableDecoder.php +++ b/src/Drivers/SpecializableDecoder.php @@ -14,6 +14,11 @@ abstract class SpecializableDecoder extends AbstractDecoder implements Specializ { use CanBeDriverSpecialized; + /** + * {@inheritdoc} + * + * @see DecoderInterface::decode() + */ public function decode(mixed $input): ImageInterface|ColorInterface { throw new DecoderException('Decoder must be specialized by the driver first.'); diff --git a/src/Encoders/AvifEncoder.php b/src/Encoders/AvifEncoder.php index 89c1a8b43..7799950da 100644 --- a/src/Encoders/AvifEncoder.php +++ b/src/Encoders/AvifEncoder.php @@ -8,6 +8,12 @@ class AvifEncoder extends SpecializableEncoder { + /** + * Create new encoder object + * + * @param int $quality + * @return void + */ public function __construct(public int $quality = self::DEFAULT_QUALITY) { } diff --git a/src/Encoders/GifEncoder.php b/src/Encoders/GifEncoder.php index 2f5d07441..65f0224fd 100644 --- a/src/Encoders/GifEncoder.php +++ b/src/Encoders/GifEncoder.php @@ -8,6 +8,12 @@ class GifEncoder extends SpecializableEncoder { + /** + * Create new encoder object + * + * @param bool $interlaced + * @return void + */ public function __construct(public bool $interlaced = false) { } diff --git a/src/Encoders/HeicEncoder.php b/src/Encoders/HeicEncoder.php index 8c4272de6..2d129a355 100644 --- a/src/Encoders/HeicEncoder.php +++ b/src/Encoders/HeicEncoder.php @@ -8,6 +8,12 @@ class HeicEncoder extends SpecializableEncoder { + /** + * Create new encoder object + * + * @param int $quality + * @return void + */ public function __construct(public int $quality = self::DEFAULT_QUALITY) { } diff --git a/src/Encoders/Jpeg2000Encoder.php b/src/Encoders/Jpeg2000Encoder.php index 67c0ff902..dea11ef26 100644 --- a/src/Encoders/Jpeg2000Encoder.php +++ b/src/Encoders/Jpeg2000Encoder.php @@ -8,6 +8,12 @@ class Jpeg2000Encoder extends SpecializableEncoder { + /** + * Create new encoder object + * + * @param int $quality + * @return void + */ public function __construct(public int $quality = self::DEFAULT_QUALITY) { } diff --git a/src/Encoders/JpegEncoder.php b/src/Encoders/JpegEncoder.php index 5753c2497..eaf520e1a 100644 --- a/src/Encoders/JpegEncoder.php +++ b/src/Encoders/JpegEncoder.php @@ -8,6 +8,13 @@ class JpegEncoder extends SpecializableEncoder { + /** + * Create new encoder object + * + * @param int $quality + * @param bool $progressive + * @return void + */ public function __construct( public int $quality = self::DEFAULT_QUALITY, public bool $progressive = false diff --git a/src/Encoders/PngEncoder.php b/src/Encoders/PngEncoder.php index 7b2df8534..b3376e0de 100644 --- a/src/Encoders/PngEncoder.php +++ b/src/Encoders/PngEncoder.php @@ -8,6 +8,13 @@ class PngEncoder extends SpecializableEncoder { + /** + * Create new encoder object + * + * @param bool $interlaced + * @param bool $indexed + * @return void + */ public function __construct(public bool $interlaced = false, public bool $indexed = false) { } diff --git a/src/Encoders/TiffEncoder.php b/src/Encoders/TiffEncoder.php index 296218923..203baf8c7 100644 --- a/src/Encoders/TiffEncoder.php +++ b/src/Encoders/TiffEncoder.php @@ -8,6 +8,12 @@ class TiffEncoder extends SpecializableEncoder { + /** + * Create new encoder object + * + * @param int $quality + * @return void + */ public function __construct(public int $quality = self::DEFAULT_QUALITY) { } diff --git a/src/Encoders/WebpEncoder.php b/src/Encoders/WebpEncoder.php index 535d6b794..5530b6e6a 100644 --- a/src/Encoders/WebpEncoder.php +++ b/src/Encoders/WebpEncoder.php @@ -8,6 +8,12 @@ class WebpEncoder extends SpecializableEncoder { + /** + * Create new encoder object + * + * @param int $quality + * @return void + */ public function __construct(public int $quality = self::DEFAULT_QUALITY) { } diff --git a/src/Interfaces/ProfileInterface.php b/src/Interfaces/ProfileInterface.php index 925aae36a..8453fda78 100644 --- a/src/Interfaces/ProfileInterface.php +++ b/src/Interfaces/ProfileInterface.php @@ -6,5 +6,10 @@ interface ProfileInterface { + /** + * Cast color profile object to string + * + * @return string + */ public function __toString(): string; } diff --git a/src/Modifiers/BlendTransparencyModifier.php b/src/Modifiers/BlendTransparencyModifier.php index 6e330c445..0e8958fb0 100644 --- a/src/Modifiers/BlendTransparencyModifier.php +++ b/src/Modifiers/BlendTransparencyModifier.php @@ -8,6 +8,12 @@ class BlendTransparencyModifier extends SpecializableModifier { + /** + * Create new modifier object + * + * @param mixed $color + * @return void + */ public function __construct(public mixed $color = null) { } diff --git a/src/Modifiers/ColorizeModifier.php b/src/Modifiers/ColorizeModifier.php index 2fe28721f..b3330baf0 100644 --- a/src/Modifiers/ColorizeModifier.php +++ b/src/Modifiers/ColorizeModifier.php @@ -8,6 +8,14 @@ class ColorizeModifier extends SpecializableModifier { + /** + * Create new modifier object + * + * @param int $red + * @param int $green + * @param int $blue + * @return void + */ public function __construct( public int $red = 0, public int $green = 0, diff --git a/src/Modifiers/ContrastModifier.php b/src/Modifiers/ContrastModifier.php index e61f58326..01f726ab5 100644 --- a/src/Modifiers/ContrastModifier.php +++ b/src/Modifiers/ContrastModifier.php @@ -8,6 +8,12 @@ class ContrastModifier extends SpecializableModifier { + /** + * Create new modifier object + * + * @param int $level + * @return void + */ public function __construct(public int $level) { } diff --git a/src/Modifiers/CoverModifier.php b/src/Modifiers/CoverModifier.php index 61e5acc5a..a49e26a26 100644 --- a/src/Modifiers/CoverModifier.php +++ b/src/Modifiers/CoverModifier.php @@ -12,6 +12,14 @@ class CoverModifier extends SpecializableModifier { + /** + * Create new modifier object + * + * @param int $width + * @param int $height + * @param string $position + * @return void + */ public function __construct( public int $width, public int $height, diff --git a/src/Modifiers/CropModifier.php b/src/Modifiers/CropModifier.php index ffc6b4999..c4c9b1578 100644 --- a/src/Modifiers/CropModifier.php +++ b/src/Modifiers/CropModifier.php @@ -12,6 +12,17 @@ class CropModifier extends SpecializableModifier { + /** + * Create new modifier object + * + * @param int $width + * @param int $height + * @param int $offset_x + * @param int $offset_y + * @param mixed $background + * @param string $position + * @return void + */ public function __construct( public int $width, public int $height, diff --git a/src/Modifiers/DrawBezierModifier.php b/src/Modifiers/DrawBezierModifier.php index 5bac23ed5..f4b1555c2 100644 --- a/src/Modifiers/DrawBezierModifier.php +++ b/src/Modifiers/DrawBezierModifier.php @@ -9,10 +9,21 @@ class DrawBezierModifier extends AbstractDrawModifier { + /** + * Create new modifier object + * + * @param Bezier $drawable + * @return void + */ public function __construct(public Bezier $drawable) { } + /** + * Return object to be drawn + * + * @return DrawableInterface + */ public function drawable(): DrawableInterface { return $this->drawable; diff --git a/src/Modifiers/DrawLineModifier.php b/src/Modifiers/DrawLineModifier.php index 4997124bf..1e881bada 100644 --- a/src/Modifiers/DrawLineModifier.php +++ b/src/Modifiers/DrawLineModifier.php @@ -9,10 +9,21 @@ class DrawLineModifier extends AbstractDrawModifier { + /** + * Create new modifier object + * + * @param Line $drawable + * @return void + */ public function __construct(public Line $drawable) { } + /** + * Return object to be drawn + * + * @return DrawableInterface + */ public function drawable(): DrawableInterface { return $this->drawable; diff --git a/src/Modifiers/DrawPixelModifier.php b/src/Modifiers/DrawPixelModifier.php index 6e4d732ac..43bf0e793 100644 --- a/src/Modifiers/DrawPixelModifier.php +++ b/src/Modifiers/DrawPixelModifier.php @@ -9,6 +9,13 @@ class DrawPixelModifier extends SpecializableModifier { + /** + * Create new modifier object + * + * @param PointInterface $position + * @param mixed $color + * @return void + */ public function __construct( public PointInterface $position, public mixed $color diff --git a/src/Modifiers/DrawRectangleModifier.php b/src/Modifiers/DrawRectangleModifier.php index 03d521c25..2f0e689db 100644 --- a/src/Modifiers/DrawRectangleModifier.php +++ b/src/Modifiers/DrawRectangleModifier.php @@ -9,10 +9,21 @@ class DrawRectangleModifier extends AbstractDrawModifier { + /** + * + * Create new modifier object + * @param Rectangle $drawable + * @return void + */ public function __construct(public Rectangle $drawable) { } + /** + * Return object to be drawn + * + * @return DrawableInterface + */ public function drawable(): DrawableInterface { return $this->drawable; diff --git a/src/Modifiers/PlaceModifier.php b/src/Modifiers/PlaceModifier.php index 836066fad..601e70156 100644 --- a/src/Modifiers/PlaceModifier.php +++ b/src/Modifiers/PlaceModifier.php @@ -11,6 +11,16 @@ class PlaceModifier extends SpecializableModifier { + /** + * Create new modifier object + * + * @param mixed $element + * @param string $position + * @param int $offset_x + * @param int $offset_y + * @param int $opacity + * @return void + */ public function __construct( public mixed $element, public string $position = 'top-left', diff --git a/src/Modifiers/QuantizeColorsModifier.php b/src/Modifiers/QuantizeColorsModifier.php index 7845582ab..226dd6466 100644 --- a/src/Modifiers/QuantizeColorsModifier.php +++ b/src/Modifiers/QuantizeColorsModifier.php @@ -8,6 +8,13 @@ class QuantizeColorsModifier extends SpecializableModifier { + /** + * Create new modifier object + * + * @param int $limit + * @param mixed $background + * @return void + */ public function __construct( public int $limit, public mixed $background = 'ffffff' diff --git a/src/Modifiers/ResizeCanvasModifier.php b/src/Modifiers/ResizeCanvasModifier.php index 8fafbf92a..67f041c9e 100644 --- a/src/Modifiers/ResizeCanvasModifier.php +++ b/src/Modifiers/ResizeCanvasModifier.php @@ -12,6 +12,15 @@ class ResizeCanvasModifier extends SpecializableModifier { + /** + * Create new modifier object + * + * @param null|int $width + * @param null|int $height + * @param mixed $background + * @param string $position + * @return void + */ public function __construct( public ?int $width = null, public ?int $height = null, diff --git a/src/Modifiers/ResizeModifier.php b/src/Modifiers/ResizeModifier.php index 51d3783c3..d6ad6141e 100644 --- a/src/Modifiers/ResizeModifier.php +++ b/src/Modifiers/ResizeModifier.php @@ -8,6 +8,13 @@ class ResizeModifier extends SpecializableModifier { + /** + * Create new modifier object + * + * @param null|int $width + * @param null|int $height + * @return void + */ public function __construct(public ?int $width = null, public ?int $height = null) { } diff --git a/src/Modifiers/ResolutionModifier.php b/src/Modifiers/ResolutionModifier.php index 49e5efd50..0eb4cc168 100644 --- a/src/Modifiers/ResolutionModifier.php +++ b/src/Modifiers/ResolutionModifier.php @@ -8,6 +8,13 @@ class ResolutionModifier extends SpecializableModifier { + /** + * Create new modifier object + * + * @param float $x + * @param float $y + * @return void + */ public function __construct(public float $x, public float $y) { } diff --git a/src/Modifiers/TextModifier.php b/src/Modifiers/TextModifier.php index 91a1c6b43..2c0d446b5 100644 --- a/src/Modifiers/TextModifier.php +++ b/src/Modifiers/TextModifier.php @@ -14,6 +14,14 @@ class TextModifier extends SpecializableModifier { + /** + * Create new modifier object + * + * @param string $text + * @param PointInterface $position + * @param FontInterface $font + * @return void + */ public function __construct( public string $text, public PointInterface $position, diff --git a/src/Modifiers/TrimModifier.php b/src/Modifiers/TrimModifier.php index 89fa3992a..18e553103 100644 --- a/src/Modifiers/TrimModifier.php +++ b/src/Modifiers/TrimModifier.php @@ -8,6 +8,12 @@ class TrimModifier extends SpecializableModifier { + /** + * Create new modifier object + * + * @param int $tolerance + * @return void + */ public function __construct(public int $tolerance = 0) { } diff --git a/src/Typography/TextBlock.php b/src/Typography/TextBlock.php index d7f648dda..011b34e7e 100644 --- a/src/Typography/TextBlock.php +++ b/src/Typography/TextBlock.php @@ -8,6 +8,12 @@ class TextBlock extends Collection { + /** + * Create new text block object + * + * @param string $text + * @return void + */ public function __construct(string $text) { foreach (explode("\n", $text) as $line) {