Skip to content

IncorrectParamVarName: Problem with short and long types (int / integer) #1434

@alexz707

Description

@alexz707

Hi!
Version: 3.0.0RC4
Ubuntu - Jenkins

Problem:

I get a Warning: Expected "integer" but found "int" for parameter typ

`/**

  • Load video
  • @param int $gid Gid.
  • @return \stdClass
    */
    private function loadVideo(int $gid): \stdClass`

My phpcs.xml looks like this:
`

<!-- Include the whole PSR-2 standard -->
<rule ref="PSR2"/>

<description>My custom coding standard.</description>
<rule ref="Squiz.Commenting.FunctionComment">
    <exclude name="Squiz.Commenting.FunctionComment.MissingParamComment"/>
    <exclude name="Squiz.Commenting.FunctionComment.SpacingAfterParamType"/>
    <exclude name="Squiz.Commenting.FunctionComment.ThrowsNotCapital"/>
</rule>
<rule ref="Squiz.Commenting.FunctionCommentThrowTag" />
<rule ref="Squiz.Commenting.ClassComment">
    <exclude name="Squiz.Commenting.ClassComment.TagNotAllowed"/>
</rule>
<rule ref="Squiz.Commenting.VariableComment" />

`

Is this a bug or do I need to use another rule?

Thanks!

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