|
14 | 14 |
|
15 | 15 | final class Strictus |
16 | 16 | { |
17 | | - /** |
18 | | - * @param mixed $string |
19 | | - * @param bool $nullable |
20 | | - * @return StrictusString |
21 | | - */ |
22 | 17 | public static function string(mixed $string, bool $nullable = false): StrictusString |
23 | 18 | { |
24 | 19 | return new StrictusString($string, $nullable); |
25 | 20 | } |
26 | 21 |
|
27 | | - /** |
28 | | - * @param mixed $string |
29 | | - * @return StrictusString |
30 | | - */ |
31 | 22 | public static function nullableString(mixed $string): StrictusString |
32 | 23 | { |
33 | 24 | return new StrictusString($string, true); |
34 | 25 | } |
35 | 26 |
|
36 | | - /** |
37 | | - * @param mixed $integer |
38 | | - * @param bool $nullable |
39 | | - * @return StrictusInteger |
40 | | - */ |
41 | 27 | public static function int(mixed $integer, bool $nullable = false): StrictusInteger |
42 | 28 | { |
43 | 29 | return new StrictusInteger($integer, $nullable); |
44 | 30 | } |
45 | 31 |
|
46 | | - /** |
47 | | - * @param mixed $integer |
48 | | - * @return StrictusInteger |
49 | | - */ |
50 | 32 | public static function nullableInt(mixed $integer): StrictusInteger |
51 | 33 | { |
52 | 34 | return new StrictusInteger($integer, true); |
53 | 35 | } |
54 | 36 |
|
55 | | - /** |
56 | | - * @param mixed $float |
57 | | - * @param bool $nullable |
58 | | - * @return StrictusFloat |
59 | | - */ |
60 | 37 | public static function float(mixed $float, bool $nullable = false): StrictusFloat |
61 | 38 | { |
62 | 39 | return new StrictusFloat($float, $nullable); |
63 | 40 | } |
64 | 41 |
|
65 | | - /** |
66 | | - * @param mixed $float |
67 | | - * @return StrictusFloat |
68 | | - */ |
69 | 42 | public static function nullableFloat(mixed $float): StrictusFloat |
70 | 43 | { |
71 | 44 | return new StrictusFloat($float, true); |
72 | 45 | } |
73 | 46 |
|
74 | | - /** |
75 | | - * @param mixed $boolean |
76 | | - * @param bool $nullable |
77 | | - * @return StrictusBoolean |
78 | | - */ |
79 | 47 | public static function bool(mixed $boolean, bool $nullable = false): StrictusBoolean |
80 | 48 | { |
81 | 49 | return new StrictusBoolean($boolean, $nullable); |
82 | 50 | } |
83 | 51 |
|
84 | | - /** |
85 | | - * @param mixed $boolean |
86 | | - * @return StrictusBoolean |
87 | | - */ |
88 | 52 | public static function nullableBool(mixed $boolean): StrictusBoolean |
89 | 53 | { |
90 | 54 | return new StrictusBoolean($boolean, true); |
91 | 55 | } |
92 | 56 |
|
93 | | - /** |
94 | | - * @param mixed $array |
95 | | - * @param bool $nullable |
96 | | - * @return StrictusArray |
97 | | - */ |
98 | 57 | public static function array(mixed $array, bool $nullable = false): StrictusArray |
99 | 58 | { |
100 | 59 | return new StrictusArray($array, $nullable); |
101 | 60 | } |
102 | 61 |
|
103 | | - /** |
104 | | - * @param mixed $array |
105 | | - * @return StrictusArray |
106 | | - */ |
107 | 62 | public static function nullableArray(mixed $array): StrictusArray |
108 | 63 | { |
109 | 64 | return new StrictusArray($array, true); |
110 | 65 | } |
111 | 66 |
|
112 | | - /** |
113 | | - * @param mixed $object |
114 | | - * @param bool $nullable |
115 | | - * @return StrictusObject |
116 | | - */ |
117 | 67 | public static function object(mixed $object, bool $nullable = false): StrictusObject |
118 | 68 | { |
119 | 69 | return new StrictusObject($object, $nullable); |
120 | 70 | } |
121 | 71 |
|
122 | | - /** |
123 | | - * @param mixed $object |
124 | | - * @return StrictusObject |
125 | | - */ |
126 | 72 | public static function nullableObject(mixed $object): StrictusObject |
127 | 73 | { |
128 | 74 | return new StrictusObject($object, true); |
129 | 75 | } |
130 | 76 |
|
131 | | - /** |
132 | | - * @param string $instanceType |
133 | | - * @param mixed $instance |
134 | | - * @param bool $nullable |
135 | | - * @return StrictusInstance |
136 | | - */ |
137 | 77 | public static function instance(string $instanceType, mixed $instance, bool $nullable = false): StrictusInstance |
138 | 78 | { |
139 | 79 | return new StrictusInstance($instanceType, $instance, $nullable); |
140 | 80 | } |
141 | 81 |
|
142 | | - /** |
143 | | - * @param string $instanceType |
144 | | - * @param mixed $instance |
145 | | - * @return StrictusInstance |
146 | | - */ |
147 | 82 | public static function nullableInstance(string $instanceType, mixed $instance): StrictusInstance |
148 | 83 | { |
149 | 84 | return new StrictusInstance($instanceType, $instance, true); |
|
0 commit comments