Total Complexity | 3 |
Total Lines | 26 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
10 | class ObserverCallable implements SplObserver |
||
11 | { |
||
12 | /** @var callable(SplSubject):void */ |
||
13 | private $callable; |
||
14 | |||
15 | /** |
||
16 | * ObserverCallable constructor. |
||
17 | * |
||
18 | * @param callable(SplSubject):void $callable |
||
19 | */ |
||
20 | 2 | public function __construct(callable $callable) |
|
23 | } |
||
24 | |||
25 | 1 | public function update(SplSubject $subject): void |
|
28 | } |
||
29 | |||
30 | /** |
||
31 | * @return callable(SplSubject):void |
||
32 | */ |
||
33 | 1 | public function getCallable(): callable |
|
38 |