mirror of
https://github.com/Intervention/image.git
synced 2025-08-29 08:40:33 +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
|
||||
*
|
||||
* @return array
|
||||
* @return \Traversable
|
||||
*/
|
||||
public function getIterator()
|
||||
public function getIterator(): \Traversable
|
||||
{
|
||||
return new ArrayIterator($this->items);
|
||||
}
|
||||
|
@@ -15,7 +15,7 @@ class BrightnessModifier implements ModifierInterface
|
||||
public function apply(ImageInterface $image): ImageInterface
|
||||
{
|
||||
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;
|
||||
|
Reference in New Issue
Block a user