Skip to content

mb_detect_order without arguments never returns bool #8922

Description

@InvisibleSmiley

Feature request

PHPStan should infer the type that mb_detect_order returns from the given parameters.

https://www.php.net/manual/en/function.mb-detect-order.php

When setting the encoding detection order, true is returned on success or false on failure.

When getting the encoding detection order, an ordered array of the encodings is returned.

FTR I first reported this as issue #8921 and find that the automatic bot reaction is very rude. I feel this is a good example how to needlessly repel users who just want to report a problem and are not 100% familiar with the way you handle things here. The template "Function signature mismatch" includes only a comment so I guess there is no way to produce anything but an issue that gets closed automatically by the bot. Very bad UX. I hope this is now the correct way to report the issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions