Skip to content

Commit

Permalink
IntegerRangeType - test edgecase
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Jul 30, 2021
1 parent d218134 commit 5f494f9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/PHPStan/Analyser/data/integer-range-types.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,18 @@ class X {
*/
public $error2;

/**
* @var int<min, max>
*/
public $int;

public function supportsPhpdocIntegerRange() {
assertType('int<0, 100>', $this->percentage);
assertType('int<min, 100>', $this->min);
assertType('int<0, max>', $this->max);

assertType('*ERROR*', $this->error1);
assertType('*ERROR*', $this->error2);
assertType('int', $this->int);
}
}

0 comments on commit 5f494f9

Please sign in to comment.