diff --git a/README.md b/README.md index 084a5ed99..ec1fdc4e3 100644 --- a/README.md +++ b/README.md @@ -81,12 +81,16 @@ echo 'QR Code'; Wait, what was that? Please again, slower! See [Advanced usage](https://github.com/chillerlan/php-qrcode/wiki/Advanced-usage) on the wiki. ### Framework Integration -- Drupal [Google Authenticator Login `ga_login`](https://www.drupal.org/project/ga_login) -- WordPress [`wp-two-factor-auth`](https://github.com/sjinks/wp-two-factor-auth) -- WordPress [Simple 2FA `simple-2fa`](https://wordpress.org/plugins/simple-2fa/) -- WoltLab Suite [two-step-verification](http://pluginstore.woltlab.com/file/3007-two-step-verification/) -- [Cachet](https://github.com/CachetHQ/Cachet) +- Drupal: + - [Google Authenticator Login `ga_login`](https://www.drupal.org/project/ga_login) +- WordPress: + - [`wp-two-factor-auth`](https://github.com/sjinks/wp-two-factor-auth) + - [`simple-2fa`](https://wordpress.org/plugins/simple-2fa/) + - [`wordpress-seo`](https://github.com/Yoast/wordpress-seo) +- WoltLab Suite + - [two-step-verification](http://pluginstore.woltlab.com/file/3007-two-step-verification/) - [Appwrite](https://github.com/appwrite/appwrite) +- [Cachet](https://github.com/CachetHQ/Cachet) - [twill](https://github.com/area17/twill) - other uses: [dependents](https://github.com/chillerlan/php-qrcode/network/dependents) / [packages](https://github.com/chillerlan/php-qrcode/network/dependents?dependent_type=PACKAGE) diff --git a/examples/svg.php b/examples/svg.php index 97120b697..221c8b655 100644 --- a/examples/svg.php +++ b/examples/svg.php @@ -1,9 +1,12 @@ * @copyright 2017 Smiley * @license MIT + * + * @noinspection PhpComposerExtensionStubsInspection */ namespace chillerlan\QRCodeExamples; @@ -11,6 +14,7 @@ namespace chillerlan\QRCodeExamples; use chillerlan\QRCode\{QRCode, QROptions}; use chillerlan\QRCode\Data\QRMatrix; use chillerlan\QRCode\Common\EccLevel; +use function gzencode, header; require_once __DIR__.'/../vendor/autoload.php'; @@ -18,25 +22,29 @@ $data = 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'; $gzip = true; $options = new QROptions([ - 'version' => 7, - 'outputType' => QRCode::OUTPUT_MARKUP_SVG, - 'imageBase64' => false, - 'eccLevel' => EccLevel::L, - 'addQuietzone' => true, + 'version' => 7, + 'outputType' => QRCode::OUTPUT_MARKUP_SVG, + 'imageBase64' => false, + 'eccLevel' => EccLevel::L, + 'addQuietzone' => true, // if set to true, the light modules won't be rendered - 'imageTransparent' => false, + 'imageTransparent' => false, // empty the default value to remove the fill* attributes from the elements - 'markupDark' => '', - 'markupLight' => '', + 'markupDark' => '', + 'markupLight' => '', // draw the modules as circles isntead of squares 'drawCircularModules' => true, - 'circleRadius' => 0.4, + 'circleRadius' => 0.4, + // connect paths + 'svgConnectPaths' => true, // keep modules of thhese types as square - 'keepAsSquare' => [QRMatrix::M_FINDER|QRMatrix::IS_DARK, QRMatrix::M_FINDER_DOT, QRMatrix::M_ALIGNMENT|QRMatrix::IS_DARK], - // connect - 'svgConnectPaths' => true, + 'keepAsSquare' => [ + QRMatrix::M_FINDER|QRMatrix::IS_DARK, + QRMatrix::M_FINDER_DOT, + QRMatrix::M_ALIGNMENT|QRMatrix::IS_DARK, + ], // https://developer.mozilla.org/en-US/docs/Web/SVG/Element/linearGradient - 'svgDefs' => ' + 'svgDefs' => ' diff --git a/src/Output/QRImage.php b/src/Output/QRImage.php index 37501a217..cda496d36 100644 --- a/src/Output/QRImage.php +++ b/src/Output/QRImage.php @@ -11,7 +11,7 @@ namespace chillerlan\QRCode\Output; /** - * @deprecated backward compatibility, use QRGdImage instead + * @deprecated 5.0.0 backward compatibility, use QRGdImage instead * @see \chillerlan\QRCode\Output\QRGdImage */ class QRImage extends QRGdImage{ diff --git a/src/QRCode.php b/src/QRCode.php index 75f1f6fc8..dfcaa08c2 100755 --- a/src/QRCode.php +++ b/src/QRCode.php @@ -34,16 +34,31 @@ class QRCode{ public const MASK_PATTERN_AUTO = -1; /** - * @deprecated backward compatibility - * @see \chillerlan\QRCode\Common\EccLevel + * @deprecated 5.0.0 + * @see \chillerlan\QRCode\Common\EccLevel::L + * @var int */ - /** @var int */ public const ECC_L = EccLevel::L; - /** @var int */ + + /** + * @deprecated 5.0.0 + * @see \chillerlan\QRCode\Common\EccLevel::M + * @var int + */ public const ECC_M = EccLevel::M; - /** @var int */ + + /** + * @deprecated 5.0.0 + * @see \chillerlan\QRCode\Common\EccLevel::Q + * @var int + */ public const ECC_Q = EccLevel::Q; - /** @var int */ + + /** + * @deprecated 5.0.0 + * @see \chillerlan\QRCode\Common\EccLevel::H + * @var int + */ public const ECC_H = EccLevel::H; /** @var string */ @@ -208,7 +223,8 @@ class QRCode{ /** * checks if a string qualifies as numeric (convenience method) * - * @deprecated + * @deprecated 5.0.0 + * @see \chillerlan\QRCode\Data\Number::validateString() * @codeCoverageIgnore */ public function isNumber(string $string):bool{ @@ -218,7 +234,8 @@ class QRCode{ /** * checks if a string qualifies as alphanumeric (convenience method) * - * @deprecated + * @deprecated 5.0.0 + * @see \chillerlan\QRCode\Data\AlphaNum::validateString() * @codeCoverageIgnore */ public function isAlphaNum(string $string):bool{ @@ -228,7 +245,8 @@ class QRCode{ /** * checks if a string qualifies as Kanji (convenience method) * - * @deprecated + * @deprecated 5.0.0 + * @see \chillerlan\QRCode\Data\Kanji::validateString() * @codeCoverageIgnore */ public function isKanji(string $string):bool{ @@ -238,7 +256,8 @@ class QRCode{ /** * a dummy (convenience method) * - * @deprecated + * @deprecated 5.0.0 + * @see \chillerlan\QRCode\Data\Byte::validateString() * @codeCoverageIgnore */ public function isByte(string $string):bool{