File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
Expand file tree Collapse file tree 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
492492 return ($ this ->value === $ str );
493493 }
494494
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+
495515 /**
496516 * Checks if a string contains a given substring
497517 *
Original file line number Diff line number Diff line change @@ -57,6 +57,14 @@ Inp::value("Lorem ipsum dolor")->equal("Lorem ipsum dolor");
5757``` php
5858Inp::value("Lorem ipsum dolor")->notEqual("Lorem ipsum");
5959```
60+ - ** More than** :
61+ ``` php
62+ Inp::value(200)->moreThan(100);
63+ ```
64+ - ** Less than** :
65+ ``` php
66+ Inp::value(100)->lessThan(200);
67+ ```
6068- ** Contains** :
6169``` php
6270Inp::value("Lorem ipsum dolor")->contains("ipsum");
You can’t perform that action at this time.
0 commit comments