public static function config($key, $value = null)
    {
        if (is_string($key)) {
            static::$config[$key] = $value;

            return;
        }

        if (!is_array($key)) {
            throw new InvalidArgumentException('Only string and array can be passed to config.');
        }

        foreach ($key as $name => $value) {
            static::$config[$name] = $value;
        }

        return;
    }
public static function config($key, $value = null)
    {
        if (is_string($key)) {
            static::$config[$key] = $value;

            return;
        }

        if (!is_array($key)) {
            throw new InvalidArgumentException('Only string and array can be passed to config.');
        }

        foreach ($key as $name => $value) {
            static::$config[$name] = $value;
        }

        return;
    }
public static function config ( $ key , $ value = null ) { if ( is_string ( $ key ) ) { static :: $ config [ $ key ] = $ value ; return ; } if ( ! is_array ( $ key ) ) { throw new InvalidArgumentException ( 'Only string and array can be passed to config.' ) ; } foreach ( $ key as $ name => $ value ) { static :: $ config [ $ name ] = $ value ; } return ; }
This method can be used to define configuration.

### Usage

Writing config data:

```
Message::config('message', 'hi');
```

Writing multiple config data at once:

```
Message::config(['message' => 'hi', 'commandCode' => '!']);
```

@param string|array $key The name of the configuration to read, or an array of multiple configs.

@return null

@throws \InvalidArgumentException If the key is not a string or an array.
This method can be used to define configuration .