Skip to content

Parameter #2 $height of method Nette\Utils\Image::resize() expects int|string, null given. #207

@jfilla

Description

@jfilla

Version: v3.0.2#c133e18c922dcf3ad07673077d92d92cef25a148

Bug Description

Method Nette\Utils\Image::resize() has invalid input static types or documendation is not up to date. Both input arguments are int|string, but documentation claims, that you can pass null as well.

https://doc.nette.org/en/3.0/images#toc-image-resize

Steps To Reproduce

  1. use Nette\Utils\Image::resize(42, null)
  2. run phpstan

Expected Behavior

Method has valid types.

Possible Solution

Replace int|string with int|string|null or update documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions