public function setErrorCorrection($error_correction)
    {
        if (!is_numeric($error_correction)) {
            $level_constant = 'CodeItNow\BarcodeBundle\Utils\QrCode::LEVEL_'.strtoupper($error_correction);
            $error_correction = constant($level_constant);
        }

        if (in_array($error_correction, $this->error_corrections_available)) {
            $this->error_correction = $error_correction;
        }

        return $this;
    }
public function setErrorCorrection($error_correction)
    {
        if (!is_numeric($error_correction)) {
            $level_constant = 'CodeItNow\BarcodeBundle\Utils\QrCode::LEVEL_'.strtoupper($error_correction);
            $error_correction = constant($level_constant);
        }

        if (in_array($error_correction, $this->error_corrections_available)) {
            $this->error_correction = $error_correction;
        }

        return $this;
    }
public function setErrorCorrection ( $ error_correction ) { if ( ! is_numeric ( $ error_correction ) ) { $ level_constant = 'CodeItNow\BarcodeBundle\Utils\QrCode::LEVEL_' . strtoupper ( $ error_correction ) ; $ error_correction = constant ( $ level_constant ) ; } if ( in_array ( $ error_correction , $ this -> error_corrections_available ) ) { $ this -> error_correction = $ error_correction ; } return $ this ; }
Set QR Code error correction level.

@param mixed $error_correction Error Correction Level

@return QrCode
Set QR Code error correction level .