Add tap function

This commit is contained in:
Oliver Davies 2017-11-06 21:52:14 +00:00
parent 21d3dc49ff
commit e4c004d3ad
2 changed files with 9 additions and 1 deletions

View file

@ -24,7 +24,8 @@
"autoload": {
"psr-4": {
"FormatTalksBundle\\": "src/FormatTalksBundle"
}
},
"files": ["src/helpers.php"]
},
"extra": {
"merge-plugin": {

7
src/helpers.php Normal file
View file

@ -0,0 +1,7 @@
<?php
function tap($value, $callback) {
$callback($value);
return $value;
}