Skip to content

Commit e8ac9e0

Browse files
committed
🚿
1 parent 0673036 commit e8ac9e0

File tree

4 files changed

+60
-29
lines changed

4 files changed

+60
-29
lines changed

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,16 @@ echo '<img src="'.(new QRCode)->render($data).'" alt="QR Code" />';
8181
Wait, what was that? Please again, slower! See [Advanced usage](https://github.com/chillerlan/php-qrcode/wiki/Advanced-usage) on the wiki.
8282

8383
### Framework Integration
84-
- Drupal [Google Authenticator Login `ga_login`](https://www.drupal.org/project/ga_login)
85-
- WordPress [`wp-two-factor-auth`](https://github.com/sjinks/wp-two-factor-auth)
86-
- WordPress [Simple 2FA `simple-2fa`](https://wordpress.org/plugins/simple-2fa/)
87-
- WoltLab Suite [two-step-verification](http://pluginstore.woltlab.com/file/3007-two-step-verification/)
88-
- [Cachet](https://github.com/CachetHQ/Cachet)
84+
- Drupal:
85+
- [Google Authenticator Login `ga_login`](https://www.drupal.org/project/ga_login)
86+
- WordPress:
87+
- [`wp-two-factor-auth`](https://github.com/sjinks/wp-two-factor-auth)
88+
- [`simple-2fa`](https://wordpress.org/plugins/simple-2fa/)
89+
- [`wordpress-seo`](https://github.com/Yoast/wordpress-seo)
90+
- WoltLab Suite
91+
- [two-step-verification](http://pluginstore.woltlab.com/file/3007-two-step-verification/)
8992
- [Appwrite](https://github.com/appwrite/appwrite)
93+
- [Cachet](https://github.com/CachetHQ/Cachet)
9094
- [twill](https://github.com/area17/twill)
9195
- other uses: [dependents](https://github.com/chillerlan/php-qrcode/network/dependents) / [packages](https://github.com/chillerlan/php-qrcode/network/dependents?dependent_type=PACKAGE)
9296

examples/svg.php

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,50 @@
11
<?php
2+
23
/**
34
* @created 21.12.2017
45
* @author Smiley <[email protected]>
56
* @copyright 2017 Smiley
67
* @license MIT
8+
*
9+
* @noinspection PhpComposerExtensionStubsInspection
710
*/
811

912
namespace chillerlan\QRCodeExamples;
1013

1114
use chillerlan\QRCode\{QRCode, QROptions};
1215
use chillerlan\QRCode\Data\QRMatrix;
1316
use chillerlan\QRCode\Common\EccLevel;
17+
use function gzencode, header;
1418

1519
require_once __DIR__.'/../vendor/autoload.php';
1620

1721
$data = 'https://www.youtube.com/watch?v=dQw4w9WgXcQ';
1822
$gzip = true;
1923

2024
$options = new QROptions([
21-
'version' => 7,
22-
'outputType' => QRCode::OUTPUT_MARKUP_SVG,
23-
'imageBase64' => false,
24-
'eccLevel' => EccLevel::L,
25-
'addQuietzone' => true,
25+
'version' => 7,
26+
'outputType' => QRCode::OUTPUT_MARKUP_SVG,
27+
'imageBase64' => false,
28+
'eccLevel' => EccLevel::L,
29+
'addQuietzone' => true,
2630
// if set to true, the light modules won't be rendered
27-
'imageTransparent' => false,
31+
'imageTransparent' => false,
2832
// empty the default value to remove the fill* attributes from the <path> elements
29-
'markupDark' => '',
30-
'markupLight' => '',
33+
'markupDark' => '',
34+
'markupLight' => '',
3135
// draw the modules as circles isntead of squares
3236
'drawCircularModules' => true,
33-
'circleRadius' => 0.4,
37+
'circleRadius' => 0.4,
38+
// connect paths
39+
'svgConnectPaths' => true,
3440
// keep modules of thhese types as square
35-
'keepAsSquare' => [QRMatrix::M_FINDER|QRMatrix::IS_DARK, QRMatrix::M_FINDER_DOT, QRMatrix::M_ALIGNMENT|QRMatrix::IS_DARK],
36-
// connect
37-
'svgConnectPaths' => true,
41+
'keepAsSquare' => [
42+
QRMatrix::M_FINDER|QRMatrix::IS_DARK,
43+
QRMatrix::M_FINDER_DOT,
44+
QRMatrix::M_ALIGNMENT|QRMatrix::IS_DARK,
45+
],
3846
// https://developer.mozilla.org/en-US/docs/Web/SVG/Element/linearGradient
39-
'svgDefs' => '
47+
'svgDefs' => '
4048
<linearGradient id="rainbow" x1="100%" y2="100%">
4149
<stop stop-color="#e2453c" offset="2.5%"/>
4250
<stop stop-color="#e07e39" offset="21.5%"/>

src/Output/QRImage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
namespace chillerlan\QRCode\Output;
1212

1313
/**
14-
* @deprecated backward compatibility, use QRGdImage instead
14+
* @deprecated 5.0.0 backward compatibility, use QRGdImage instead
1515
* @see \chillerlan\QRCode\Output\QRGdImage
1616
*/
1717
class QRImage extends QRGdImage{

src/QRCode.php

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,31 @@ class QRCode{
3434
public const MASK_PATTERN_AUTO = -1;
3535

3636
/**
37-
* @deprecated backward compatibility
38-
* @see \chillerlan\QRCode\Common\EccLevel
37+
* @deprecated 5.0.0
38+
* @see \chillerlan\QRCode\Common\EccLevel::L
39+
* @var int
3940
*/
40-
/** @var int */
4141
public const ECC_L = EccLevel::L;
42-
/** @var int */
42+
43+
/**
44+
* @deprecated 5.0.0
45+
* @see \chillerlan\QRCode\Common\EccLevel::M
46+
* @var int
47+
*/
4348
public const ECC_M = EccLevel::M;
44-
/** @var int */
49+
50+
/**
51+
* @deprecated 5.0.0
52+
* @see \chillerlan\QRCode\Common\EccLevel::Q
53+
* @var int
54+
*/
4555
public const ECC_Q = EccLevel::Q;
46-
/** @var int */
56+
57+
/**
58+
* @deprecated 5.0.0
59+
* @see \chillerlan\QRCode\Common\EccLevel::H
60+
* @var int
61+
*/
4762
public const ECC_H = EccLevel::H;
4863

4964
/** @var string */
@@ -208,7 +223,8 @@ protected function initCustomOutputInterface():QROutputInterface{
208223
/**
209224
* checks if a string qualifies as numeric (convenience method)
210225
*
211-
* @deprecated
226+
* @deprecated 5.0.0
227+
* @see \chillerlan\QRCode\Data\Number::validateString()
212228
* @codeCoverageIgnore
213229
*/
214230
public function isNumber(string $string):bool{
@@ -218,7 +234,8 @@ public function isNumber(string $string):bool{
218234
/**
219235
* checks if a string qualifies as alphanumeric (convenience method)
220236
*
221-
* @deprecated
237+
* @deprecated 5.0.0
238+
* @see \chillerlan\QRCode\Data\AlphaNum::validateString()
222239
* @codeCoverageIgnore
223240
*/
224241
public function isAlphaNum(string $string):bool{
@@ -228,7 +245,8 @@ public function isAlphaNum(string $string):bool{
228245
/**
229246
* checks if a string qualifies as Kanji (convenience method)
230247
*
231-
* @deprecated
248+
* @deprecated 5.0.0
249+
* @see \chillerlan\QRCode\Data\Kanji::validateString()
232250
* @codeCoverageIgnore
233251
*/
234252
public function isKanji(string $string):bool{
@@ -238,7 +256,8 @@ public function isKanji(string $string):bool{
238256
/**
239257
* a dummy (convenience method)
240258
*
241-
* @deprecated
259+
* @deprecated 5.0.0
260+
* @see \chillerlan\QRCode\Data\Byte::validateString()
242261
* @codeCoverageIgnore
243262
*/
244263
public function isByte(string $string):bool{

0 commit comments

Comments
 (0)