1 | <?php declare(strict_types=1); |
||
33 | trait Converters |
||
34 | { |
||
35 | /** |
||
36 | * @param RuleInterface|null $next |
||
37 | * |
||
38 | * @return RuleInterface |
||
39 | */ |
||
40 | 2 | protected static function stringToBool(RuleInterface $next = null): RuleInterface |
|
44 | |||
45 | /** |
||
46 | * @param string $format |
||
47 | * @param RuleInterface|null $next |
||
48 | * |
||
49 | * @return RuleInterface |
||
50 | */ |
||
51 | 2 | protected static function stringToDateTime(string $format, RuleInterface $next = null): RuleInterface |
|
55 | |||
56 | /** |
||
57 | * @param RuleInterface|null $next |
||
58 | * |
||
59 | * @return RuleInterface |
||
60 | */ |
||
61 | 2 | protected static function stringToFloat(RuleInterface $next = null): RuleInterface |
|
65 | |||
66 | /** |
||
67 | * @param RuleInterface|null $next |
||
68 | * |
||
69 | * @return RuleInterface |
||
70 | */ |
||
71 | 4 | protected static function stringToInt(RuleInterface $next = null): RuleInterface |
|
75 | |||
76 | /** |
||
77 | * @param RuleInterface|null $next |
||
78 | * |
||
79 | * @return RuleInterface |
||
80 | */ |
||
81 | 1 | protected static function stringArrayToIntArray(RuleInterface $next = null): RuleInterface |
|
85 | |||
86 | /** |
||
87 | * @param string $delimiter |
||
88 | * @param int $limit |
||
89 | * @param RuleInterface|null $next |
||
90 | * |
||
91 | * @return RuleInterface |
||
92 | */ |
||
93 | 1 | protected static function stringToArray( |
|
101 | } |
||
102 |