From ab2ad321fd4d2fd455ec8416cedaf723d5c75dea Mon Sep 17 00:00:00 2001 From: Bostjan Rihter Date: Sun, 11 Mar 2018 00:26:46 +0100 Subject: [PATCH] Indentation. --- src/QRCode.php | 5 ++--- tests/QRCodeTest.php | 10 +++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/QRCode.php b/src/QRCode.php index 444c88b8b..d7ec8abb1 100755 --- a/src/QRCode.php +++ b/src/QRCode.php @@ -161,9 +161,8 @@ class QRCode{ * @throws \chillerlan\QRCode\Data\QRCodeDataException */ public function getMatrix(string $data):QRMatrix { - //NOTE: data sanitation should be done outside - //$data = trim($data); - + //NOTE: input sanitization should be done outside + //$data = trim($data); if(empty($data)){ throw new QRCodeDataException('QRCode::getMatrix() No data given.'); } diff --git a/tests/QRCodeTest.php b/tests/QRCodeTest.php index ccfa5eb7c..edeb9569a 100755 --- a/tests/QRCodeTest.php +++ b/tests/QRCodeTest.php @@ -94,12 +94,12 @@ class QRCodeTest extends QRTestAbstract{ $this->qrcode->getMatrix(''); } - public function testTrim() { - $m1 = $this->qrcode->getMatrix('hello'); - $m2 = $this->qrcode->getMatrix('hello '); // added space + public function testTrim() { + $m1 = $this->qrcode->getMatrix('hello'); + $m2 = $this->qrcode->getMatrix('hello '); // added space - $this->assertNotEquals($m1, $m2); - } + $this->assertNotEquals($m1, $m2); + } public function testImageTransparencyBGDefault(){ $this->qrcode = $this->reflection->newInstanceArgs([new QROptions(['imageTransparencyBG' => 'foo'])]);