for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Mvkasatkin\typecast\type;
class TypeClosure implements CastInterface
{
/**
* @var \Closure
*/
protected $closure;
* @param \Closure $closure
public function __construct(\Closure $closure)
$this->closure = $closure;
}
* @param $value
*
* @return mixed
public function cast($value)
return ($this->closure)($value);