diff --git a/lib/RetailCrm/Methods/V5/Module.php b/lib/RetailCrm/Methods/V5/Module.php index 421e02d..6ca8893 100644 --- a/lib/RetailCrm/Methods/V5/Module.php +++ b/lib/RetailCrm/Methods/V5/Module.php @@ -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'