Skip to content

Commit

Permalink
ForbidNotNormalizedTypeRule: add testcase for never (#194)
Browse files Browse the repository at this point in the history
  • Loading branch information
janedbal committed Dec 19, 2023
1 parent 103bad2 commit baa841c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/Rule/data/ForbidNotNormalizedTypeRule/code.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ class Example
*/
public $c;

/**
* @var never|null // error: Found non-normalized type (never | null): never is a subtype of null.
*/
public $d;

/**
* @var I&(A|B) // error: Found non-normalized type (I & (A | B)): this is not disjunctive normal form, use (ForbidNotNormalizedTypeRule\A&ForbidNotNormalizedTypeRule\I)|(ForbidNotNormalizedTypeRule\B&ForbidNotNormalizedTypeRule\I)
*/
Expand Down

0 comments on commit baa841c

Please sign in to comment.