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

Enforce doc block style

This commit is contained in:
Oliver Vogel
2025-03-30 11:19:39 +02:00
parent 06dacf4aa1
commit b63b0f26b2
23 changed files with 200 additions and 87 deletions

View File

@@ -1,68 +1,94 @@
<?xml version="1.0"?>
<ruleset name="Intervention">
<file>src/</file>
<file>tests/</file>
<arg name="colors"/>
<arg value="p"/>
<file>src/</file>
<file>tests/</file>
<arg name="colors"/>
<arg value="p"/>
<rule ref="PSR12"/>
<rule ref="Generic.Arrays.ArrayIndent"/>
<rule ref="Generic.ControlStructures.InlineControlStructure"/>
<rule ref="Generic.Formatting.SpaceAfterCast"/>
<rule ref="Generic.Formatting.SpaceAfterNot">
<properties>
<property name="spacing" value="0" />
</properties>
</rule>
<rule ref="Generic.Metrics.NestingLevel"/>
<rule ref="SlevomatCodingStandard.Arrays.SingleLineArrayWhitespace"/>
<rule ref="SlevomatCodingStandard.Arrays.DisallowImplicitArrayCreation"/>
<rule ref="SlevomatCodingStandard.Classes.ClassConstantVisibility"/>
<rule ref="SlevomatCodingStandard.Classes.ClassMemberSpacing"/>
<rule ref="SlevomatCodingStandard.Classes.ConstantSpacing"/>
<rule ref="SlevomatCodingStandard.Classes.MethodSpacing"/>
<rule ref="SlevomatCodingStandard.Classes.ModernClassNameReference"/>
<rule ref="SlevomatCodingStandard.Classes.ParentCallSpacing"/>
<rule ref="SlevomatCodingStandard.Classes.PropertyDeclaration"/>
<rule ref="SlevomatCodingStandard.Classes.RequireSelfReference"/>
<rule ref="SlevomatCodingStandard.Classes.TraitUseDeclaration"/>
<rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName">
<properties>
<property name="rootNamespaces" type="array">
<element key="src" value="Intervention\Image"/>
<element key="tests" value="Intervention\Image\Tests"/>
</property>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Namespaces.DisallowGroupUse"/>
<rule ref="SlevomatCodingStandard.Namespaces.MultipleUsesPerLine"/>
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
<properties>
<property name="searchAnnotations" value="true" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Namespaces.UseDoesNotStartWithBackslash"/>
<rule ref="SlevomatCodingStandard.Namespaces.UseFromSameNamespace"/>
<rule ref="SlevomatCodingStandard.Namespaces.UseSpacing"/>
<rule ref="SlevomatCodingStandard.Namespaces.UselessAlias"/>
<rule ref="SlevomatCodingStandard.Strings.DisallowVariableParsing"/>
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
<properties>
<property name="spacesCountAroundEqualsSign" value="0" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.LongTypeHints"/>
<rule ref="SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue"/>
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHintSpacing"/>
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHintSpacing"/>
<rule ref="SlevomatCodingStandard.TypeHints.DNFTypeHintFormat">
<properties>
<property name="withSpacesAroundOperators" value="no" />
<property name="nullPosition" value="first" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.PHP.UselessSemicolon"/>
<rule ref="SlevomatCodingStandard.Whitespaces.DuplicateSpaces"/>
<rule ref="SlevomatCodingStandard.Variables.UnusedVariable"/>
<rule ref="SlevomatCodingStandard.Variables.UselessVariable"/>
<rule ref="PSR12"/>
<rule ref="Generic.Arrays.ArrayIndent"/>
<rule ref="Generic.ControlStructures.InlineControlStructure"/>
<rule ref="Generic.Formatting.SpaceAfterCast"/>
<rule ref="Generic.Formatting.SpaceAfterNot">
<properties>
<property name="spacing" value="0" />
</properties>
</rule>
<rule ref="Generic.Metrics.NestingLevel"/>
<rule ref="SlevomatCodingStandard.Arrays.SingleLineArrayWhitespace"/>
<rule ref="SlevomatCodingStandard.Arrays.DisallowImplicitArrayCreation"/>
<rule ref="SlevomatCodingStandard.Classes.ClassConstantVisibility"/>
<rule ref="SlevomatCodingStandard.Classes.ClassMemberSpacing"/>
<rule ref="SlevomatCodingStandard.Classes.ConstantSpacing"/>
<rule ref="SlevomatCodingStandard.Classes.MethodSpacing"/>
<rule ref="SlevomatCodingStandard.Classes.ModernClassNameReference"/>
<rule ref="SlevomatCodingStandard.Classes.ParentCallSpacing"/>
<rule ref="SlevomatCodingStandard.Classes.PropertyDeclaration"/>
<rule ref="SlevomatCodingStandard.Classes.RequireSelfReference"/>
<rule ref="SlevomatCodingStandard.Classes.TraitUseDeclaration"/>
<rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName">
<properties>
<property name="rootNamespaces" type="array">
<element key="src" value="Intervention\Image"/>
<element key="tests" value="Intervention\Image\Tests"/>
</property>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Namespaces.DisallowGroupUse"/>
<rule ref="SlevomatCodingStandard.Namespaces.MultipleUsesPerLine"/>
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
<properties>
<property name="searchAnnotations" value="true" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Namespaces.UseDoesNotStartWithBackslash"/>
<rule ref="SlevomatCodingStandard.Namespaces.UseFromSameNamespace"/>
<rule ref="SlevomatCodingStandard.Namespaces.UseSpacing"/>
<rule ref="SlevomatCodingStandard.Namespaces.UselessAlias"/>
<rule ref="SlevomatCodingStandard.Strings.DisallowVariableParsing"/>
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
<properties>
<property name="spacesCountAroundEqualsSign" value="0" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.LongTypeHints"/>
<rule ref="SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue"/>
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHintSpacing"/>
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHintSpacing"/>
<rule ref="SlevomatCodingStandard.TypeHints.DNFTypeHintFormat">
<properties>
<property name="withSpacesAroundOperators" value="no" />
<property name="nullPosition" value="first" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.PHP.UselessSemicolon"/>
<rule ref="SlevomatCodingStandard.Whitespaces.DuplicateSpaces"/>
<rule ref="SlevomatCodingStandard.Variables.UnusedVariable"/>
<rule ref="SlevomatCodingStandard.Variables.UselessVariable"/>
<rule ref="SlevomatCodingStandard.Commenting.DocCommentSpacing">
<properties>
<property name="linesCountBeforeFirstContent" value="0"/>
<property name="linesCountAfterLastContent" value="0"/>
<property name="linesCountBetweenDescriptionAndAnnotations" value="1"/>
<property name="linesCountBetweenAnnotationsGroups" value="1"/>
<property name="annotationsGroups" type="array">
<element value="
@ORM\,
@ODM\,
"/>
<element value="
@link,
@internal,
@deprecated,
@see,
@uses,
"/>
<element value="
@param,
@throws,
@return,
"/>
</property>
</properties>
</rule>
</ruleset>

