PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / 1.10.20
WCPOS – Point of Sale (POS) plugin for WooCommerce v1.10.20
1.10.20 1.10.19 1.10.18 1.10.17 1.10.16 1.10.15 1.10.13 1.10.14 1.10.12 1.10.11 1.10.10 1.10.9 1.10.8 untagged-3d9b7ccddc54df87c672 1.10.7 1.10.6 1.10.5 1.10.3 1.10.4 1.10.2 1.10.1 1.10.0 1.9.17 1.9.15 1.9.16 All 164 releases
woocommerce-pos / vendor_prefixed / chillerlan / php-qrcode / src / Output / QRStringJSON.php

QRStringJSON.php in WCPOS – Point of Sale (POS) plugin for WooCommerce 1.10.20, at vendor_prefixed/chillerlan/php-qrcode/src/Output/QRStringJSON.php

64 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Class QRStringJSON
5 *
6 * @created 25.10.2023
7 * @author smiley <[email protected]>
8 * @copyright 2023 smiley
9 * @license MIT
10 *
11 * @noinspection PhpComposerExtensionStubsInspection
12 */
13 namespace WCPOS\Vendor\chillerlan\QRCode\Output;
14
15 use function json_encode;
16 /**
17 *
18 */
19 class QRStringJSON extends QROutputAbstract
20 {
21 public const MIME_TYPE = 'application/json';
22 /**
23 * @inheritDoc
24 * @throws \JsonException
25 */
26 public function dump(?string $file = null) : string
27 {
28 $matrix = $this->matrix->getMatrix($this->options->jsonAsBooleans);
29 $data = json_encode($matrix, $this->options->jsonFlags);
30 $this->saveToFile($data, $file);
31 return $data;
32 }
33 /**
34 * unused - required by interface
35 *
36 * @inheritDoc
37 * @codeCoverageIgnore
38 */
39 protected function prepareModuleValue($value) : string
40 {
41 return '';
42 }
43 /**
44 * unused - required by interface
45 *
46 * @inheritDoc
47 * @codeCoverageIgnore
48 */
49 protected function getDefaultModuleValue(bool $isDark) : string
50 {
51 return '';
52 }
53 /**
54 * unused - required by interface
55 *
56 * @inheritDoc
57 * @codeCoverageIgnore
58 */
59 public static function moduleValueIsValid($value) : bool
60 {
61 return \true;
62 }
63 }
64