Skip to content

Commit

Permalink
type test
Browse files Browse the repository at this point in the history
  • Loading branch information
faissaloux committed Mar 30, 2024
1 parent 5561bab commit c5beaee
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions types/AsNumericTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

declare(strict_types=1);

use function PHPStan\Testing\assertType;

$variable = random_int(0, 1) ? '7415541' : 'not numeric';
assertType('numeric', type($variable)->asNumeric());

0 comments on commit c5beaee

Please sign in to comment.