File tree Expand file tree Collapse file tree 4 files changed +22
-5
lines changed Expand file tree Collapse file tree 4 files changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -12,3 +12,4 @@ c709aedfb70105dd006ffbbbf8f82d9716db9614
12
12
c10c3ac2613e54de290a9135afe024036174ef20
13
13
aef6f8b59ab2ff054b1a823efe242e0cb0cd1164
14
14
d521d82e9b14a5f411f3492529800c6b39f17740
15
+ 11b88b5f8641574fc93d2a4f443aeaf819381c91
Original file line number Diff line number Diff line change
1
+ # v2.0.0
2
+
3
+ - Objects\Value
4
+ - This class will be removed in v2.0.0. Use their function counterparts instead.
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- use EncoreDigitalGroup \StdLib \Objects \Value ;
4
-
5
3
if (!function_exists ('not_null ' )) {
6
4
function not_null (mixed $ value ): bool
7
5
{
8
- return Value:: notNull ($ value );
6
+ return ! is_null ($ value );
9
7
}
10
8
}
11
9
12
10
if (!function_exists ('val_not_null ' )) {
11
+ /** @deprecated Use not_null() instead. */
13
12
function val_not_null (mixed $ value ): bool
14
13
{
15
- return Value:: notNull ($ value );
14
+ return not_null ($ value );
16
15
}
17
16
}
18
17
19
18
if (!function_exists ('val_transform_bool ' )) {
19
+ /** @deprecated Use validate_bool() instead. */
20
20
function val_transform_bool (mixed $ value ): bool
21
21
{
22
- return Value::transformBool ($ value );
22
+ return validate_bool ($ value );
23
+ }
24
+ }
25
+
26
+ if (!function_exists ('validate_bool ' )) {
27
+ function validate_bool (mixed $ value ): bool
28
+ {
29
+ return filter_var ($ value , FILTER_VALIDATE_BOOLEAN );
23
30
}
24
31
}
Original file line number Diff line number Diff line change 2
2
3
3
namespace EncoreDigitalGroup \StdLib \Objects ;
4
4
5
+ use EncoreDigitalGroup \StdLib \Attributes \Deprecated ;
6
+
5
7
/**
6
8
* @api
7
9
*
10
+ * @deprecated
11
+ *
8
12
* @internal
9
13
*/
14
+ #[Deprecated]
10
15
class Value
11
16
{
12
17
public static function notNull (mixed $ value ): bool
You can’t perform that action at this time.
0 commit comments