Phase 0: Fundament für Inhaus
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 1m14s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 1m12s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 1m7s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 1m19s
CI / PHP 8.3 / mysql:8.0 (pull_request) Successful in 1m32s
CI / PHP 8.4 / mysql:8.0 (pull_request) Successful in 1m22s
CI / PHP 8.4 / mysql:8.4 (pull_request) Successful in 1m32s
CI / PHP 8.3 / mysql:8.4 (pull_request) Successful in 1m35s
CI / Build-Artefakte aktuell (pull_request) Failing after 1m7s
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 1m14s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 1m12s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 1m7s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 1m19s
CI / PHP 8.3 / mysql:8.0 (pull_request) Successful in 1m32s
CI / PHP 8.4 / mysql:8.0 (pull_request) Successful in 1m22s
CI / PHP 8.4 / mysql:8.4 (pull_request) Successful in 1m32s
CI / PHP 8.3 / mysql:8.4 (pull_request) Successful in 1m35s
CI / Build-Artefakte aktuell (pull_request) Failing after 1m7s
- Laravel 13 mit Filament 5 (Admin), Inertia 3 + Vue 3 + Vuetify 4 (Material 3) - Anmeldung über Fortify (Login, Passwort vergessen/ändern), keine Selbstregistrierung - Profil mit Profilbild (WebP in festen Größen), Personenseiten, Header mit Avatar-Menü - Material-3-Farbschema aus der Primärfarbe, hell/dunkel/System pro Person - Basis-Branding (Portalname, Logo, Primärfarbe) im Admin unter „Erscheinungsbild“ - Benutzerverwaltung im Admin, Zugang vorläufig über is_admin - vendor/ (ohne Dev-Pakete) und Frontend-Build mitversioniert, Dev-Pakete in vendor-dev/ - PHPUnit-Tests gegen MySQL/MariaDB, Forgejo-CI-Matrix, Docker-Entwicklungsumgebung - VERSION, CHANGELOG.md und CONTRIBUTING.md mit Release-Ablauf Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
7197eaebf2
commit
9c0f8de791
15771 changed files with 1564103 additions and 5 deletions
96
vendor/chillerlan/php-qrcode/src/Common/Mode.php
vendored
Normal file
96
vendor/chillerlan/php-qrcode/src/Common/Mode.php
vendored
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
<?php
|
||||
/**
|
||||
* Class Mode
|
||||
*
|
||||
* @created 19.11.2020
|
||||
* @author smiley <smiley@chillerlan.net>
|
||||
* @copyright 2020 smiley
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
namespace chillerlan\QRCode\Common;
|
||||
|
||||
use chillerlan\QRCode\Data\{AlphaNum, Byte, Hanzi, Kanji, Number};
|
||||
use chillerlan\QRCode\QRCodeException;
|
||||
|
||||
/**
|
||||
* Data mode information - ISO 18004:2006, 6.4.1, Tables 2 and 3
|
||||
*/
|
||||
final class Mode{
|
||||
|
||||
// ISO/IEC 18004:2000 Table 2
|
||||
|
||||
/** @var int */
|
||||
public const TERMINATOR = 0b0000;
|
||||
/** @var int */
|
||||
public const NUMBER = 0b0001;
|
||||
/** @var int */
|
||||
public const ALPHANUM = 0b0010;
|
||||
/** @var int */
|
||||
public const BYTE = 0b0100;
|
||||
/** @var int */
|
||||
public const KANJI = 0b1000;
|
||||
/** @var int */
|
||||
public const HANZI = 0b1101;
|
||||
/** @var int */
|
||||
public const STRCTURED_APPEND = 0b0011;
|
||||
/** @var int */
|
||||
public const FNC1_FIRST = 0b0101;
|
||||
/** @var int */
|
||||
public const FNC1_SECOND = 0b1001;
|
||||
/** @var int */
|
||||
public const ECI = 0b0111;
|
||||
|
||||
/**
|
||||
* mode length bits for the version breakpoints 1-9, 10-26 and 27-40
|
||||
*
|
||||
* ISO/IEC 18004:2000 Table 3 - Number of bits in Character Count Indicator
|
||||
*/
|
||||
public const LENGTH_BITS = [
|
||||
self::NUMBER => [10, 12, 14],
|
||||
self::ALPHANUM => [ 9, 11, 13],
|
||||
self::BYTE => [ 8, 16, 16],
|
||||
self::KANJI => [ 8, 10, 12],
|
||||
self::HANZI => [ 8, 10, 12],
|
||||
self::ECI => [ 0, 0, 0],
|
||||
];
|
||||
|
||||
/**
|
||||
* Map of data mode => interface (detection order)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
public const INTERFACES = [
|
||||
self::NUMBER => Number::class,
|
||||
self::ALPHANUM => AlphaNum::class,
|
||||
self::KANJI => Kanji::class,
|
||||
self::HANZI => Hanzi::class,
|
||||
self::BYTE => Byte::class,
|
||||
];
|
||||
|
||||
/**
|
||||
* returns the length bits for the version breakpoints 1-9, 10-26 and 27-40
|
||||
*
|
||||
* @throws \chillerlan\QRCode\QRCodeException
|
||||
*/
|
||||
public static function getLengthBitsForVersion(int $mode, int $version):int{
|
||||
|
||||
if(!isset(self::LENGTH_BITS[$mode])){
|
||||
throw new QRCodeException('invalid mode given');
|
||||
}
|
||||
|
||||
$minVersion = 0;
|
||||
|
||||
foreach([9, 26, 40] as $key => $breakpoint){
|
||||
|
||||
if($version > $minVersion && $version <= $breakpoint){
|
||||
return self::LENGTH_BITS[$mode][$key];
|
||||
}
|
||||
|
||||
$minVersion = $breakpoint;
|
||||
}
|
||||
|
||||
throw new QRCodeException(sprintf('invalid version number: %d', $version));
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue