feat(datetime): Introduce DateTime
component
#11040
Annotations
10 errors
InvalidPropertyAssignmentValue:
../src/Psl/DateTime/DateTime.php#L82
../src/Psl/DateTime/DateTime.php:82:22: InvalidPropertyAssignmentValue: $this->day with declared type 'int<1, 31>' cannot be assigned type 'int<1, max>' (see https://psalm.dev/145)
|
ImpureMethodCall:
../src/Psl/DateTime/DateTime.php#L107
../src/Psl/DateTime/DateTime.php:107:77: ImpureMethodCall: Cannot call an impure method from a pure context (see https://psalm.dev/203)
|
ImpureMethodCall:
../src/Psl/DateTime/DateTime.php#L136
../src/Psl/DateTime/DateTime.php:136:38: ImpureMethodCall: Cannot call a non-mutation-free method Psl\DateTime\DateTime::withTime from a pure context (see https://psalm.dev/203)
|
ImpureMethodCall:
../src/Psl/DateTime/DateTime.php#L162
../src/Psl/DateTime/DateTime.php:162:33: ImpureMethodCall: Cannot call an impure method from a pure context (see https://psalm.dev/203)
|
ImpureMethodCall:
../src/Psl/DateTime/DateTime.php#L211
../src/Psl/DateTime/DateTime.php:211:33: ImpureMethodCall: Cannot call an impure method from a pure context (see https://psalm.dev/203)
|
MissingThrowsDocblock:
../src/Psl/DateTime/DateTime.php#L376
../src/Psl/DateTime/DateTime.php:376:61: MissingThrowsDocblock: Psl\DateTime\Exception\UnderflowException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
|
MissingThrowsDocblock:
../src/Psl/DateTime/DateTime.php#L388
../src/Psl/DateTime/DateTime.php:388:61: MissingThrowsDocblock: Psl\DateTime\Exception\UnderflowException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
|
InvalidArgument:
../src/Psl/DateTime/DateTimeConvenienceMethodsTrait.php#L50
../src/Psl/DateTime/DateTimeConvenienceMethodsTrait.php:50:13: InvalidArgument: Argument 3 of Psl\DateTime\DateTime::fromParts expects int<1, 31>, but int<0, 31> provided (see https://psalm.dev/004)
|
InvalidArgument:
../src/Psl/DateTime/DateTimeConvenienceMethodsTrait.php#L73
../src/Psl/DateTime/DateTimeConvenienceMethodsTrait.php:73:13: InvalidArgument: Argument 3 of Psl\DateTime\DateTime::fromParts expects int<1, 31>, but int<0, 31> provided (see https://psalm.dev/004)
|
InvalidArgument:
../src/Psl/DateTime/DateTimeConvenienceMethodsTrait.php#L119
../src/Psl/DateTime/DateTimeConvenienceMethodsTrait.php:119:13: InvalidArgument: Argument 3 of Psl\DateTime\DateTime::fromParts expects int<1, 31>, but int<0, 31> provided (see https://psalm.dev/004)
|