Skip to content

Commit 2c389c7

Browse files
committed
:octocat: QRMatrix: add dummy methods with deprecation notice
1 parent 1b2aa52 commit 2c389c7

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

src/Data/QRMatrix.php

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,27 +166,63 @@ public function getMatrix(bool $boolean = null):array{
166166
return $matrix;
167167
}
168168

169+
/**
170+
* @deprecated 5.0.0 use QRMatrix::getMatrix() instead
171+
* @see \chillerlan\QRCode\Data\QRMatrix::getMatrix()
172+
* @codeCoverageIgnore
173+
*/
174+
public function matrix(bool $boolean = null):array{
175+
return $this->getMatrix($boolean);
176+
}
177+
169178
/**
170179
* Returns the current version number
171180
*/
172181
public function getVersion():?Version{
173182
return $this->version;
174183
}
175184

185+
/**
186+
* @deprecated 5.0.0 use QRMatrix::getVersion() instead
187+
* @see \chillerlan\QRCode\Data\QRMatrix::getVersion()
188+
* @codeCoverageIgnore
189+
*/
190+
public function version():?Version{
191+
return $this->getVersion();
192+
}
193+
176194
/**
177195
* Returns the current ECC level
178196
*/
179197
public function getEccLevel():?EccLevel{
180198
return $this->eccLevel;
181199
}
182200

201+
/**
202+
* @deprecated 5.0.0 use QRMatrix::getEccLevel() instead
203+
* @see \chillerlan\QRCode\Data\QRMatrix::getEccLevel()
204+
* @codeCoverageIgnore
205+
*/
206+
public function eccLevel():?EccLevel{
207+
return $this->getEccLevel();
208+
}
209+
183210
/**
184211
* Returns the current mask pattern
185212
*/
186213
public function getMaskPattern():?MaskPattern{
187214
return $this->maskPattern;
188215
}
189216

217+
/**
218+
* @deprecated 5.0.0 use QRMatrix::getMaskPattern() instead
219+
* @see \chillerlan\QRCode\Data\QRMatrix::getMaskPattern()
220+
* @codeCoverageIgnore
221+
*/
222+
public function maskPattern():?MaskPattern{
223+
return $this->getMaskPattern();
224+
}
225+
190226
/**
191227
* Returns the absoulute size of the matrix, including quiet zone (after setting it).
192228
*
@@ -196,6 +232,15 @@ public function getSize():int{
196232
return $this->moduleCount;
197233
}
198234

235+
/**
236+
* @deprecated 5.0.0 use QRMatrix::getSize() instead
237+
* @see \chillerlan\QRCode\Data\QRMatrix::getSize()
238+
* @codeCoverageIgnore
239+
*/
240+
public function size():int{
241+
return $this->getSize();
242+
}
243+
199244
/**
200245
* Returns the value of the module at position [$x, $y] or -1 if the coordinate is outside the matrix
201246
*/

0 commit comments

Comments
 (0)