public static function requires(array $options, array $required = [])
    {
        foreach ($required as $key) {
            if (!array_key_exists(trim($key), $options)) {
                throw new InvalidArgumentException("Missing required parameter: {$key}");
            }
        }
    }
public static function requires(array $options, array $required = [])
    {
        foreach ($required as $key) {
            if (!array_key_exists(trim($key), $options)) {
                throw new InvalidArgumentException("Missing required parameter: {$key}");
            }
        }
    }
public static function requires ( array $ options , array $ required = [ ] ) { foreach ( $ required as $ key ) { if ( ! array_key_exists ( trim ( $ key ) , $ options ) ) { throw new InvalidArgumentException ( "Missing required parameter: {$key}" ) ; } } }
Check the array contains the required keys.

@param string[] $options
@param string[] $required

@throws \InvalidArgumentException

@return void
Check the array contains the required keys .