Skip to content

Installing generates false positive error with \assert() second argument #15

Description

@asgraf
\assert($variable instanceof SomeClass);

After installing this plugin code above will start displaying following error:

Required parameter '$description' missing

This is simply just not true.
Code above is completely valid, and second argument of assert function is completely optional
PHP documentation states:

if no description is provided, a default description equal to the source code for the invocation of assert() is provided. 

Source:
https://www.php.net/manual/en/function.assert.php#refsect1-function.assert-parameters

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

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions