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:
@@ -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);
|
||||||
}
|
}
|
||||||
|
@@ -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;
|
||||||
|
Reference in New Issue
Block a user