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

Merge pull request #1138 from dlxmedia/next

Fixed deprecation warnings with PHP 8.1
This commit is contained in:
Oliver Vogel
2022-02-09 19:30:05 +01:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -31,9 +31,9 @@ class Collection implements CollectionInterface, IteratorAggregate, Countable
/** /**
* Returns Iterator * Returns Iterator
* *
* @return array * @return \Traversable
*/ */
public function getIterator() public function getIterator(): \Traversable
{ {
return new ArrayIterator($this->items); return new ArrayIterator($this->items);
} }

View File

@@ -15,7 +15,7 @@ class BrightnessModifier implements ModifierInterface
public function apply(ImageInterface $image): ImageInterface public function apply(ImageInterface $image): ImageInterface
{ {
foreach ($image as $frame) { foreach ($image as $frame) {
imagefilter($frame->getCore(), IMG_FILTER_BRIGHTNESS, ($this->level * 2.55)); imagefilter($frame->getCore(), IMG_FILTER_BRIGHTNESS, intval($this->level * 2.55));
} }
return $image; return $image;