Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Detect nullable types in phpdoc #445

Merged
merged 2 commits into from
Jan 13, 2022
Merged

Detect nullable types in phpdoc #445

merged 2 commits into from
Jan 13, 2022

Conversation

BladeMF
Copy link
Contributor

@BladeMF BladeMF commented Oct 31, 2021

Description of the Change

Allow the following syntaxes in phpdoc:

/**
 * @param ?int description
 */
/**
 * @param ?int|?Class description
 */
/**
 * @param ?int[] description
 */

Alternate Designs

I am not aware of any other alternatives.

Benefits

Allow the new nullable type syntax.

Possible Drawbacks

Not aware of any drawbacks. The change is minor.

Applicable Issues

That is a step towards solving the need in this issue.

Note

That is my first pull request to this repo. It's purpose is to be something small that will allow me to learn how to do effective PRs here - learn the rules and pracices, set up the tooling.

My main goal is to ultimately add detection for:

  • Psalm complex array types
  • PHPStan comments (@phpstan-ignore-line)
  • PHPUnit attributes (@test, @dataProvider, etc.)

grammars/php.cson Show resolved Hide resolved
@KapitanOczywisty
Copy link
Contributor

@sadick254 this PR is ready to be merged :)

@darangi
Copy link
Contributor

darangi commented Jan 13, 2022

Thanks for the contribution 🙇🏾 @BladeMF

@darangi darangi merged commit 1aa8ddc into atom:master Jan 13, 2022
@BladeMF
Copy link
Contributor Author

BladeMF commented Jan 13, 2022

Thanks! More contributions incoming then :-)

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

Successfully merging this pull request may close these issues.

None yet

3 participants