Skip to content

Commit

Permalink
add null to cast() parameter and return types
Browse files Browse the repository at this point in the history
  • Loading branch information
gregor-j committed Jul 25, 2024
1 parent 7ab8992 commit d16f516
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/Api/IMember.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ public function getName(): string;

/**
* Cast a value according to this class.
* @param float|bool|int|string $value The output to typecast.
* @return bool|int|float|string|SapDateTime|SapDateInterval
* @param float|bool|int|string $value The output to typecast.
* @return null|bool|int|float|string|SapDateTime|SapDateInterval
* @throws IInvalidArgumentException
*/
public function cast(bool|int|float|string $value): bool|int|float|string|SapDateTime|SapDateInterval;
public function cast(null|bool|int|float|string $value): null|bool|int|float|string|SapDateTime|SapDateInterval;
}
4 changes: 2 additions & 2 deletions src/Api/IValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ public function isOptional(): bool;
/**
* Cast a given value according to this class.
* @param float|bool|int|string $value The value to typecast.
* @return bool|int|float|string|SapDateTime|SapDateInterval
* @return null|bool|int|float|string|SapDateTime|SapDateInterval
* @throws IInvalidArgumentException
*/
public function cast(bool|int|float|string $value): bool|int|float|string|SapDateTime|SapDateInterval;
public function cast(null|bool|int|float|string $value): null|bool|int|float|string|SapDateTime|SapDateInterval;
}

0 comments on commit d16f516

Please sign in to comment.