Skip to content

Commit 7b8a1c0

Browse files
committed
:octocat: fix docblock @param for QROptions (#332)
1 parent d500117 commit 7b8a1c0

4 files changed

Lines changed: 11 additions & 48 deletions

File tree

phpstan-baseline.neon

Lines changed: 4 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -218,13 +218,7 @@ parameters:
218218
path: examples/imageWithLogo.php
219219

220220
-
221-
rawMessage: 'Method QRGdRounded::__construct() has parameter $options with no value type specified in iterable type iterable.'
222-
identifier: missingType.iterableValue
223-
count: 1
224-
path: examples/imageWithRoundedShapes.php
225-
226-
-
227-
rawMessage: 'Parameter #1 $properties of class chillerlan\QRCode\QROptions constructor expects array<string, mixed>|null, iterable given.'
221+
rawMessage: 'Parameter #1 $properties of class chillerlan\QRCode\QROptions constructor expects array<string, mixed>|null, array<string, mixed>|(chillerlan\Settings\SettingsContainerInterface&iterable) given.'
228222
identifier: argument.type
229223
count: 1
230224
path: examples/imageWithRoundedShapes.php
@@ -602,13 +596,7 @@ parameters:
602596
path: src/Decoder/Decoder.php
603597

604598
-
605-
rawMessage: 'Method chillerlan\QRCode\Decoder\Decoder::__construct() has parameter $options with no value type specified in iterable type iterable.'
606-
identifier: missingType.iterableValue
607-
count: 1
608-
path: src/Decoder/Decoder.php
609-
610-
-
611-
rawMessage: 'Parameter #1 $properties of class chillerlan\QRCode\QROptions constructor expects array<string, mixed>|null, iterable given.'
599+
rawMessage: 'Parameter #1 $properties of class chillerlan\QRCode\QROptions constructor expects array<string, mixed>|null, (chillerlan\Settings\SettingsContainerInterface&iterable)|iterable<string, mixed> given.'
612600
identifier: argument.type
613601
count: 1
614602
path: src/Decoder/Decoder.php
@@ -742,12 +730,6 @@ parameters:
742730
count: 1
743731
path: src/Output/QRFpdf.php
744732

745-
-
746-
rawMessage: 'Method chillerlan\QRCode\Output\QRFpdf::__construct() has parameter $options with no value type specified in iterable type iterable.'
747-
identifier: missingType.iterableValue
748-
count: 1
749-
path: src/Output/QRFpdf.php
750-
751733
-
752734
rawMessage: '''
753735
Access to deprecated property $circleDiameter of class chillerlan\QRCode\Output\QROutputAbstract:
@@ -803,13 +785,7 @@ parameters:
803785
path: src/Output/QRGdImage.php
804786

805787
-
806-
rawMessage: 'Method chillerlan\QRCode\Output\QRGdImage::__construct() has parameter $options with no value type specified in iterable type iterable.'
807-
identifier: missingType.iterableValue
808-
count: 1
809-
path: src/Output/QRGdImage.php
810-
811-
-
812-
rawMessage: 'Parameter #1 $properties of class chillerlan\QRCode\QROptions constructor expects array<string, mixed>|null, iterable given.'
788+
rawMessage: 'Parameter #1 $properties of class chillerlan\QRCode\QROptions constructor expects array<string, mixed>|null, array<string, mixed>|(chillerlan\Settings\SettingsContainerInterface&iterable) given.'
813789
identifier: argument.type
814790
count: 1
815791
path: src/Output/QRGdImage.php
@@ -871,12 +847,6 @@ parameters:
871847
count: 1
872848
path: src/Output/QRImagick.php
873849

874-
-
875-
rawMessage: 'Method chillerlan\QRCode\Output\QRImagick::__construct() has parameter $options with no value type specified in iterable type iterable.'
876-
identifier: missingType.iterableValue
877-
count: 1
878-
path: src/Output/QRImagick.php
879-
880850
-
881851
rawMessage: '''
882852
Access to deprecated property $circleRadius of class chillerlan\QRCode\Output\QROutputAbstract:
@@ -922,12 +892,6 @@ parameters:
922892
count: 1
923893
path: src/Output/QRInterventionImage.php
924894

925-
-
926-
rawMessage: 'Method chillerlan\QRCode\Output\QRInterventionImage::__construct() has parameter $options with no value type specified in iterable type iterable.'
927-
identifier: missingType.iterableValue
928-
count: 1
929-
path: src/Output/QRInterventionImage.php
930-
931895
-
932896
rawMessage: '''
933897
Access to deprecated property $eol of class chillerlan\QRCode\Output\QROutputAbstract:
@@ -1091,13 +1055,7 @@ parameters:
10911055
path: src/Output/QROutputAbstract.php
10921056

10931057
-
1094-
rawMessage: 'Method chillerlan\QRCode\Output\QROutputAbstract::__construct() has parameter $options with no value type specified in iterable type iterable.'
1095-
identifier: missingType.iterableValue
1096-
count: 1
1097-
path: src/Output/QROutputAbstract.php
1098-
1099-
-
1100-
rawMessage: 'Parameter #1 $properties of class chillerlan\QRCode\QROptions constructor expects array<string, mixed>|null, iterable given.'
1058+
rawMessage: 'Parameter #1 $properties of class chillerlan\QRCode\QROptions constructor expects array<string, mixed>|null, array<string, mixed>|(chillerlan\Settings\SettingsContainerInterface&iterable) given.'
11011059
identifier: argument.type
11021060
count: 1
11031061
path: src/Output/QROutputAbstract.php

src/Decoder/Decoder.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ final class Decoder{
3636
private BitBuffer $bitBuffer;
3737
private Detector $detector;
3838

39+
/**
40+
* @param \chillerlan\Settings\SettingsContainerInterface|\chillerlan\QRCode\QROptions|iterable<string, mixed> $options
41+
*/
3942
public function __construct(SettingsContainerInterface|QROptions|iterable $options = new QROptions){
4043

4144
if(is_iterable($options)){

src/Output/QROutputAbstract.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ abstract class QROutputAbstract implements QROutputInterface{
112112

113113
/**
114114
* QROutputAbstract constructor.
115+
*
116+
* @param \chillerlan\Settings\SettingsContainerInterface|\chillerlan\QRCode\QROptions|array<string, mixed> $options
115117
*/
116118
public function __construct(SettingsContainerInterface|QROptions|iterable $options, QRMatrix $matrix){
117119

src/QRCode.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class QRCode{
5151
/**
5252
* QRCode constructor.
5353
*
54-
* @phpstan-param array<string, mixed> $options
54+
* @param \chillerlan\Settings\SettingsContainerInterface|\chillerlan\QRCode\QROptions|array<string, mixed> $options
5555
*/
5656
public function __construct(SettingsContainerInterface|QROptions|iterable $options = new QROptions){
5757
$this->setOptions($options);
@@ -60,7 +60,7 @@ public function __construct(SettingsContainerInterface|QROptions|iterable $optio
6060
/**
6161
* Sets an options instance
6262
*
63-
* @phpstan-param array<string, mixed> $options
63+
* @param \chillerlan\Settings\SettingsContainerInterface|\chillerlan\QRCode\QROptions|array<string, mixed> $options
6464
*/
6565
public function setOptions(SettingsContainerInterface|QROptions|iterable $options):static{
6666

0 commit comments

Comments
 (0)