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

Method getMinimumVersion

text-to-qr/lib/phpqrcode/qrspec.php:113–123  ·  view source on GitHub ↗

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

($size, $level)

Source from the content-addressed store, hash-verified

111
112 //----------------------------------------------------------------------
113 public static function getMinimumVersion($size, $level)
114 {
115
116 for($i=1; $i<= QRSPEC_VERSION_MAX; $i++) {
117 $words = self::$capacity[$i][QRCAP_WORDS] - self::$capacity[$i][QRCAP_EC][$level];
118 if($words >= $size)
119 return $i;
120 }
121
122 return -1;
123 }
124
125 //######################################################################
126

Callers 2

estimateVersionMethod · 0.45
convertDataMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected