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

Parameter default should be null and not a string. #137

Closed
OGKevin opened this issue Apr 7, 2018 · 0 comments
Closed

Parameter default should be null and not a string. #137

OGKevin opened this issue Apr 7, 2018 · 0 comments
Assignees
Labels
Projects
Milestone

Comments

@OGKevin
Copy link
Contributor

OGKevin commented Apr 7, 2018

public function save(string $fileName = self::FILENAME_CONFIG_DEFAULT)

Instead of giving the default value a proper value, it should be null. Instead the method body we will then check if the parameter is null or not.

This way, in other places we should not check if we are going to pass null or not. e.g.

if ($contextFileName === null) {
$context->save();
} else {
$context->save($contextFileName);
}

@OGKevin OGKevin added the bug label Apr 7, 2018
@OGKevin OGKevin added this to the 0.13.5 milestone Apr 7, 2018
@OGKevin OGKevin self-assigned this Apr 7, 2018
@OGKevin OGKevin added this to To do in 1.0.0 - SDK via automation Apr 7, 2018
@OGKevin OGKevin moved this from To do to pending review in 1.0.0 - SDK Apr 7, 2018
OGKevin added a commit that referenced this issue Apr 9, 2018
…function_parameter_bunq/sdk_php#137

Use null as default parameter value. (#137)
@OGKevin OGKevin closed this as completed Apr 9, 2018
1.0.0 - SDK automation moved this from pending review to Done Apr 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
1.0.0 - SDK
  
Done
Development

No branches or pull requests

1 participant