mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-15 07:29:30 +00:00
Improved typing and phpdoc type annotations
This commit is contained in:
parent
3817ba774d
commit
b7c8ca2a48
39 changed files with 189 additions and 129 deletions
|
|
@ -57,7 +57,11 @@ class LogDiffFormatter
|
|||
]);
|
||||
}
|
||||
|
||||
private function diffNumeric($old_data, $new_data): string
|
||||
/**
|
||||
* @param numeric $old_data
|
||||
* @param numeric $new_data
|
||||
*/
|
||||
private function diffNumeric(int|float|string $old_data, int|float|string $new_data): string
|
||||
{
|
||||
if ((!is_numeric($old_data)) || (!is_numeric($new_data))) {
|
||||
throw new \InvalidArgumentException('The given data is not numeric.');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue