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

(NFC) Correct type hints for bad null default values #22600

Merged
merged 1 commit into from
Jan 22, 2022

Conversation

braders
Copy link
Contributor

@braders braders commented Jan 22, 2022

Overview

Correct type hints for bad null default values.

I've been trying to get rid of cases where the phpdoc has been defaulted to null, despite an actual value being expected in most cases (e.g. @param null $title, where $title is not always expected to be null). These were added in bulk based on the default argument several years ago.

Before

Bad types in PHPDoc comments.

After

Fewer bad docs (there are still a few other tricker examples of this which should be tackled seperately).

Comments

I've just been searching for @param null and working through the list. In some cases the default value is null but I've not included null in the PHPDoc because in practice a proper value is always expected. These could be tidied up at a later date (e.g. to change the default value).

@civibot
Copy link

civibot bot commented Jan 22, 2022

(Standard links)

@colemanw
Copy link
Member

👍

@colemanw colemanw merged commit e234ed4 into civicrm:master Jan 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants