glastree_on_gitea
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace DirectoryTree\ImapEngine\Laravel\Support;
|
||||
|
||||
class Loop implements LoopInterface
|
||||
{
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function run(callable $tick): void
|
||||
{
|
||||
while (true) {
|
||||
$tick();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace DirectoryTree\ImapEngine\Laravel\Support;
|
||||
|
||||
class LoopFake implements LoopInterface
|
||||
{
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function run(callable $tick): void
|
||||
{
|
||||
$tick();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace DirectoryTree\ImapEngine\Laravel\Support;
|
||||
|
||||
interface LoopInterface
|
||||
{
|
||||
/**
|
||||
* Execute the loop.
|
||||
*/
|
||||
public function run(callable $tick): void;
|
||||
}
|
||||
Reference in New Issue
Block a user