File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ abstract class TcpPort extends AbstractValueObject
1414 */
1515 protected function guard ($ value )
1616 {
17- if (false === filter_var ($ value, FILTER_VALIDATE_INT )) {
17+ if (! is_int ($ value )) {
1818 throw new InvalidTcpPortException ($ value );
1919 }
2020
Original file line number Diff line number Diff line change 22
33namespace PhpValueObjects \Tests \Network ;
44
5- use PhpValueObjects \Network \Exception \InvalidIpv6Exception ;
65use PhpValueObjects \Network \Exception \InvalidTcpPortException ;
76use PhpValueObjects \Tests \BaseUnitTestCase ;
87
@@ -27,6 +26,7 @@ public function invalidTcpPortProvider()
2726 {
2827 return [
2928 [null ],
29+ [11362.0 ],
3030 [$ this ->faker ()->randomFloat ()],
3131 [$ this ->faker ()->numberBetween (65536 )],
3232 [-$ this ->faker ()->numberBetween ()],
You can’t perform that action at this time.
0 commit comments