private function autoVersionAndGetMaxDataBits($codewordNumPlus, $dataBitsTotal)
    {
        $i          = 1 + 40 * $this->getEccCharacter();
        $j          = $i + 39;
        $version    = 1;

        while ($i <= $j) {
            $maxDataBits = $this->getMaxDataBitsByIndexFormArray($i);

            if ( ($maxDataBits) >= ($dataBitsTotal + $codewordNumPlus[$version]) ) {
                $this->setVersion($version);

                return $maxDataBits;
            }

            $i++; $version++;
        }

        return 0;
    }
private function autoVersionAndGetMaxDataBits($codewordNumPlus, $dataBitsTotal)
    {
        $i          = 1 + 40 * $this->getEccCharacter();
        $j          = $i + 39;
        $version    = 1;

        while ($i <= $j) {
            $maxDataBits = $this->getMaxDataBitsByIndexFormArray($i);

            if ( ($maxDataBits) >= ($dataBitsTotal + $codewordNumPlus[$version]) ) {
                $this->setVersion($version);

                return $maxDataBits;
            }

            $i++; $version++;
        }

        return 0;
    }
private function autoVersionAndGetMaxDataBits ( $ codewordNumPlus , $ dataBitsTotal ) { $ i = 1 + 40 * $ this -> getEccCharacter ( ) ; $ j = $ i + 39 ; $ version = 1 ; while ( $ i <= $ j ) { $ maxDataBits = $ this -> getMaxDataBitsByIndexFormArray ( $ i ) ; if ( ( $ maxDataBits ) >= ( $ dataBitsTotal + $ codewordNumPlus [ $ version ] ) ) { $ this -> setVersion ( $ version ) ; return $ maxDataBits ; } $ i ++ ; $ version ++ ; } return 0 ; }
Auto version select and Get Max Data Bits

@param $codewordNumPlus
@param $dataBitsTotal

@return int
Auto version select and Get Max Data Bits