mirror of
https://github.com/Intervention/image.git
synced 2025-08-26 15:24:37 +02:00
Add mixed type hints
This commit is contained in:
@@ -47,7 +47,7 @@ class Frame extends AbstractFrame implements FrameInterface
|
|||||||
*
|
*
|
||||||
* @see FrameInterface::setNative()
|
* @see FrameInterface::setNative()
|
||||||
*/
|
*/
|
||||||
public function setNative($native): FrameInterface
|
public function setNative(mixed $native): FrameInterface
|
||||||
{
|
{
|
||||||
$this->native = $native;
|
$this->native = $native;
|
||||||
|
|
||||||
|
@@ -50,7 +50,7 @@ class Core implements CoreInterface, Iterator
|
|||||||
*
|
*
|
||||||
* @see CollectionInterface::push()
|
* @see CollectionInterface::push()
|
||||||
*/
|
*/
|
||||||
public function push($item): CollectionInterface
|
public function push(mixed $item): CollectionInterface
|
||||||
{
|
{
|
||||||
return $this->add($item);
|
return $this->add($item);
|
||||||
}
|
}
|
||||||
@@ -60,7 +60,7 @@ class Core implements CoreInterface, Iterator
|
|||||||
*
|
*
|
||||||
* @see CollectionInterface::get()
|
* @see CollectionInterface::get()
|
||||||
*/
|
*/
|
||||||
public function get(int|string $key, $default = null): mixed
|
public function get(int|string $key, mixed $default = null): mixed
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$this->imagick->setIteratorIndex($key);
|
$this->imagick->setIteratorIndex($key);
|
||||||
@@ -76,7 +76,7 @@ class Core implements CoreInterface, Iterator
|
|||||||
*
|
*
|
||||||
* @see CollectionInterface::getAtPosition()
|
* @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);
|
return $this->get($key, $default);
|
||||||
}
|
}
|
||||||
|
@@ -46,7 +46,7 @@ class Frame extends AbstractFrame implements FrameInterface
|
|||||||
*
|
*
|
||||||
* @see DriverInterface::setNative()
|
* @see DriverInterface::setNative()
|
||||||
*/
|
*/
|
||||||
public function setNative($native): FrameInterface
|
public function setNative(mixed $native): FrameInterface
|
||||||
{
|
{
|
||||||
$this->native = $native;
|
$this->native = $native;
|
||||||
|
|
||||||
|
@@ -89,7 +89,7 @@ class InputHandler implements InputHandlerInterface
|
|||||||
*
|
*
|
||||||
* @see InputHandlerInterface::handle()
|
* @see InputHandlerInterface::handle()
|
||||||
*/
|
*/
|
||||||
public function handle($input): ImageInterface|ColorInterface
|
public function handle(mixed $input): ImageInterface|ColorInterface
|
||||||
{
|
{
|
||||||
foreach ($this->decoders as $decoder) {
|
foreach ($this->decoders as $decoder) {
|
||||||
try {
|
try {
|
||||||
|
Reference in New Issue
Block a user