for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Zenstruck\Callback;
/**
* @author Kevin Bond <[email protected]>
*/
final class ValueFactory
{
/** @var callable */
private $factory;
public function __construct(callable $factory)
$this->factory = $factory;
}
public function __invoke(?string $type)
return ($this->factory)($type);