1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-26 07:14:31 +02:00

Add mixed type hints

This commit is contained in:
Oliver Vogel
2025-06-01 07:57:27 +02:00
parent 3838f28903
commit 2af1ea158f
4 changed files with 6 additions and 6 deletions

View File

@@ -47,7 +47,7 @@ class Frame extends AbstractFrame implements FrameInterface
*
* @see FrameInterface::setNative()
*/
public function setNative($native): FrameInterface
public function setNative(mixed $native): FrameInterface
{
$this->native = $native;

View File

@@ -50,7 +50,7 @@ class Core implements CoreInterface, Iterator
*
* @see CollectionInterface::push()
*/
public function push($item): CollectionInterface
public function push(mixed $item): CollectionInterface
{
return $this->add($item);
}
@@ -60,7 +60,7 @@ class Core implements CoreInterface, Iterator
*
* @see CollectionInterface::get()
*/
public function get(int|string $key, $default = null): mixed
public function get(int|string $key, mixed $default = null): mixed
{
try {
$this->imagick->setIteratorIndex($key);
@@ -76,7 +76,7 @@ class Core implements CoreInterface, Iterator
*
* @see CollectionInterface::getAtPosition()
*/
public function getAtPosition(int $key = 0, $default = null): mixed
public function getAtPosition(int $key = 0, mixed $default = null): mixed
{
return $this->get($key, $default);
}

View File

@@ -46,7 +46,7 @@ class Frame extends AbstractFrame implements FrameInterface
*
* @see DriverInterface::setNative()
*/
public function setNative($native): FrameInterface
public function setNative(mixed $native): FrameInterface
{
$this->native = $native;

View File

@@ -89,7 +89,7 @@ class InputHandler implements InputHandlerInterface
*
* @see InputHandlerInterface::handle()
*/
public function handle($input): ImageInterface|ColorInterface
public function handle(mixed $input): ImageInterface|ColorInterface
{
foreach ($this->decoders as $decoder) {
try {