private function assertValidFields($fields)
    {
        if(!isset($fields)) {
            throw new InvalidArgumentException("Fields are empty");
        }

        foreach($fields as $field) {
            if(count(explode('.', $field['key'])) != 2) {
                throw new InvalidArgumentException('Key has wrong format');
            }
        }
    }
private function assertValidFields($fields)
    {
        if(!isset($fields)) {
            throw new InvalidArgumentException("Fields are empty");
        }

        foreach($fields as $field) {
            if(count(explode('.', $field['key'])) != 2) {
                throw new InvalidArgumentException('Key has wrong format');
            }
        }
    }
private function assertValidFields ( $ fields ) { if ( ! isset ( $ fields ) ) { throw new InvalidArgumentException ( "Fields are empty" ) ; } foreach ( $ fields as $ field ) { if ( count ( explode ( '.' , $ field [ 'key' ] ) ) != 2 ) { throw new InvalidArgumentException ( 'Key has wrong format' ) ; } } }
Check if fields are valid
@param array $fields
@throws InvalidArgumentException
Check if fields are valid