-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NEW Init externalModules Class to Fetch Modules from Multiple Sources #33156
NEW Init externalModules Class to Fetch Modules from Multiple Sources #33156
Conversation
if (!isset($a[$key]) || !isset($b[$key])) { | ||
return 0; | ||
} | ||
/** @var array<string, mixed> $a */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to define these as parameters of a function, just before function.
return
/**
* @param ...
* @param ...
* @return
*/
function()...
$error_message = $error_messages[$request['status_code']] ?? 'Unexpected HTTP status: ' . $request['status_code']; | ||
|
||
// Append error details if available | ||
if (!empty($request['response']) && isset($request['response']['errors']) && is_array($request['response']['errors'])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is indicated that 'response' is a string. So to fix that you need to suggest it is response:?array{errors:string[]}
or response:null|string|array{errors:string[]}
if it can also be a string.
Thanks @mdeweerd ! |
This PR initializes the externalModules class to fetch modules from multiple sources and adapts it to the new Dolistore API