File tree 2 files changed +28
-0
lines changed
2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -492,6 +492,26 @@ public function equal($str): bool
492
492
return ($ this ->value === $ str );
493
493
}
494
494
495
+ /**
496
+ * IF value is less than to parameter
497
+ * @param $num
498
+ * @return bool
499
+ */
500
+ public function lessThan ($ num ): bool
501
+ {
502
+ return ($ this ->value < (float )$ num );
503
+ }
504
+
505
+ /**
506
+ * IF value is more than to parameter
507
+ * @param $num
508
+ * @return bool
509
+ */
510
+ public function moreThan ($ num ): bool
511
+ {
512
+ return ($ this ->value > (float )$ num );
513
+ }
514
+
495
515
/**
496
516
* Checks if a string contains a given substring
497
517
*
Original file line number Diff line number Diff line change @@ -57,6 +57,14 @@ Inp::value("Lorem ipsum dolor")->equal("Lorem ipsum dolor");
57
57
``` php
58
58
Inp::value("Lorem ipsum dolor")->notEqual("Lorem ipsum");
59
59
```
60
+ - ** More than** :
61
+ ``` php
62
+ Inp::value(200)->moreThan(100);
63
+ ```
64
+ - ** Less than** :
65
+ ``` php
66
+ Inp::value(100)->lessThan(200);
67
+ ```
60
68
- ** Contains** :
61
69
``` php
62
70
Inp::value("Lorem ipsum dolor")->contains("ipsum");
You can’t perform that action at this time.
0 commit comments