mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-08-24 15:47:54 +00:00
:octocat: shortcut for Mode::getLengthBitsForVersion()
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
|
||||
namespace chillerlan\QRCode\Data;
|
||||
|
||||
use chillerlan\QRCode\Common\Mode;
|
||||
|
||||
/**
|
||||
*/
|
||||
abstract class QRDataModeAbstract implements QRDataModeInterface{
|
||||
@@ -52,4 +54,11 @@ abstract class QRDataModeAbstract implements QRDataModeInterface{
|
||||
return $this::$datamode;
|
||||
}
|
||||
|
||||
/**
|
||||
* shortcut
|
||||
*/
|
||||
protected static function getLengthBits(int $versionNumber):int{
|
||||
return Mode::getLengthBitsForVersion(static::$datamode, $versionNumber);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user