mirror of
https://github.com/Intervention/image.git
synced 2025-09-03 02:42:45 +02:00
Merge branch 'develop' into feature/standard-rules
This commit is contained in:
@@ -112,7 +112,7 @@ class Collection implements CollectionInterface, IteratorAggregate, Countable
|
|||||||
}
|
}
|
||||||
|
|
||||||
$positions = array_values($this->items);
|
$positions = array_values($this->items);
|
||||||
if (! array_key_exists($key, $positions)) {
|
if (!array_key_exists($key, $positions)) {
|
||||||
return $default;
|
return $default;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -21,7 +21,7 @@ class StringColorDecoder extends AbstractDecoder implements DecoderInterface
|
|||||||
*/
|
*/
|
||||||
public function decode(mixed $input): ImageInterface|ColorInterface
|
public function decode(mixed $input): ImageInterface|ColorInterface
|
||||||
{
|
{
|
||||||
if (! is_string($input)) {
|
if (!is_string($input)) {
|
||||||
throw new DecoderException('Unable to decode input');
|
throw new DecoderException('Unable to decode input');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -21,7 +21,7 @@ class StringColorDecoder extends AbstractDecoder implements DecoderInterface
|
|||||||
*/
|
*/
|
||||||
public function decode(mixed $input): ImageInterface|ColorInterface
|
public function decode(mixed $input): ImageInterface|ColorInterface
|
||||||
{
|
{
|
||||||
if (! is_string($input)) {
|
if (!is_string($input)) {
|
||||||
throw new DecoderException('Unable to decode input');
|
throw new DecoderException('Unable to decode input');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -21,7 +21,7 @@ class StringColorDecoder extends AbstractDecoder implements DecoderInterface
|
|||||||
*/
|
*/
|
||||||
public function decode(mixed $input): ImageInterface|ColorInterface
|
public function decode(mixed $input): ImageInterface|ColorInterface
|
||||||
{
|
{
|
||||||
if (! is_string($input)) {
|
if (!is_string($input)) {
|
||||||
throw new DecoderException('Unable to decode input');
|
throw new DecoderException('Unable to decode input');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -21,7 +21,7 @@ class HexColorDecoder extends AbstractDecoder implements DecoderInterface
|
|||||||
*/
|
*/
|
||||||
public function decode(mixed $input): ImageInterface|ColorInterface
|
public function decode(mixed $input): ImageInterface|ColorInterface
|
||||||
{
|
{
|
||||||
if (! is_string($input)) {
|
if (!is_string($input)) {
|
||||||
throw new DecoderException('Unable to decode input');
|
throw new DecoderException('Unable to decode input');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -161,7 +161,7 @@ class HtmlColornameDecoder extends HexColorDecoder implements DecoderInterface
|
|||||||
*/
|
*/
|
||||||
public function decode(mixed $input): ImageInterface|ColorInterface
|
public function decode(mixed $input): ImageInterface|ColorInterface
|
||||||
{
|
{
|
||||||
if (! is_string($input)) {
|
if (!is_string($input)) {
|
||||||
throw new DecoderException('Unable to decode input');
|
throw new DecoderException('Unable to decode input');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -12,7 +12,7 @@ class TransparentColorDecoder extends HexColorDecoder
|
|||||||
{
|
{
|
||||||
public function decode(mixed $input): ImageInterface|ColorInterface
|
public function decode(mixed $input): ImageInterface|ColorInterface
|
||||||
{
|
{
|
||||||
if (! is_string($input)) {
|
if (!is_string($input)) {
|
||||||
throw new DecoderException('Unable to decode input');
|
throw new DecoderException('Unable to decode input');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -41,7 +41,7 @@ class ColorProcessor implements ColorProcessorInterface
|
|||||||
|
|
||||||
public function nativeToColor(mixed $value): ColorInterface
|
public function nativeToColor(mixed $value): ColorInterface
|
||||||
{
|
{
|
||||||
if (! is_int($value)) {
|
if (!is_int($value)) {
|
||||||
throw new ColorException('GD driver can only decode colors in integer format.');
|
throw new ColorException('GD driver can only decode colors in integer format.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -13,7 +13,7 @@ class Base64ImageDecoder extends BinaryImageDecoder implements DecoderInterface
|
|||||||
{
|
{
|
||||||
public function decode(mixed $input): ImageInterface|ColorInterface
|
public function decode(mixed $input): ImageInterface|ColorInterface
|
||||||
{
|
{
|
||||||
if (! $this->isValidBase64($input)) {
|
if (!$this->isValidBase64($input)) {
|
||||||
throw new DecoderException('Unable to decode input');
|
throw new DecoderException('Unable to decode input');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -14,7 +14,7 @@ class ColorObjectDecoder extends AbstractDecoder implements DecoderInterface
|
|||||||
{
|
{
|
||||||
public function decode(mixed $input): ImageInterface|ColorInterface
|
public function decode(mixed $input): ImageInterface|ColorInterface
|
||||||
{
|
{
|
||||||
if (! is_a($input, ColorInterface::class)) {
|
if (!is_a($input, ColorInterface::class)) {
|
||||||
throw new DecoderException('Unable to decode input');
|
throw new DecoderException('Unable to decode input');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -19,7 +19,7 @@ class DataUriImageDecoder extends BinaryImageDecoder implements DecoderInterface
|
|||||||
|
|
||||||
$uri = $this->parseDataUri($input);
|
$uri = $this->parseDataUri($input);
|
||||||
|
|
||||||
if (! $uri->isValid()) {
|
if (!$uri->isValid()) {
|
||||||
throw new DecoderException('Unable to decode input');
|
throw new DecoderException('Unable to decode input');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -14,7 +14,7 @@ class ImageObjectDecoder extends AbstractDecoder implements DecoderInterface
|
|||||||
{
|
{
|
||||||
public function decode(mixed $input): ImageInterface|ColorInterface
|
public function decode(mixed $input): ImageInterface|ColorInterface
|
||||||
{
|
{
|
||||||
if (! is_a($input, ImageInterface::class)) {
|
if (!is_a($input, ImageInterface::class)) {
|
||||||
throw new DecoderException('Unable to decode input');
|
throw new DecoderException('Unable to decode input');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -14,7 +14,7 @@ class SplFileInfoImageDecoder extends FilePathImageDecoder implements DecoderInt
|
|||||||
{
|
{
|
||||||
public function decode(mixed $input): ImageInterface|ColorInterface
|
public function decode(mixed $input): ImageInterface|ColorInterface
|
||||||
{
|
{
|
||||||
if (! is_a($input, SplFileInfo::class)) {
|
if (!is_a($input, SplFileInfo::class)) {
|
||||||
throw new DecoderException('Unable to decode input');
|
throw new DecoderException('Unable to decode input');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -13,7 +13,7 @@ class Base64ImageDecoder extends BinaryImageDecoder implements DecoderInterface
|
|||||||
{
|
{
|
||||||
public function decode(mixed $input): ImageInterface|ColorInterface
|
public function decode(mixed $input): ImageInterface|ColorInterface
|
||||||
{
|
{
|
||||||
if (! $this->isValidBase64($input)) {
|
if (!$this->isValidBase64($input)) {
|
||||||
throw new DecoderException('Unable to decode input');
|
throw new DecoderException('Unable to decode input');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -14,7 +14,7 @@ class ColorObjectDecoder extends AbstractDecoder implements DecoderInterface
|
|||||||
{
|
{
|
||||||
public function decode(mixed $input): ImageInterface|ColorInterface
|
public function decode(mixed $input): ImageInterface|ColorInterface
|
||||||
{
|
{
|
||||||
if (! is_a($input, ColorInterface::class)) {
|
if (!is_a($input, ColorInterface::class)) {
|
||||||
throw new DecoderException('Unable to decode input');
|
throw new DecoderException('Unable to decode input');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -19,7 +19,7 @@ class DataUriImageDecoder extends BinaryImageDecoder implements DecoderInterface
|
|||||||
|
|
||||||
$uri = $this->parseDataUri($input);
|
$uri = $this->parseDataUri($input);
|
||||||
|
|
||||||
if (! $uri->isValid()) {
|
if (!$uri->isValid()) {
|
||||||
throw new DecoderException('Unable to decode input');
|
throw new DecoderException('Unable to decode input');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -14,7 +14,7 @@ class ImageObjectDecoder extends AbstractDecoder implements DecoderInterface
|
|||||||
{
|
{
|
||||||
public function decode(mixed $input): ImageInterface|ColorInterface
|
public function decode(mixed $input): ImageInterface|ColorInterface
|
||||||
{
|
{
|
||||||
if (! is_a($input, ImageInterface::class)) {
|
if (!is_a($input, ImageInterface::class)) {
|
||||||
throw new DecoderException('Unable to decode input');
|
throw new DecoderException('Unable to decode input');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -14,7 +14,7 @@ class SplFileInfoImageDecoder extends FilePathImageDecoder implements DecoderInt
|
|||||||
{
|
{
|
||||||
public function decode(mixed $input): ImageInterface|ColorInterface
|
public function decode(mixed $input): ImageInterface|ColorInterface
|
||||||
{
|
{
|
||||||
if (! is_a($input, SplFileInfo::class)) {
|
if (!is_a($input, SplFileInfo::class)) {
|
||||||
throw new DecoderException('Unable to decode input');
|
throw new DecoderException('Unable to decode input');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -8,7 +8,7 @@ use Intervention\Image\Colors\Cmyk\Channels\Cyan;
|
|||||||
use Intervention\Image\Colors\Cmyk\Channels\Key;
|
use Intervention\Image\Colors\Cmyk\Channels\Key;
|
||||||
use Intervention\Image\Colors\Cmyk\Channels\Magenta;
|
use Intervention\Image\Colors\Cmyk\Channels\Magenta;
|
||||||
use Intervention\Image\Colors\Cmyk\Channels\Yellow;
|
use Intervention\Image\Colors\Cmyk\Channels\Yellow;
|
||||||
use Intervention\Image\Colors\Cmyk\Color as Color;
|
use Intervention\Image\Colors\Cmyk\Color;
|
||||||
use Intervention\Image\Colors\Cmyk\Colorspace;
|
use Intervention\Image\Colors\Cmyk\Colorspace;
|
||||||
use Intervention\Image\Exceptions\ColorException;
|
use Intervention\Image\Exceptions\ColorException;
|
||||||
use Intervention\Image\Tests\TestCase;
|
use Intervention\Image\Tests\TestCase;
|
||||||
|
@@ -7,7 +7,7 @@ namespace Intervention\Image\Tests\Colors\Hsv;
|
|||||||
use Intervention\Image\Colors\Hsv\Channels\Hue;
|
use Intervention\Image\Colors\Hsv\Channels\Hue;
|
||||||
use Intervention\Image\Colors\Hsv\Channels\Saturation;
|
use Intervention\Image\Colors\Hsv\Channels\Saturation;
|
||||||
use Intervention\Image\Colors\Hsv\Channels\Value;
|
use Intervention\Image\Colors\Hsv\Channels\Value;
|
||||||
use Intervention\Image\Colors\Hsv\Color as Color;
|
use Intervention\Image\Colors\Hsv\Color;
|
||||||
use Intervention\Image\Colors\Hsv\Colorspace;
|
use Intervention\Image\Colors\Hsv\Colorspace;
|
||||||
use Intervention\Image\Exceptions\ColorException;
|
use Intervention\Image\Exceptions\ColorException;
|
||||||
use Intervention\Image\Tests\TestCase;
|
use Intervention\Image\Tests\TestCase;
|
||||||
|
@@ -9,7 +9,7 @@ use Intervention\Image\Colors\Cmyk\Colorspace as CmykColorspace;
|
|||||||
use Intervention\Image\Colors\Rgb\Channels\Red;
|
use Intervention\Image\Colors\Rgb\Channels\Red;
|
||||||
use Intervention\Image\Colors\Rgb\Channels\Green;
|
use Intervention\Image\Colors\Rgb\Channels\Green;
|
||||||
use Intervention\Image\Colors\Rgb\Channels\Blue;
|
use Intervention\Image\Colors\Rgb\Channels\Blue;
|
||||||
use Intervention\Image\Colors\Rgb\Color as Color;
|
use Intervention\Image\Colors\Rgb\Color;
|
||||||
use Intervention\Image\Colors\Rgb\Colorspace as RgbColorspace;
|
use Intervention\Image\Colors\Rgb\Colorspace as RgbColorspace;
|
||||||
use Intervention\Image\Exceptions\ColorException;
|
use Intervention\Image\Exceptions\ColorException;
|
||||||
use Intervention\Image\Tests\TestCase;
|
use Intervention\Image\Tests\TestCase;
|
||||||
|
Reference in New Issue
Block a user