Add CallableProvider trait for tests
This commit is contained in:
13
src/Tests/Tools/CallableProvider.php
Normal file
13
src/Tests/Tools/CallableProvider.php
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user