Lines n/a 0 / 0
Functions and Methods n/a 0 / 0
Classes and Traits n/a 0 / 0
Name Lines Functions and Methods CRAP Classes and Traits
1<?php
2
3declare(strict_types=1);
4
5namespace Stewart\Contracts\Exposure;
6
7use Stewart\Contracts\EventStream;
8use Stewart\Contracts\Exception\ExposureException;
9use Stewart\Contracts\Exposure\Command\NumberCommand;
10
11/** @phpstan-import-type ExposedAttributes from ExposedEntity */
12interface ExposedNumber extends ExposedEntity
13{
14    public function getConfig(): NumberConfig;
15
16    /** @throws ExposureException */
17    public function updateConfig(NumberConfig $config): void;
18
19    public function getValue(): int|float|null;
20
21    /**
22     * @param ExposedAttributes|null $attributes
23     * @throws ExposureException
24     */
25    public function setValue(int|float|null $value, ?array $attributes = null): void;
26
27    /** @return EventStream<NumberCommand> */
28    public function watchCommands(): EventStream;
29}