Skip to content

Commit

Permalink
Merge d1d255e into 74453ad
Browse files Browse the repository at this point in the history
  • Loading branch information
theofidry committed Sep 5, 2017
2 parents 74453ad + d1d255e commit c6b0218
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
5 changes: 4 additions & 1 deletion composer.json
Expand Up @@ -6,7 +6,10 @@
"homepage": "https://github.com/myclabs/DeepCopy",
"license": "MIT",
"autoload": {
"psr-4": { "DeepCopy\\": "src/DeepCopy/" }
"psr-4": { "DeepCopy\\": "src/DeepCopy/" },
"files": [
"src/DeepCopy/deep_copy.php"
]
},
"autoload-dev": {
"psr-4": { "DeepCopyTest\\": "tests/DeepCopyTest/" }
Expand Down
16 changes: 16 additions & 0 deletions src/DeepCopy/deep_copy.php
@@ -0,0 +1,16 @@
<?php

namespace DeepCopy;

/**
* Deep copy the given value.
*
* @param mixed $value
* @param bool $useCloneMethod
*
* @return mixed
*/
function deep_copy($value, $useCloneMethod = false)
{
return (new DeepCopy($useCloneMethod))->copy($value);
}

0 comments on commit c6b0218

Please sign in to comment.