File tree Expand file tree Collapse file tree 7 files changed +29
-6
lines changed
Expand file tree Collapse file tree 7 files changed +29
-6
lines changed Original file line number Diff line number Diff line change 44
55namespace PhpTypedValues \Abstract \Bool ;
66
7+ use PhpTypedValues \Abstract \TypeInterface ;
8+
79/**
810 * @psalm-immutable
911 */
10- abstract readonly class BoolType implements BoolTypeInterface
12+ abstract readonly class BoolType implements TypeInterface, BoolTypeInterface
1113{
1214 abstract protected function __construct (bool $ value );
1315
Original file line number Diff line number Diff line change 88
99use DateTimeImmutable ;
1010use DateTimeZone ;
11+ use PhpTypedValues \Abstract \TypeInterface ;
1112use PhpTypedValues \Exception \DateTimeTypeException ;
1213use PhpTypedValues \Exception \ReasonableRangeDateTimeTypeException ;
1314
1718/**
1819 * @psalm-immutable
1920 */
20- abstract readonly class DateTimeType implements DateTimeTypeInterface
21+ abstract readonly class DateTimeType implements TypeInterface, DateTimeTypeInterface
2122{
2223 protected const FORMAT = '' ;
2324 protected const ZONE = 'UTC ' ;
Original file line number Diff line number Diff line change 44
55namespace PhpTypedValues \Abstract \Float ;
66
7+ use PhpTypedValues \Abstract \TypeInterface ;
78use PhpTypedValues \Exception \FloatTypeException ;
89
910use function sprintf ;
1011
1112/**
1213 * @psalm-immutable
1314 */
14- abstract readonly class FloatType implements FloatTypeInterface
15+ abstract readonly class FloatType implements TypeInterface, FloatTypeInterface
1516{
1617 /**
1718 * @throws FloatTypeException
Original file line number Diff line number Diff line change 44
55namespace PhpTypedValues \Abstract \Integer ;
66
7+ use PhpTypedValues \Abstract \TypeInterface ;
78use PhpTypedValues \Exception \IntegerTypeException ;
89
910use function sprintf ;
1011
1112/**
1213 * @psalm-immutable
1314 */
14- abstract readonly class IntType implements IntTypeInterface
15+ abstract readonly class IntType implements TypeInterface, IntTypeInterface
1516{
1617 /**
1718 * @throws IntegerTypeException
Original file line number Diff line number Diff line change 44
55namespace PhpTypedValues \Abstract \String ;
66
7+ use PhpTypedValues \Abstract \TypeInterface ;
8+
79/**
810 * @psalm-immutable
911 */
10- abstract readonly class StrType implements StrTypeInterface
12+ abstract readonly class StrType implements TypeInterface, StrTypeInterface
1113{
1214 public function toString (): string
1315 {
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace PhpTypedValues \Abstract ;
6+
7+ /**
8+ * @psalm-immutable
9+ */
10+ interface TypeInterface
11+ {
12+ // public function toString(): string;
13+ //
14+ // public function __toString(): string;
15+ }
Original file line number Diff line number Diff line change 44
55namespace PhpTypedValues \Abstract \Undefined ;
66
7+ use PhpTypedValues \Abstract \TypeInterface ;
78use PhpTypedValues \Exception \UndefinedTypeException ;
89
910/**
1314 *
1415 * @psalm-immutable
1516 */
16- abstract readonly class UndefinedType implements UndefinedTypeInterface
17+ abstract readonly class UndefinedType implements TypeInterface, UndefinedTypeInterface
1718{
1819 public static function create (): static
1920 {
You can’t perform that action at this time.
0 commit comments