Add CallableProvider trait for tests

This commit is contained in:
joopschilder committed 2020-12-14 12:56:41 +01:00
1 parent af2708e7e8
commit dd48e20b8f
1 file changed
+13
+13
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;
}
}