mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-11-06 11:55:30 +00:00
:octocat: omit parentheses around "new" calls
This commit is contained in:
@@ -68,7 +68,7 @@ final class QRMatrixTest extends TestCase{
|
||||
#[Test]
|
||||
public function getMaskPattern():void{
|
||||
// set via matrix evaluation
|
||||
$matrix = (new QRCode)->addByteSegment('testdata')->getQRMatrix();
|
||||
$matrix = new QRCode()->addByteSegment('testdata')->getQRMatrix();
|
||||
|
||||
$this::assertInstanceOf(MaskPattern::class, $matrix->getMaskPattern());
|
||||
$this::assertSame(MaskPattern::PATTERN_100, $matrix->getMaskPattern()->getPattern());
|
||||
@@ -344,7 +344,7 @@ final class QRMatrixTest extends TestCase{
|
||||
$o->addLogoSpace = true;
|
||||
$o->logoSpaceHeight = 5;
|
||||
|
||||
$matrix = (new QRCode($o))->addByteSegment('testdata')->getQRMatrix();
|
||||
$matrix = new QRCode($o)->addByteSegment('testdata')->getQRMatrix();
|
||||
|
||||
$this->debugMatrix($matrix);
|
||||
|
||||
@@ -365,7 +365,7 @@ final class QRMatrixTest extends TestCase{
|
||||
$o->eccLevel = EccLevel::H;
|
||||
$o->addQuietzone = false;
|
||||
|
||||
$matrix = (new QRCode($o))->addByteSegment('testdata')->getQRMatrix();
|
||||
$matrix = new QRCode($o)->addByteSegment('testdata')->getQRMatrix();
|
||||
// also testing size adjustment to uneven numbers
|
||||
$matrix->setLogoSpace(20, 14);
|
||||
|
||||
@@ -391,7 +391,7 @@ final class QRMatrixTest extends TestCase{
|
||||
$o->addQuietzone = true;
|
||||
$o->quietzoneSize = 10;
|
||||
|
||||
$matrix = (new QRCode($o))->addByteSegment('testdata')->getQRMatrix();
|
||||
$matrix = new QRCode($o)->addByteSegment('testdata')->getQRMatrix();
|
||||
|
||||
$matrix->setLogoSpace(21, 21, -10, -10);
|
||||
$this->debugMatrix($matrix);
|
||||
@@ -417,7 +417,7 @@ final class QRMatrixTest extends TestCase{
|
||||
$this->expectException(QRCodeDataException::class);
|
||||
$this->expectExceptionMessage('ECC level "H" required to add logo space');
|
||||
|
||||
(new QRCode)->addByteSegment('testdata')->getQRMatrix()->setLogoSpace(50, 50);
|
||||
new QRCode()->addByteSegment('testdata')->getQRMatrix()->setLogoSpace(50, 50);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -432,7 +432,7 @@ final class QRMatrixTest extends TestCase{
|
||||
$o->version = 5;
|
||||
$o->eccLevel = EccLevel::H;
|
||||
|
||||
(new QRCode($o))->addByteSegment('testdata')->getQRMatrix()->setLogoSpace(69, 1);
|
||||
new QRCode($o)->addByteSegment('testdata')->getQRMatrix()->setLogoSpace(69, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -447,7 +447,7 @@ final class QRMatrixTest extends TestCase{
|
||||
$o->version = 5;
|
||||
$o->eccLevel = EccLevel::H;
|
||||
|
||||
(new QRCode($o))->addByteSegment('testdata')->getQRMatrix()->setLogoSpace(37, 37);
|
||||
new QRCode($o)->addByteSegment('testdata')->getQRMatrix()->setLogoSpace(37, 37);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user