View File

@@ -43,8 +43,8 @@ class Colorspace implements ColorspaceInterface
/**
* @param ColorInterface $color
* @return ColorInterface
* @throws ColorException
* @return ColorInterface
*/
public function importColor(ColorInterface $color): ColorInterface
{
@@ -58,8 +58,8 @@ class Colorspace implements ColorspaceInterface
/**
* @param ColorInterface $color
* @return Color
* @throws ColorException
* @return Color
*/
protected function importRgbColor(ColorInterface $color): CmykColor
{

View File

@@ -42,8 +42,8 @@ class Colorspace implements ColorspaceInterface
/**
* @param ColorInterface $color
* @return ColorInterface
* @throws ColorException
* @return ColorInterface
*/
public function importColor(ColorInterface $color): ColorInterface
{
@@ -57,8 +57,8 @@ class Colorspace implements ColorspaceInterface
/**
* @param ColorInterface $color
* @return ColorInterface
* @throws ColorException
* @return ColorInterface
*/
protected function importRgbColor(ColorInterface $color): ColorInterface
{
@@ -108,8 +108,8 @@ class Colorspace implements ColorspaceInterface
/**
* @param ColorInterface $color
* @return ColorInterface
* @throws ColorException
* @return ColorInterface
*/
protected function importHsvColor(ColorInterface $color): ColorInterface
{

View File

@@ -42,8 +42,8 @@ class Colorspace implements ColorspaceInterface
/**
* @param ColorInterface $color
* @return ColorInterface
* @throws ColorException
* @return ColorInterface
*/
public function importColor(ColorInterface $color): ColorInterface
{
@@ -57,8 +57,8 @@ class Colorspace implements ColorspaceInterface
/**
* @param ColorInterface $color
* @return ColorInterface
* @throws ColorException
* @return ColorInterface
*/
protected function importRgbColor(ColorInterface $color): ColorInterface
{
@@ -105,8 +105,8 @@ class Colorspace implements ColorspaceInterface
/**
* @param ColorInterface $color
* @return ColorInterface
* @throws ColorException
* @return ColorInterface
*/
protected function importHslColor(ColorInterface $color): ColorInterface
{

View File

@@ -42,8 +42,8 @@ class Colorspace implements ColorspaceInterface
/**
* @param ColorInterface $color
* @return ColorInterface
* @throws ColorException
* @return ColorInterface
*/
public function importColor(ColorInterface $color): ColorInterface
{
@@ -57,8 +57,8 @@ class Colorspace implements ColorspaceInterface
/**
* @param ColorInterface $color
* @return ColorInterface
* @throws ColorException
* @return ColorInterface
*/
protected function importCmykColor(ColorInterface $color): ColorInterface
{
@@ -75,8 +75,8 @@ class Colorspace implements ColorspaceInterface
/**
* @param ColorInterface $color
* @return ColorInterface
* @throws ColorException
* @return ColorInterface
*/
protected function importHsvColor(ColorInterface $color): ColorInterface
{
@@ -107,8 +107,8 @@ class Colorspace implements ColorspaceInterface
/**
* @param ColorInterface $color
* @return ColorInterface
* @throws ColorException
* @return ColorInterface
*/
protected function importHslColor(ColorInterface $color): ColorInterface
{

View File

@@ -97,9 +97,10 @@ abstract class AbstractDriver implements DriverInterface
/**
* {@inheritdoc}
*
* @see DriverInterface::specializeMultiple()
*
* @throws NotSupportedException
* @throws DriverException
* @see DriverInterface::specializeMultiple()
*/
public function specializeMultiple(array $objects): array
{

View File

@@ -33,6 +33,7 @@ class Driver extends AbstractDriver
* {@inheritdoc}
*
* @see DriverInterface::checkHealth()
*
* @codeCoverageIgnore
*/
public function checkHealth(): void
@@ -70,8 +71,9 @@ class Driver extends AbstractDriver
/**
* {@inheritdoc}
*
* @throws RuntimeException
* @see DriverInterface::createAnimation()
*
* @throws RuntimeException
*/
public function createAnimation(callable $init): ImageInterface
{

View File

@@ -114,6 +114,7 @@ class Frame extends AbstractFrame implements FrameInterface
* {@inheritdoc}
*
* @see FrameInterface::setDispose()
*
* @throws InputException
*/
public function setDispose(int $dispose): FrameInterface

View File

@@ -16,6 +16,7 @@ class DrawBezierModifier extends ModifiersDrawBezierModifier implements Speciali
* {@inheritdoc}
*
* @see ModifierInterface::apply()
*
* @throws RuntimeException
* @throws GeometryException
*/

View File

@@ -15,6 +15,7 @@ class DrawEllipseModifier extends GenericDrawEllipseModifier implements Speciali
* {@inheritdoc}
*
* @see ModifierInterface::apply()
*
* @throws RuntimeException
*/
public function apply(ImageInterface $image): ImageInterface

View File

@@ -15,6 +15,7 @@ class DrawPolygonModifier extends ModifiersDrawPolygonModifier implements Specia
* {@inheritdoc}
*
* @see ModifierInterface::apply()
*
* @throws RuntimeException
*/
public function apply(ImageInterface $image): ImageInterface

View File

@@ -15,6 +15,7 @@ class DrawRectangleModifier extends GenericDrawRectangleModifier implements Spec
* {@inheritdoc}
*
* @see ModifierInterface::apply()
*
* @throws RuntimeException
*/
public function apply(ImageInterface $image): ImageInterface

View File

@@ -39,8 +39,8 @@ class RotateModifier extends GenericRotateModifier implements SpecializedInterfa
* color is used for newly create image areas
*
* @param FrameInterface $frame
* @throws ColorException
* @param ColorInterface $background
* @throws ColorException
* @return void
*/
protected function modifyFrame(FrameInterface $frame, ColorInterface $background): void

View File

@@ -86,9 +86,9 @@ class TextModifier extends GenericTextModifier implements SpecializedInterface
* Decode text color in GD compatible format
*
* @param ImageInterface $image
* @return int
* @throws RuntimeException
* @throws ColorException
* @return int
*/
protected function gdTextColor(ImageInterface $image): int
{
@@ -102,9 +102,9 @@ class TextModifier extends GenericTextModifier implements SpecializedInterface
* Decode color for stroke (outline) effect in GD compatible format
*
* @param ImageInterface $image
* @return int
* @throws RuntimeException
* @throws ColorException
* @return int
*/
protected function gdStrokeColor(ImageInterface $image): int
{

View File

@@ -36,6 +36,7 @@ class Driver extends AbstractDriver
* {@inheritdoc}
*
* @see DriverInterface::checkHealth()
*
* @codeCoverageIgnore
*/
public function checkHealth(): void
@@ -70,8 +71,9 @@ class Driver extends AbstractDriver
/**
* {@inheritdoc}
*
* @throws RuntimeException
* @see DriverInterface::createAnimation()
*
* @throws RuntimeException
*/
public function createAnimation(callable $init): ImageInterface
{

View File

@@ -113,6 +113,7 @@ class Frame extends AbstractFrame implements FrameInterface
* {@inheritdoc}
*
* @see DriverInterface::setDispose()
*
* @throws InputException
*/
public function setDispose(int $dispose): FrameInterface

View File

@@ -27,7 +27,6 @@ class Drawable
}
/**
*
* Create EllipseFactory statically
*
* @return EllipseFactory

View File

@@ -19,10 +19,11 @@ final class ImageManager implements ImageManagerInterface
/**
* @link https://image.intervention.io/v3/basics/image-manager#create-a-new-image-manager-instance
*
* @param string|DriverInterface $driver
* @param mixed $options
* @throws DriverException
* @throws InputException
* @param mixed $options
*/
public function __construct(string|DriverInterface $driver, mixed ...$options)
{
@@ -33,6 +34,7 @@ final class ImageManager implements ImageManagerInterface
* Create image manager with given driver
*
* @link https://image.intervention.io/v3/basics/image-manager
*
* @param string|DriverInterface $driver
* @param mixed $options
* @throws DriverException
@@ -48,6 +50,7 @@ final class ImageManager implements ImageManagerInterface
* Create image manager with GD driver
*
* @link https://image.intervention.io/v3/basics/image-manager#static-gd-driver-constructor
*
* @param mixed $options
* @throws DriverException
* @throws InputException
@@ -62,6 +65,7 @@ final class ImageManager implements ImageManagerInterface
* Create image manager with Imagick driver
*
* @link https://image.intervention.io/v3/basics/image-manager#static-imagick-driver-constructor
*
* @param mixed $options
* @throws DriverException
* @throws InputException

View File

@@ -58,6 +58,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Return width of current image
*
* @link https://image.intervention.io/v3/basics/meta-information#reading-the-pixel-width
*
* @throws RuntimeException
* @return int
*/
@@ -67,6 +68,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Return height of current image
*
* @link https://image.intervention.io/v3/basics/meta-information#reading-the-pixel-height
*
* @throws RuntimeException
* @return int
*/
@@ -76,6 +78,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Return size of current image
*
* @link https://image.intervention.io/v3/basics/meta-information#reading-the-image-size-as-an-object
*
* @throws RuntimeException
* @return SizeInterface
*/
@@ -85,6 +88,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Encode image with given encoder
*
* @link https://image.intervention.io/v3/basics/image-output#encoding-images
*
* @param EncoderInterface $encoder
* @throws RuntimeException
* @return EncodedImageInterface
@@ -96,6 +100,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* given, the image will be saved at its original location.
*
* @link https://image.intervention.io/v3/basics/image-output#writing-images-directly
*
* @param null|string $path
* @throws RuntimeException
* @return ImageInterface
@@ -106,6 +111,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Apply given modifier to current image
*
* @link https://image.intervention.io/v3/modifying/custom-modifiers
*
* @param ModifierInterface $modifier
* @throws RuntimeException
* @return ImageInterface
@@ -125,6 +131,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Determine if current image is animated
*
* @link https://image.intervention.io/v3/modifying/animations#check-the-current-image-instance-for-animation
*
* @return bool
*/
public function isAnimated(): bool;
@@ -138,6 +145,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* and the respective frame position is only determined approximately.
*
* @link https://image.intervention.io/v3/modifying/animations#removing-animation
*
* @param int|string $position
* @throws RuntimeException
* @return ImageInterface
@@ -148,6 +156,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Extract animation frames based on given values and discard the rest
*
* @link https://image.intervention.io/v3/modifying/animations#changing-the-animation-frames
*
* @param int $offset
* @param null|int $length
* @throws RuntimeException
@@ -159,6 +168,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Return loop count of animated image
*
* @link https://image.intervention.io/v3/modifying/animations#reading-the-animation-iteration-count
*
* @return int
*/
public function loops(): int;
@@ -167,6 +177,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Set loop count of animated image
*
* @link https://image.intervention.io/v3/modifying/animations#changing-the-animation-iteration-count
*
* @param int $loops
* @return ImageInterface
*/
@@ -176,6 +187,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Return exif data of current image
*
* @link https://image.intervention.io/v3/basics/meta-information#exif-information
*
* @return mixed
*/
public function exif(?string $query = null): mixed;
@@ -192,6 +204,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Return image resolution/density
*
* @link https://image.intervention.io/v3/basics/meta-information#image-resolution
*
* @throws RuntimeException
* @return ResolutionInterface
*/
@@ -201,6 +214,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Set image resolution
*
* @link https://image.intervention.io/v3/basics/meta-information#image-resolution
*
* @param float $x
* @param float $y
* @throws RuntimeException
@@ -212,6 +226,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Get the colorspace of the image
*
* @link https://image.intervention.io/v3/basics/colors#reading-the-colorspace
*
* @throws RuntimeException
* @return ColorspaceInterface
*/
@@ -221,6 +236,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Transform image to given colorspace
*
* @link https://image.intervention.io/v3/basics/colors#changing-the-colorspace
*
* @param string|ColorspaceInterface $colorspace
* @throws RuntimeException
* @return ImageInterface
@@ -231,6 +247,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Return color of pixel at given position on given frame position
*
* @link https://image.intervention.io/v3/basics/colors#color-information
*
* @param int $x
* @param int $y
* @param int $frame_key
@@ -243,6 +260,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Return all colors of pixel at given position for all frames of image
*
* @link https://image.intervention.io/v3/basics/colors#color-information
*
* @param int $x
* @param int $y
* @throws RuntimeException
@@ -282,6 +300,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Retrieve ICC color profile of image
*
* @link https://image.intervention.io/v3/basics/colors#color-profiles
*
* @throws RuntimeException
* @return ProfileInterface
*/
@@ -291,6 +310,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Set given icc color profile to image
*
* @link https://image.intervention.io/v3/basics/colors#color-profiles
*
* @param ProfileInterface $profile
* @throws RuntimeException
* @return ImageInterface
@@ -301,6 +321,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Remove ICC color profile from the current image
*
* @link https://image.intervention.io/v3/basics/colors#color-profiles
*
* @throws RuntimeException
* @return ImageInterface
*/
@@ -310,6 +331,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Apply color quantization to the current image
*
* @link https://image.intervention.io/v3/modifying/effects#reduce-colors
*
* @param int $limit
* @param mixed $background
* @throws RuntimeException
@@ -321,6 +343,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Sharpen the current image with given strength
*
* @link https://image.intervention.io/v3/modifying/effects#sharpening-effect
*
* @param int $amount
* @throws RuntimeException
* @return ImageInterface
@@ -331,6 +354,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Turn image into a greyscale version
*
* @link https://image.intervention.io/v3/modifying/effects#convert-image-to-a-greyscale-version
*
* @throws RuntimeException
* @return ImageInterface
*/
@@ -340,6 +364,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Adjust brightness of the current image
*
* @link https://image.intervention.io/v3/modifying/effects#changing-the-brightness
*
* @param int $level
* @throws RuntimeException
* @return ImageInterface
@@ -350,6 +375,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Adjust color contrast of the current image
*
* @link https://image.intervention.io/v3/modifying/effects#changing-the-contrast
*
* @param int $level
* @throws RuntimeException
* @return ImageInterface
@@ -360,6 +386,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Apply gamma correction on the current image
*
* @link https://image.intervention.io/v3/modifying/effects#gamma-correction
*
* @param float $gamma
* @throws RuntimeException
* @return ImageInterface
@@ -370,6 +397,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Adjust the intensity of the RGB color channels
*
* @link https://image.intervention.io/v3/modifying/effects#color-correction
*
* @param int $red
* @param int $green
* @param int $blue
@@ -382,6 +410,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Mirror the current image horizontally
*
* @link https://image.intervention.io/v3/modifying/effects#mirror-image-vertically
*
* @throws RuntimeException
* @return ImageInterface
*/
@@ -391,6 +420,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Mirror the current image vertically
*
* @link https://image.intervention.io/v3/modifying/effects#mirror-image-horizontally
*
* @throws RuntimeException
* @return ImageInterface
*/
@@ -400,6 +430,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Blur current image by given strength
*
* @link https://image.intervention.io/v3/modifying/effects#blur-effect
*
* @param int $amount
* @throws RuntimeException
* @return ImageInterface
@@ -410,6 +441,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Invert the colors of the current image
*
* @link https://image.intervention.io/v3/modifying/effects#invert-colors
*
* @throws RuntimeException
* @return ImageInterface
*/
@@ -419,6 +451,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Apply pixelation filter effect on current image
*
* @link https://image.intervention.io/v3/modifying/effects#pixelation-effect
*
* @param int $size
* @throws RuntimeException
* @return ImageInterface
@@ -429,6 +462,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Rotate current image by given angle
*
* @link https://image.intervention.io/v3/modifying/effects#image-rotation
*
* @param float $angle
* @param string $background
* @throws RuntimeException
@@ -440,6 +474,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Rotate the image to be upright according to exif information
*
* @link https://image.intervention.io/v3/modifying/effects#image-orientation-according-to-exif-data
*
* @throws RuntimeException
* @return ImageInterface
*/
@@ -449,6 +484,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Draw text on image
*
* @link https://image.intervention.io/v3/modifying/text-fonts
*
* @param string $text
* @param int $x
* @param int $y
@@ -462,6 +498,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Resize image to the given width and/or height
*
* @link https://image.intervention.io/v3/modifying/resizing#simple-image-resizing
*
* @param null|int $width
* @param null|int $height
* @throws RuntimeException
@@ -473,6 +510,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Resize image to the given width and/or height without exceeding the original dimensions
*
* @link https://image.intervention.io/v3/modifying/resizing#resizing-without-exceeding-the-original-size
*
* @param null|int $width
* @param null|int $height
* @throws RuntimeException
@@ -484,6 +522,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Resize image to the given width and/or height and keep the original aspect ratio
*
* @link https://image.intervention.io/v3/modifying/resizing#scaling-images
*
* @param null|int $width
* @param null|int $height
* @throws RuntimeException
@@ -496,6 +535,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* and do not exceed the original image width or height
*
* @link https://image.intervention.io/v3/modifying/resizing#scaling-images-but-do-not-exceed-the-original-size
*
* @param null|int $width
* @param null|int $height
* @throws RuntimeException
@@ -510,6 +550,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* to the desired size using the arguments
*
* @link https://image.intervention.io/v3/modifying/resizing#fitted-image-resizing
*
* @param int $width
* @param int $height
* @param string $position
@@ -522,6 +563,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Same as cover() but do not exceed the original image size
*
* @link https://image.intervention.io/v3/modifying/resizing#fitted-resizing-without-exceeding-the-original-size
*
* @param int $width
* @param int $height
* @param string $position
@@ -537,6 +579,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* new emerging areas.
*
* @link https://image.intervention.io/v3/modifying/resizing#resize-image-canvas
*
* @param null|int $width
* @param null|int $height
* @param string $position
@@ -557,6 +600,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* original image size.
*
* @link https://image.intervention.io/v3/modifying/resizing#resize-image-boundaries-relative-to-the-original
*
* @param null|int $width
* @param null|int $height
* @param string $position
@@ -581,6 +625,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* filled with the specified background color.
*
* @link https://image.intervention.io/v3/modifying/resizing#padded-image-resizing
*
* @param int $width
* @param int $height
* @param string $background
@@ -600,6 +645,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* up if the target size exceeds the original size.
*
* @link https://image.intervention.io/v3/modifying/resizing#padded-resizing-with-upscaling
*
* @param int $width
* @param int $height
* @param string $background
@@ -620,6 +666,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* to move the cutout by the given amount of pixels.
*
* @link https://image.intervention.io/v3/modifying/resizing#crop-image
*
* @param int $width
* @param int $height
* @param int $offset_x
@@ -642,6 +689,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Trim the image by removing border areas of similar color within a the given tolerance
*
* @link https://image.intervention.io/v3/modifying/resizing#trim-image
*
* @param int $tolerance
* @throws RuntimeException
* @throws AnimationException
@@ -653,6 +701,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Place another image into the current image instance
*
* @link https://image.intervention.io/v3/modifying/inserting
*
* @param mixed $element
* @param string $position
* @param int $offset_x
@@ -680,6 +729,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* If no coordinates are specified, the entire image area is filled.
*
* @link https://image.intervention.io/v3/modifying/drawing#fill-images-with-color
*
* @param mixed $color
* @param null|int $x
* @param null|int $y
@@ -692,6 +742,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Draw a single pixel at given position defined by the coordinates x and y in a given color.
*
* @link https://image.intervention.io/v3/modifying/drawing#drawing-a-pixel
*
* @param int $x
* @param int $y
* @param mixed $color
@@ -704,6 +755,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Draw a rectangle on the current image
*
* @link https://image.intervention.io/v3/modifying/drawing#drawing-a-rectangle
*
* @param int $x
* @param int $y
* @param callable|Closure|Rectangle $init
@@ -716,6 +768,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Draw ellipse on the current image
*
* @link https://image.intervention.io/v3/modifying/drawing#drawing-ellipses
*
* @param int $x
* @param int $y
* @param callable|Closure|Ellipse $init
@@ -728,6 +781,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Draw circle on the current image
*
* @link https://image.intervention.io/v3/modifying/drawing#drawing-a-circle
*
* @param int $x
* @param int $y
* @param callable|Closure|Circle $init
@@ -740,6 +794,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Draw a polygon on the current image
*
* @link https://image.intervention.io/v3/modifying/drawing#drawing-a-polygon
*
* @param callable|Closure|Polygon $init
* @throws RuntimeException
* @return ImageInterface
@@ -750,6 +805,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Draw a line on the current image
*
* @link https://image.intervention.io/v3/modifying/drawing#drawing-a-line
*
* @param callable|Closure|Line $init
* @throws RuntimeException
* @return ImageInterface
@@ -760,6 +816,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Draw a bezier curve on the current image
*
* @link https://image.intervention.io/v3/modifying/drawing#draw-bezier-curves
*
* @param callable|Closure|Bezier $init
* @throws RuntimeException
* @return ImageInterface
@@ -771,6 +828,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* will be encoded to the format of the originally read image.
*
* @link https://image.intervention.io/v3/basics/image-output#encode-images-by-media-mime-type
*
* @param null|string|MediaType $type
* @throws RuntimeException
* @return EncodedImageInterface
@@ -783,6 +841,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* originally read image.
*
* @link https://image.intervention.io/v3/basics/image-output#encode-images-by-file-extension
*
* @param null|string|FileExtension $extension
* @throws RuntimeException
* @return EncodedImageInterface
@@ -798,6 +857,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* the format of the originally read image.
*
* @link https://image.intervention.io/v3/basics/image-output#encode-images-by-file-path
*
* @param null|string $path
* @throws RuntimeException
* @return EncodedImageInterface
@@ -808,6 +868,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Encode image to JPEG format
*
* @link https://image.intervention.io/v3/basics/image-output#encoding-jpeg-format
*
* @param mixed $options
* @throws RuntimeException
* @return EncodedImageInterface
@@ -819,6 +880,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Encode image to Jpeg2000 format
*
* @link https://image.intervention.io/v3/basics/image-output#encoding-jpeg-2000-format
*
* @param mixed $options
* @throws RuntimeException
* @return EncodedImageInterface
@@ -829,6 +891,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Encode image to Webp format
*
* @link https://image.intervention.io/v3/basics/image-output#encoding-webp-format
*
* @param mixed $options
* @throws RuntimeException
* @return EncodedImageInterface
@@ -839,6 +902,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Encode image to PNG format
*
* @link https://image.intervention.io/v3/basics/image-output#encoding-png-format
*
* @param mixed $options
* @throws RuntimeException
* @return EncodedImageInterface
@@ -849,6 +913,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Encode image to GIF format
*
* @link https://image.intervention.io/v3/basics/image-output#encoding-gif-format
*
* @param mixed $options
* @throws RuntimeException
* @return EncodedImageInterface
@@ -859,6 +924,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Encode image to Bitmap format
*
* @link https://image.intervention.io/v3/basics/image-output#encoding-windows-bitmap-format
*
* @param mixed $options
* @throws RuntimeException
* @return EncodedImageInterface
@@ -869,6 +935,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Encode image to AVIF format
*
* @link https://image.intervention.io/v3/basics/image-output#encoding-av1-image-file-format-avif
*
* @param mixed $options
* @throws RuntimeException
* @return EncodedImageInterface
@@ -879,6 +946,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Encode image to TIFF format
*
* @link https://image.intervention.io/v3/basics/image-output#encoding-tiff-format
*
* @param mixed $options
* @throws RuntimeException
* @return EncodedImageInterface
@@ -889,6 +957,7 @@ interface ImageInterface extends IteratorAggregate, Countable
* Encode image to HEIC format
*
* @link https://image.intervention.io/v3/basics/image-output#encoding-heic-format
*
* @param mixed $options
* @throws RuntimeException
* @return EncodedImageInterface

View File

@@ -12,6 +12,7 @@ interface ImageManagerInterface
* Create new image instance with given width & height
*
* @link https://image.intervention.io/v3/basics/instantiation#creating-new-images
*
* @param int $width
* @param int $height
* @throws RuntimeException
@@ -43,6 +44,7 @@ interface ImageManagerInterface
* with all available decoders of the driver.
*
* @link https://image.intervention.io/v3/basics/instantiation#reading-images
*
* @param mixed $input
* @param string|array<string|DecoderInterface>|DecoderInterface $decoders
* @throws RuntimeException
@@ -54,6 +56,7 @@ interface ImageManagerInterface
* Create new animated image by given callback
*
* @link https://image.intervention.io/v3/basics/instantiation#creating-animations
*
* @param callable $init
* @throws RuntimeException
* @return ImageInterface

View File

@@ -10,8 +10,8 @@ use Intervention\Image\Interfaces\DrawableInterface;
class DrawRectangleModifier extends AbstractDrawModifier
{
/**
*
* Create new modifier object
*
* @param Rectangle $drawable
* @return void
*/

View File

@@ -72,8 +72,9 @@ class Font implements FontInterface
/**
* {@inheritdoc}
*
* @throws FontException
* @see FontInterface::setFilename()
*
* @throws FontException
*/
public function setFilename(string $filename): FontInterface
{

View File

@@ -26,8 +26,8 @@ abstract class ImagickTestCase extends BaseTestCase
*
* @param int $width
* @param int $height
* @return Image
* @throws ImagickException
* @return Image
*/
public static function createTestImage(int $width, int $height): Image
{