Skip to content

Wrong types for tests of forbidden functions #3565

Closed

Description

@mainsmirnov

Describe the bug
In PHPStorm by JetBrains code highlights red, because he scanning vendor directory and find global functions in ForbiddenFunctionsUnitTest.inc. Exclude directory not helping.

Example:
Screenshot 2022-03-23 at 19 06 59

Code sample

function test(int $b) {}

$a = count([1]);
test($a);

Activity

  1. rodrigoprimo commented on Mar 3, 2026

    @rodrigoprimo

    This doesn't seem like a valid issue, and the associated PR was closed. I believe this issue should be closed as well.

  2. jrfnl commented on Mar 3, 2026

    @jrfnl
    Contributor

    Well, this issue was sort-of valid, as in: the underlying problem was the fact that the sniff tests from PHPCS were shipped with PHPCS. This was fixed in PHPCSStandards/PHP_CodeSniffer#993, which was included in the 4.0.0 release, so this issue now no longer exists.

  3. added this to the 4.0.0 milestone on Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions