Add CallableProvider trait for tests

This commit is contained in:
Joop Schilder 2020-12-14 12:56:41 +01:00
parent af2708e7e8
commit dd48e20b8f

View File

@ -0,0 +1,13 @@
<?php
namespace Toalett\Multiprocessing\Tests\Tools;
trait CallableProvider
{
protected static function emptyCallable(): callable
{
static $fn = null;
$fn ??= static fn() => null;
return $fn;
}
}