protected function encodeSimpleControl($name, AbstractControl $control, Encoder $encoder, $flags = null)
    {
        $buffer = sprintf(
            '%s = L.%s(%s)%s',
            $encoder->encodeReference($control),
            $name,
            $encoder->encodeValue($control->getOptions()),
            $encoder->close($flags)
        );

        $buffer .= $this->encodeMethodCalls($control->getMethodCalls(), $encoder, $flags);

        return $buffer;
    }