MCPcopy Create free account
hub / github.com/codemistic/Web-Development / getMinimumVersion

Method getMinimumVersion

text-to-qr/lib/phpqrcode/phpqrcode.php:425–435  ·  view source on GitHub ↗

----------------------------------------------------------------------

($size, $level)

Source from the content-addressed store, hash-verified

423
424 //----------------------------------------------------------------------
425 public static function getMinimumVersion($size, $level)
426 {
427
428 for($i=1; $i<= QRSPEC_VERSION_MAX; $i++) {
429 $words = self::$capacity[$i][QRCAP_WORDS] - self::$capacity[$i][QRCAP_EC][$level];
430 if($words >= $size)
431 return $i;
432 }
433
434 return -1;
435 }
436
437 //######################################################################
438

Callers 2

estimateVersionMethod · 0.45
convertDataMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected