1
0
mirror of synced 2024-11-25 14:56:07 +03:00

check code parameter in update-scopes method

This commit is contained in:
Vladimir Kolchin 2023-01-20 08:40:15 +01:00
parent f3db3fdb63
commit a95ec22823

View File

@ -88,6 +88,12 @@ trait Module
*/
public function integrationModulesUpdateScopes($code, array $requires)
{
if (empty($code)) {
throw new \InvalidArgumentException(
'Parameter `code` must be set'
);
}
if (!count($requires) || empty($requires['scopes'])) {
throw new \InvalidArgumentException(
'Parameter `requires` must contains a data & configuration `scopes` must be set'