1818
1919use DCarbone \ObjectMerge ;
2020
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+
2132if (!function_exists ('object_merge ' )) {
2233 /**
23- * @param stdClass $root
24- * @param stdClass ...$others
34+ * @param stdClass ...$objects
2535 * @return stdClass
2636 */
27- function object_merge (stdClass $ root , stdClass ...$ others )
37+ function object_merge (stdClass ...$ objects )
2838 {
29- return ObjectMerge::merge ($ root , ... $ others );
39+ return ObjectMerge::merge ($ objects );
3040 }
3141}
32- if (!function_exists ('object_merge_opts ' )) {
42+ if (!function_exists ('object_merge_recursive ' )) {
3343 /**
34- * @param stdClass $root
35- * @param int $opts
36- * @param stdClass ...$others
44+ * @param stdClass ...$objects
3745 * @return stdClass
3846 */
39- function object_merge_opts (stdClass $ root , $ opts , stdClass ...$ others )
47+ function object_merge_recursive (stdClass ...$ objects )
4048 {
41- return ObjectMerge::mergeOpts ( $ root , $ opts , ... $ others );
49+ return ObjectMerge::mergeRecursive ( $ objects );
4250 }
4351}
44- if (!function_exists ('object_merge_recursive ' )) {
52+ if (!function_exists ('object_merge_opts ' )) {
4553 /**
46- * @param stdClass $root
47- * @param stdClass ...$others
54+ * @param int $opts
55+ * @param stdClass ...$objects
4856 * @return stdClass
4957 */
50- function object_merge_recursive ( stdClass $ root , stdClass ...$ others )
58+ function object_merge_opts ( $ opts , stdClass ...$ objects )
5159 {
52- return ObjectMerge::mergeRecursive ( $ root , ... $ others );
60+ return ObjectMerge::mergeOpts ( $ opts , $ objects );
5361 }
5462}
5563if (!function_exists ('object_merge_recursive_opts ' )) {
5664 /**
57- * @param stdClass $root
5865 * @param int $opts
59- * @param stdClass ...$others
66+ * @param stdClass ...$objects
6067 * @return stdClass
6168 */
62- function object_merge_recursive_opts (stdClass $ root , $ opts , stdClass ...$ others )
69+ function object_merge_recursive_opts ($ opts , stdClass ...$ objects )
6370 {
64- return ObjectMerge::mergeRecursiveOpts ($ root , $ opts , ... $ others );
71+ return ObjectMerge::mergeRecursiveOpts ($ opts , $ objects );
6572 }
6673}
0 commit comments