Qual: Fix api phan notices

This commit is contained in:
MDW
2025-03-03 14:23:57 +01:00
parent eac44b164a
commit f625f8de60
28 changed files with 229 additions and 121 deletions

View File

@@ -765,12 +765,15 @@ class Receptions extends DolibarrApi
/**
* Validate fields before create or update object
*
* @param array<string,mixed|mixed[]> $data Array with data to verify
* @param ?array<string,mixed|mixed[]> $data Array with data to verify
* @return array<string,mixed|mixed[]>
* @throws RestException
*/
private function _validate($data)
{
if ($data === null) {
$data = array();
}
$reception = array();
foreach (Receptions::$FIELDS as $field) {
if (!isset($data[$field])) {