Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
IdentityUnitOfWork
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 run
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5namespace LambdaTwelve\OneRecord\Server;
6
7use LambdaTwelve\OneRecord\Server\Spi\UnitOfWork;
8
9/**
10 * No transaction at all: the work runs, nested or not. The default when a host
11 * gives no UnitOfWork, right for the in-memory stores, which have nothing to
12 * roll back.
13 */
14final class IdentityUnitOfWork implements UnitOfWork
15{
16    public function run(callable $work): mixed
17    {
18        return $work();
19    }
20}