Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add test fixture to skip default parameter value #57

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

scollovati
Copy link

Creates fixture for #36

@samsonasik
Copy link
Member

test seems green, are you sure it is not different rule or you're using latest version?

@scollovati
Copy link
Author

test seems green, are you sure it is not different rule or you're using latest version?

Let me check. I tried to replicate the example provided here #36 (comment), but probably I misunderstood how to properly create the fixture.

final class SkipDefault
{
public function dontSetParamValue(
string $Id
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no default value here, the method call bellow is invalid.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, added default value. Don't know if the Github Actions will automatically re-run

final class SkipDefault
{
public function dontSetParamValue(
string $Id = ''
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type should be union per issue example

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly I am not undestanding how to create the fixture. The bug reported is here: #36 (comment) and in that case the parameter has only one type (int in that case).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probaly the second one #36 (comment)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am trying to give you a fixture for the issue that I reported, i.e. the fact that a method called without setting the default value is reported as an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants