default: throw new \InvalidArgumentException(); } } /** * @param version version in question * @return number of bits used, in this QR Code symbol {@link Version}, to encode the * count of characters that will follow encoded in this Mode */ public function getCharacterCountBits($version) { $number = $version->getVersionNumber(); $offset = 0; if ($number <= 9) { $offset = 0; } else { if ($number <= 26) { $offset = 1; } else { $offset = 2; } } return $this->characterCountBitsForVersions[$offset]; } public function getBits() { return $this->bits; } } Mode::Init();