| Total Complexity | 9 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Coverage | 44.44% |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 7 | trait StringRules |
||
| 8 | { |
||
| 9 | 1 | public function min(int $length) |
|
| 10 | { |
||
| 11 | 1 | return $this->rule("min:$length"); |
|
|
|
|||
| 12 | } |
||
| 13 | |||
| 14 | 1 | public function max(int $length) |
|
| 17 | } |
||
| 18 | |||
| 19 | 1 | public function email() |
|
| 20 | { |
||
| 21 | 1 | return $this->rule('email:rfc,dns'); |
|
| 22 | } |
||
| 23 | |||
| 24 | 1 | public function endsWith(string ...$values) |
|
| 25 | { |
||
| 26 | 1 | return $this->rule('ends_with:' . implode(',', $values)); |
|
| 27 | } |
||
| 28 | |||
| 29 | public function in(string ...$values) |
||
| 30 | { |
||
| 31 | return $this->rule('in:' . implode(',', $values)); |
||
| 32 | } |
||
| 33 | |||
| 34 | public function ip(){ |
||
| 35 | return $this->rule('ip'); |
||
| 36 | } |
||
| 37 | |||
| 38 | public function ipv4(){ |
||
| 40 | } |
||
| 41 | |||
| 42 | public function ipv6(){ |
||
| 43 | return $this->rule('ipv6'); |
||
| 44 | } |
||
| 45 | |||
| 46 | public function json(){ |
||
| 48 | } |
||
| 49 | } |