Skip to content

Wrong phpdocs for method lookup in interface UserProfileServiceInterface #258

@rolandsusans

Description

@rolandsusans

The bug reported 🐛

There is a typo in phpdocs here:

https://github.com/optimizely/php-sdk/blame/master/src/Optimizely/UserProfile/UserProfileServiceInterface.php#L26

Because there is no class with name userProfile.
Seems like intention was to specify UserProfile or array instead.

Background

In some case insensitive file systems, like MacOS APFS (default). It's impossible to have userProfile.php and UserProfile.php in same directory. Meanwhile in case sensitive file systems it's possible.

In my use case specifying return type hint as userProfile (by sdk) is causing issues when trying to add ignore configuration to ignoreErrors in phpstan-baseline.neon. During the execution of phpstan on each filesystem, the error list is different - because of case insensitivity and type specified in phpdocs.

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