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 DateTimeImmutable;
8use DateTimeInterface;
9use Stewart\Contracts\EventStream;
10use Stewart\Contracts\Exception\ExposureException;
11use Stewart\Contracts\Exposure\Command\DateCommand;
12
13/** @phpstan-import-type ExposedAttributes from ExposedEntity */
14interface ExposedDate extends ExposedEntity
15{
16    public function getConfig(): DateConfig;
17
18    /** @throws ExposureException */
19    public function updateConfig(DateConfig $config): void;
20
21    public function getValue(): ?DateTimeImmutable;
22
23    /**
24     * @param ExposedAttributes|null $attributes
25     * @throws ExposureException
26     */
27    public function setValue(?DateTimeInterface $value, ?array $attributes = null): void;
28
29    /** @return EventStream<DateCommand> */
30    public function watchCommands(): EventStream;
31}