Merge branch 'master' into php-7.4

# Conflicts:
#	composer.json
#	src/Output/QROutputAbstract.php
#	src/QROptionsTrait.php
This commit is contained in:
codemasher
2019-08-09 21:47:27 +02:00
18 changed files with 172 additions and 148 deletions
+4 -2
View File
@@ -14,6 +14,8 @@ namespace chillerlan\QRCode\Data;
use chillerlan\QRCode\QRCode;
use function array_search, ord, sprintf;
/**
* Alphanumeric mode: 0 to 9, A to Z, space, $ % * + - . / :
*/
@@ -42,13 +44,13 @@ class AlphaNum extends QRDataAbstract{
* @throws \chillerlan\QRCode\Data\QRCodeDataException
*/
protected function getCharCode(string $chr):int{
$i = \array_search($chr, $this::ALPHANUM_CHAR_MAP);
$i = array_search($chr, $this::ALPHANUM_CHAR_MAP);
if($i !== false){
return $i;
}
throw new QRCodeDataException('illegal char: "'.$chr.'" ['.\ord($chr).']');
throw new QRCodeDataException(sprintf('illegal char: "%s" [%d]', $chr, ord($chr)));
}
}