18
18
19
19
use DCarbone \ObjectMerge ;
20
20
21
+ if (!function_exists ('object_merge_value_undefined ' )) {
22
+ /**
23
+ * @param mixed $value
24
+ * @return bool
25
+ */
26
+ function object_merge_value_undefined ($ value )
27
+ {
28
+ return $ value === OBJECT_MERGE_UNDEFINED ;
29
+ }
30
+ }
31
+
21
32
if (!function_exists ('object_merge ' )) {
22
33
/**
23
- * @param stdClass $root
24
- * @param stdClass ...$others
34
+ * @param stdClass ...$objects
25
35
* @return stdClass
26
36
*/
27
- function object_merge (stdClass $ root , stdClass ...$ others )
37
+ function object_merge (stdClass ...$ objects )
28
38
{
29
- return ObjectMerge::merge ($ root , ... $ others );
39
+ return ObjectMerge::merge ($ objects );
30
40
}
31
41
}
32
- if (!function_exists ('object_merge_opts ' )) {
42
+ if (!function_exists ('object_merge_recursive ' )) {
33
43
/**
34
- * @param stdClass $root
35
- * @param int $opts
36
- * @param stdClass ...$others
44
+ * @param stdClass ...$objects
37
45
* @return stdClass
38
46
*/
39
- function object_merge_opts (stdClass $ root , $ opts , stdClass ...$ others )
47
+ function object_merge_recursive (stdClass ...$ objects )
40
48
{
41
- return ObjectMerge::mergeOpts ( $ root , $ opts , ... $ others );
49
+ return ObjectMerge::mergeRecursive ( $ objects );
42
50
}
43
51
}
44
- if (!function_exists ('object_merge_recursive ' )) {
52
+ if (!function_exists ('object_merge_opts ' )) {
45
53
/**
46
- * @param stdClass $root
47
- * @param stdClass ...$others
54
+ * @param int $opts
55
+ * @param stdClass ...$objects
48
56
* @return stdClass
49
57
*/
50
- function object_merge_recursive ( stdClass $ root , stdClass ...$ others )
58
+ function object_merge_opts ( $ opts , stdClass ...$ objects )
51
59
{
52
- return ObjectMerge::mergeRecursive ( $ root , ... $ others );
60
+ return ObjectMerge::mergeOpts ( $ opts , $ objects );
53
61
}
54
62
}
55
63
if (!function_exists ('object_merge_recursive_opts ' )) {
56
64
/**
57
- * @param stdClass $root
58
65
* @param int $opts
59
- * @param stdClass ...$others
66
+ * @param stdClass ...$objects
60
67
* @return stdClass
61
68
*/
62
- function object_merge_recursive_opts (stdClass $ root , $ opts , stdClass ...$ others )
69
+ function object_merge_recursive_opts ($ opts , stdClass ...$ objects )
63
70
{
64
- return ObjectMerge::mergeRecursiveOpts ($ root , $ opts , ... $ others );
71
+ return ObjectMerge::mergeRecursiveOpts ($ opts , $ objects );
65
72
}
66
73
}
0 commit comments