for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Extraload\Transformer;
class CallbackTransformer implements TransformerInterface
{
private $callback;
public function __construct(callable $callback)
$this->callback = $callback;
}
public function transform($data)
return call_user_func($this->callback, $data);