├── .github ├── FUNDING.yml ├── SECURITY.md ├── ISSUE_TEMPLATE │ └── config.yml ├── workflows │ ├── php-cs-fixer.yml │ └── psalm.yml └── CONTRIBUTING.md ├── resources └── green-pass-data.png ├── src ├── Exceptions │ ├── InvalidZlib.php │ ├── InvalidBase45.php │ ├── InvalidCborData.php │ ├── InvalidCoseData.php │ ├── InvalidQrcode.php │ └── InvalidDiseaseAgent.php ├── Entities │ ├── Holder.php │ ├── DiseaseAgents │ │ ├── Covid19.php │ │ └── DiseaseAgent.php │ └── Certificates │ │ ├── Concerns │ │ └── CertificateType.php │ │ ├── RecoveryStatement.php │ │ ├── VaccinationDose.php │ │ └── TestResult.php ├── Services │ ├── Validator.php │ └── Decoder.php └── GreenPass.php ├── .gitignore ├── .travis.yml ├── CHANGELOG.md ├── psalm.xml.dist ├── phpunit.xml.dist ├── LICENSE.md ├── composer.json ├── .php_cs.dist.php ├── README.md ├── tests ├── Services │ └── DecoderTest.php └── TestCase.php └── CONTRIBUTING.md /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: masterix21 2 | -------------------------------------------------------------------------------- /resources/green-pass-data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/masterix21/green-pass/HEAD/resources/green-pass-data.png -------------------------------------------------------------------------------- /src/Exceptions/InvalidZlib.php: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /.github/workflows/php-cs-fixer.yml: -------------------------------------------------------------------------------- 1 | name: Check & fix styling 2 | 3 | on: [push] 4 | 5 | jobs: 6 | php-cs-fixer: 7 | runs-on: ubuntu-latest 8 | 9 | steps: 10 | - name: Checkout code 11 | uses: actions/checkout@v2 12 | with: 13 | ref: ${{ github.head_ref }} 14 | 15 | - name: Run PHP CS Fixer 16 | uses: docker://oskarstark/php-cs-fixer-ga 17 | with: 18 | args: --config=.php_cs.dist.php --allow-risky=yes 19 | 20 | - name: Commit changes 21 | uses: stefanzweifel/git-auto-commit-action@v4 22 | with: 23 | commit_message: Fix styling 24 | -------------------------------------------------------------------------------- /phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | src/ 6 | 7 | 8 | 9 | 10 | tests 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/Entities/Holder.php: -------------------------------------------------------------------------------- 1 | dateOfBirth = ! empty($data['dob'] ?? null) ? Carbon::parse($data['dob']) : null; 20 | 21 | $this->surname = $data['nam']['fn'] ?? null; 22 | $this->standardisedSurname = $data['nam']['fnt'] ?? null; 23 | $this->forename = $data['nam']['gn'] ?? null; 24 | $this->standardisedForename = $data['nam']['gnt'] ?? null; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Entities/DiseaseAgents/Covid19.php: -------------------------------------------------------------------------------- 1 | new Covid19(), 31 | default => throw new InvalidDiseaseAgent(), 32 | }; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Luca Longo 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /src/Services/Validator.php: -------------------------------------------------------------------------------- 1 | in([ 5 | __DIR__ . '/src', 6 | // __DIR__ . '/tests', 7 | ]) 8 | ->name('*.php') 9 | ->ignoreDotFiles(true) 10 | ->ignoreVCS(true); 11 | 12 | return (new PhpCsFixer\Config()) 13 | ->setRules([ 14 | '@PSR2' => true, 15 | 'array_syntax' => ['syntax' => 'short'], 16 | 'ordered_imports' => ['sort_algorithm' => 'alpha'], 17 | 'no_unused_imports' => true, 18 | 'not_operator_with_successor_space' => true, 19 | 'trailing_comma_in_multiline' => true, 20 | 'phpdoc_scalar' => true, 21 | 'unary_operator_spaces' => true, 22 | 'binary_operator_spaces' => true, 23 | 'blank_line_before_statement' => [ 24 | 'statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try'], 25 | ], 26 | 'phpdoc_single_line_var_spacing' => true, 27 | 'phpdoc_var_without_name' => true, 28 | 'class_attributes_separation' => [ 29 | 'elements' => [ 30 | 'method' => 'one', 31 | ], 32 | ], 33 | 'method_argument_space' => [ 34 | 'on_multiline' => 'ensure_fully_multiline', 35 | 'keep_multiple_spaces_after_comma' => true, 36 | ], 37 | 'single_trait_insert_per_statement' => true, 38 | ]) 39 | ->setFinder($finder); 40 | -------------------------------------------------------------------------------- /src/GreenPass.php: -------------------------------------------------------------------------------- 1 | version = $data['ver'] ?? null; 37 | 38 | $this->holder = new Holder($data); 39 | 40 | if (array_key_exists('v', $data)) { 41 | $this->certificate = new VaccinationDose($data); 42 | } 43 | 44 | if (array_key_exists('t', $data)) { 45 | $this->certificate = new TestResult($data); 46 | } 47 | 48 | if (array_key_exists('r', $data)) { 49 | $this->certificate = new RecoveryStatement($data); 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/Entities/Certificates/RecoveryStatement.php: -------------------------------------------------------------------------------- 1 | id = $data['r'][0]['ci'] ?? null; 36 | 37 | $this->diseaseAgent = DiseaseAgent::resolveById($data['r'][0]['tg']); 38 | 39 | $this->country = $data['r'][0]['co'] ?? null; 40 | $this->issuer = $data['r'][0]['is'] ?? null; 41 | 42 | $this->date = ! empty($data['r'][0]['fr']) ? Carbon::parse($data['r'][0]['fr']) : null; 43 | $this->validFrom = ! empty($data['r'][0]['df']) ? Carbon::parse($data['r'][0]['df']) : null; 44 | $this->validUntil = ! empty($data['r'][0]['du']) ? Carbon::parse($data['r'][0]['du']) : null; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # COVID-19 Green Pass PHP Decoder 2 | 3 | [![Latest Version on Packagist](https://img.shields.io/packagist/v/masterix21/green-pass.svg)](https://packagist.org/packages/masterix21/green-pass) 4 | [![Total Downloads](https://img.shields.io/packagist/dt/masterix21/green-pass.svg)](https://packagist.org/packages/masterix21/green-pass) 5 | [![Build Status](https://travis-ci.com/masterix21/green-pass.svg?branch=master)](https://travis-ci.com/masterix21/green-pass) 6 | ![psalm](https://github.com/masterix21/green-pass/actions/workflows/psalm.yml/badge.svg?style=flat-square) 7 | [![codecov](https://codecov.io/gh/masterix21/green-pass/branch/master/graph/badge.svg?token=D7CW847KDA)](https://codecov.io/gh/masterix21/green-pass) 8 | 9 | This is a simpler way to decode the Green Pass QR-code in your PHP application. 10 | 11 | ## Support us 12 | 13 | If you like the package, feel free to support us: it will help to improve our products. 14 | 15 | ## Installation 16 | 17 | You can install the package via composer: 18 | 19 | ```bash 20 | composer require masterix21/green-pass 21 | ``` 22 | 23 | ## Usage 24 | 25 | ```php 26 | \Masterix21\GreenPass\Services\Decoder::qrcode("HC1:....."); 27 | ``` 28 | 29 | ![GreenPass object](https://github.com/masterix21/green-pass/blob/master/resources/green-pass-data.png?raw=true) 30 | 31 | ### Testing 32 | 33 | ```bash 34 | composer test 35 | ``` 36 | 37 | ### Changelog 38 | 39 | Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently. 40 | 41 | ## Contributing 42 | 43 | Please see [CONTRIBUTING](CONTRIBUTING.md) for details. 44 | 45 | ### Security 46 | 47 | If you discover any security related issues, please email l.longo@ambita.it instead of using the issue tracker. 48 | 49 | ## Credits 50 | 51 | - [Luca Longo](https://github.com/masterix21) 52 | - [All Contributors](../../contributors) 53 | 54 | ## License 55 | 56 | The MIT License (MIT). Please see [License File](LICENSE.md) for more information. 57 | 58 | -------------------------------------------------------------------------------- /src/Entities/Certificates/VaccinationDose.php: -------------------------------------------------------------------------------- 1 | id = $data['v'][0]['ci'] ?? null; 58 | 59 | $this->diseaseAgent = DiseaseAgent::resolveById($data['v'][0]['tg']); 60 | 61 | $this->country = $data['v'][0]['co'] ?? null; 62 | $this->issuer = $data['v'][0]['is'] ?? null; 63 | 64 | $this->type = $data['v'][0]['vp'] ?? null; 65 | $this->product = $data['v'][0]['mp'] ?? null; 66 | $this->manufacturer = $data['v'][0]['ma'] ?? null; 67 | $this->doseGiven = $data['v'][0]['dn'] ?? 0; 68 | $this->totalDoses = $data['v'][0]['sd'] ?? 0; 69 | $this->date = ! empty($data['v'][0]['dt'] ?? null) ? Carbon::parse($data['v'][0]['dt']) : null; 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/Entities/Certificates/TestResult.php: -------------------------------------------------------------------------------- 1 | id = $data['t'][0]['ci'] ?? null; 62 | 63 | $this->diseaseAgent = DiseaseAgent::resolveById($data['t'][0]['tg']); 64 | 65 | $this->country = $data['t'][0]['co'] ?? null; 66 | $this->issuer = $data['t'][0]['is'] ?? null; 67 | 68 | $this->type = $data['t'][0]['tt'] ?? null; 69 | $this->name = $data['t'][0]['tm'] ?? null; 70 | $this->device = $data['t'][0]['ma'] ?? null; 71 | $this->date = ! empty($data['t'][0]['sc']) ? Carbon::parse($data['t'][0]['sc']) : null; 72 | $this->result = $data['t'][0]['tr'] ?? null; 73 | $this->centre = $data['t'][0]['tc'] ?? null; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/Services/Decoder.php: -------------------------------------------------------------------------------- 1 | decode($base45); 26 | } catch (\Exception $e) { 27 | throw new InvalidBase45(); 28 | } 29 | } 30 | 31 | public static function zlib($zlib): string 32 | { 33 | try { 34 | return zlib_decode($zlib); 35 | } catch (\Exception $e) { 36 | throw new InvalidZlib(); 37 | } 38 | } 39 | 40 | public static function cbor($cbor): ?array 41 | { 42 | $decoder = new \CBOR\Decoder(new TagObjectManager(), new OtherObjectManager()); 43 | 44 | $result = $decoder->decode(new StringStream($cbor)); 45 | 46 | if (get_class($result) !== MapObject::class 47 | || $result->count() !== 4) { 48 | throw new InvalidCborData(); 49 | } 50 | 51 | return $result->getNormalizedData(); 52 | } 53 | 54 | public static function cose($cose): ?array 55 | { 56 | $decoder = new \CBOR\Decoder(new TagObjectManager(), new OtherObjectManager()); 57 | 58 | $result = $decoder->decode(new StringStream($cose)); 59 | 60 | if (get_class($result) !== GenericTag::class) { 61 | throw new InvalidCoseData(); 62 | } 63 | 64 | return $result->getValue()->getNormalizedData(); 65 | } 66 | 67 | public static function qrcode(string $qrcode): GreenPass 68 | { 69 | if (! Validator::qrcodePrefix($qrcode)) { 70 | throw new InvalidQrcode(); 71 | } 72 | 73 | $zlib = static::base45(substr($qrcode, 4)); 74 | $cose = static::cose(static::zlib($zlib)); 75 | $cbor = static::cbor($cose[2]); 76 | 77 | return new GreenPass($cbor[-260][1]); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /tests/Services/DecoderTest.php: -------------------------------------------------------------------------------- 1 | expectException(InvalidQrcode::class); 21 | 22 | Decoder::qrcode('fake-qrcode'); 23 | } 24 | 25 | /** @test */ 26 | public function it_throws_invalid_base45(): void 27 | { 28 | $this->expectException(InvalidBase45::class); 29 | 30 | Decoder::base45('fake-qrcode'); 31 | } 32 | 33 | /** @test */ 34 | public function it_throws_invalid_zlib(): void 35 | { 36 | $this->expectException(InvalidZlib::class); 37 | 38 | Decoder::zlib('fake-zlib'); 39 | } 40 | 41 | /** @test */ 42 | public function it_throws_invalid_cbor_data(): void 43 | { 44 | $this->expectException(InvalidCborData::class); 45 | 46 | Decoder::cbor('fake-cbor-data'); 47 | } 48 | 49 | /** @test */ 50 | public function it_throws_invalid_cose_data(): void 51 | { 52 | $this->expectException(InvalidCoseData::class); 53 | 54 | Decoder::cose('fake-cose-data'); 55 | } 56 | 57 | /** @test */ 58 | public function it_decodes_the_qrcode_to_greenpass(): void 59 | { 60 | foreach ($this->greenPasses as $types) { 61 | foreach ($types as $greenPass) { 62 | $greenPass = Decoder::qrcode($greenPass); 63 | 64 | $this->assertEquals(GreenPass::class, get_class($greenPass)); 65 | $this->assertNotEmpty($greenPass->holder->surname); 66 | } 67 | } 68 | } 69 | 70 | /** @test */ 71 | public function it_resolve_the_disease_agent(): void 72 | { 73 | $greenPass = Decoder::qrcode($this->greenPasses['v'][0]); 74 | 75 | $covid19 = new Covid19(); 76 | 77 | $this->assertEquals($greenPass->certificate->diseaseAgent->id(), $covid19->id()); 78 | $this->assertEquals($greenPass->certificate->diseaseAgent->display(), $covid19->display()); 79 | $this->assertEquals($greenPass->certificate->diseaseAgent->active(), $covid19->active()); 80 | $this->assertEquals($greenPass->certificate->diseaseAgent->version(), $covid19->version()); 81 | $this->assertEquals($greenPass->certificate->diseaseAgent->system(), $covid19->system()); 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Contributions are **welcome** and will be fully **credited**. 4 | 5 | Please read and understand the contribution guide before creating an issue or pull request. 6 | 7 | ## Etiquette 8 | 9 | This project is open source, and as such, the maintainers give their free time to build and maintain the source code 10 | held within. They make the code freely available in the hope that it will be of use to other developers. It would be 11 | extremely unfair for them to suffer abuse or anger for their hard work. 12 | 13 | Please be considerate towards maintainers when raising issues or presenting pull requests. Let's show the 14 | world that developers are civilized and selfless people. 15 | 16 | It's the duty of the maintainer to ensure that all submissions to the project are of sufficient 17 | quality to benefit the project. Many developers have different skillsets, strengths, and weaknesses. Respect the maintainer's decision, and do not be upset or abusive if your submission is not used. 18 | 19 | ## Viability 20 | 21 | When requesting or submitting new features, first consider whether it might be useful to others. Open 22 | source projects are used by many developers, who may have entirely different needs to your own. Think about 23 | whether or not your feature is likely to be used by other users of the project. 24 | 25 | ## Procedure 26 | 27 | Before filing an issue: 28 | 29 | - Attempt to replicate the problem, to ensure that it wasn't a coincidental incident. 30 | - Check to make sure your feature suggestion isn't already present within the project. 31 | - Check the pull requests tab to ensure that the bug doesn't have a fix in progress. 32 | - Check the pull requests tab to ensure that the feature isn't already in progress. 33 | 34 | Before submitting a pull request: 35 | 36 | - Check the codebase to ensure that your feature doesn't already exist. 37 | - Check the pull requests to ensure that another person hasn't already submitted the feature or fix. 38 | 39 | ## Requirements 40 | 41 | If the project maintainer has any additional requirements, you will find them listed here. 42 | 43 | - **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](https://pear.php.net/package/PHP_CodeSniffer). 44 | 45 | - **Add tests!** - Your patch won't be accepted if it doesn't have tests. 46 | 47 | - **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date. 48 | 49 | - **Consider our release cycle** - We try to follow [SemVer v2.0.0](https://semver.org/). Randomly breaking public APIs is not an option. 50 | 51 | - **One pull request per feature** - If you want to do more than one thing, send multiple pull requests. 52 | 53 | - **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](https://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting. 54 | 55 | **Happy coding**! 56 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Contributions are **welcome** and will be fully **credited**. 4 | 5 | Please read and understand the contribution guide before creating an issue or pull request. 6 | 7 | ## Etiquette 8 | 9 | This project is open source, and as such, the maintainers give their free time to build and maintain the source code 10 | held within. They make the code freely available in the hope that it will be of use to other developers. It would be 11 | extremely unfair for them to suffer abuse or anger for their hard work. 12 | 13 | Please be considerate towards maintainers when raising issues or presenting pull requests. Let's show the 14 | world that developers are civilized and selfless people. 15 | 16 | It's the duty of the maintainer to ensure that all submissions to the project are of sufficient 17 | quality to benefit the project. Many developers have different skillsets, strengths, and weaknesses. Respect the maintainer's decision, and do not be upset or abusive if your submission is not used. 18 | 19 | ## Viability 20 | 21 | When requesting or submitting new features, first consider whether it might be useful to others. Open 22 | source projects are used by many developers, who may have entirely different needs to your own. Think about 23 | whether or not your feature is likely to be used by other users of the project. 24 | 25 | ## Procedure 26 | 27 | Before filing an issue: 28 | 29 | - Attempt to replicate the problem, to ensure that it wasn't a coincidental incident. 30 | - Check to make sure your feature suggestion isn't already present within the project. 31 | - Check the pull requests tab to ensure that the bug doesn't have a fix in progress. 32 | - Check the pull requests tab to ensure that the feature isn't already in progress. 33 | 34 | Before submitting a pull request: 35 | 36 | - Check the codebase to ensure that your feature doesn't already exist. 37 | - Check the pull requests to ensure that another person hasn't already submitted the feature or fix. 38 | 39 | ## Requirements 40 | 41 | If the project maintainer has any additional requirements, you will find them listed here. 42 | 43 | - **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](https://pear.php.net/package/PHP_CodeSniffer). 44 | 45 | - **Add tests!** - Your patch won't be accepted if it doesn't have tests. 46 | 47 | - **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date. 48 | 49 | - **Consider our release cycle** - We try to follow [SemVer v2.0.0](https://semver.org/). Randomly breaking public APIs is not an option. 50 | 51 | - **One pull request per feature** - If you want to do more than one thing, send multiple pull requests. 52 | 53 | - **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](https://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting. 54 | 55 | **Happy coding**! 56 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | [ 11 | /** IT */ 'HC1:6BFOXN%TS3DH0YOJ58S S-W5HDC *M0II5XHC9B5G2+$N IOP-IA%NFQGRJPC%OQHIZC4.OI1RM8ZA.A5:S9MKN4NN3F85QNCY0O%0VZ001HOC9JU0D0HT0HB2PL/IB*09B9LW4T*8+DCMH0LDK2%K:XFE70*LP$V25$0Q:J:4MO1P0%0L0HD+9E/HY+4J6TH48S%4K.GJ2PT3QY:GQ3TE2I+-CPHN6D7LLK*2HG%89UV-0LZ 2ZJJ524-LH/CJTK96L6SR9MU9DHGZ%P WUQRENS431T1XCNCF+47AY0-IFO0500TGPN8F5G.41Q2E4T8ALW.INSV$ 07UV5SR+BNQHNML7 /KD3TU 4V*CAT3ZGLQMI/XI%ZJNSBBXK2:UG%UJMI:TU+MMPZ5$/PMX19UE:-PSR3/$NU44CBE6DQ3D7B0FBOFX0DV2DGMB$YPF62I$60/F$Z2I6IFX21XNI-LM%3/DF/U6Z9FEOJVRLVW6K$UG+BKK57:1+D10%4K83F+1VWD1NE', 12 | /** AT */ 'HC1:NCFOXN%TS3DH3ZSUZK+.V0ETD%65NL-AH-R6IOOK.IR9B+9G4G50PHZF0AT4V22F/8X*G3M9JUPY0BX/KR96R/S09T./0LWTKD33236J3TA3M*4VV2 73-E3GG396B-43O058YIB73A*G3W19UEBY5:PI0EGSP4*2DN43U*0CEBQ/GXQFY73CIBC:G 7376BXBJBAJ UNFMJCRN0H3PQN*E33H3OA70M3FMJIJN523.K5QZ4A+2XEN QT QTHC31M3+E32R44$28A9H0D3ZCL4JMYAZ+S-A5$XKX6T2YC 35H/ITX8GL2-LH/CJTK96L6SR9MU9RFGJA6Q3QR$P2OIC0JVLA8J3ET3:H3A+2+33U SAAUOT3TPTO4UBZIC0JKQTL*QDKBO.AI9BVYTOCFOPS4IJCOT0$89NT2V457U8+9W2KQ-7LF9-DF07U$B97JJ1D7WKP/HLIJ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L6156J68ZUH/8DTDU%QECP0BSVOFOM%EQ 67JI*DE*QMFHVY+26SJ$DHBYSP+M6DI.6NBWHOCTQWE4-PG:P2JIBBJB-NKE4+W2K 6%6QMJMT0', 15 | /** DE: full */ 'HC1:6BF+70790T9WJWG.FKY*4GO0.O1CV2 O5 N2FBBRW1*70HS8WY04AC*WIFN0AHCD8KD97TK0F90KECTHGWJC0FDC:5AIA%G7X+AQB9746HS80:54IBQF60R6$A80X6S1BTYACG6M+9XG8KIAWNA91AY%67092L4WJCT3EHS8XJC$+DXJCCWENF6OF63W5NW6WF6%JC QE/IAYJC5LEW34U3ET7DXC9 QE-ED8%E.JCBECB1A-:8$96646AL60A60S6Q$D.UDRYA 96NF6L/5QW6307KQEPD09WEQDD+Q6TW6FA7C466KCN9E%961A6DL6FA7D46JPCT3E5JDLA7$Q6E464W5TG6..DX%DZJC6/DTZ9 QE5$CB$DA/D JC1/D3Z8WED1ECW.CCWE.Y92OAGY8MY9L+9MPCG/D5 C5IA5N9$PC5$CUZCY$5Y$527B+A4KZNQG5TKOWWD9FL%I8U$F7O2IBM85CWOC%LEZU4R/BXHDAHN 11$CA5MRI:AONFN7091K9FKIGIY%VWSSSU9%01FO2*FTPQ3C3F', 16 | /** DE: partial */ 'HC1:6BF+70790T9WJWG.FKY*4GO0.O1CV2 O5 N2FBBRW1*70HS8WY04AC*WIFN0AHCD8KD97TK0F90KECTHGWJC0FDC:5AIA%G7X+AQB9746HS80:54IBQF60R6$A80X6S1BTYACG6M+9XG8KIAWNA91AY%67092L4WJCT3EHS8XJC +DXJCCWENF6OF63W5NW6WF6%JC QE/IAYJC5LEW34U3ET7DXC9 QE-ED8%E.JCBECB1A-:8$96646AL60A60S6Q$D.UDRYA 96NF6L/5QW6307KQEPD09WEQDD+Q6TW6FA7C466KCN9E%961A6DL6FA7D46JPCT3E5JDLA7$Q6E464W5TG6..DX%DZJC6/DTZ9 QE5$CB$DA/D JC1/D3Z8WED1ECW.CCWE.Y92OAGY8MY9L+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H7WV-UNA1VZJKZ6HX.A/5R..9*CV6+LJ*F.UN7A2BT8B+6B897S69R48S1.R1VJO9Q1ZZO+CC$A9%T5X7RI25A8S57D JK-PQ+JR*FDTW3+1EC1JXLOQ58+KFL49ZMENAO.YOWR75PAH0HD6AIHCPWHJTF.RJ*JCSKEHL1N31HWEO67KJH8TIX-B3QB-+9*LCU:C:P2QEEQ7KF$V--4CW7JWILDWU%Q%IO0LAK70J$KW2JW56.KO8E2RHPH60ILI8T0N/7OEPD7P3+3IH9VZIVWP.44FX87QH5I97ZK0MK8OIGC3 3CQ6WO+9P9ECRSV%72M4L65 KAVKE*YPRHSIF1 89*4NDZ7FU6:F6NPJ1PHL059BGBB1%/C/J91R75Z5I7CWV0TREWYSY8ULK5HWPGEP$SI5B1$8HDOCH3JEBCL*8SE2AZT9SC+84JVGR39:2V*TR:KBW/4S:FK DOHF-1789MQ.18CV2C3YCN79OR176:1U:0CQVNGDJ0GUPO%CRT+QC/O$:D/WQY$3*5UR2M4YPFXK$DH', 31 | ], 32 | ]; 33 | 34 | public function setUp(): void 35 | { 36 | } 37 | 38 | } 39 | --------------------------------------------------------------------------------