Skip to content

Commit

Permalink
Merge pull request pi-hole#1676 from buchwasa/remove-old-construct
Browse files Browse the repository at this point in the history
Use new style constructors, fixes phpstan
  • Loading branch information
DL6ER authored Dec 31, 2020
2 parents 9b19104 + 650ae0b commit 4ea896c
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions scripts/vendor/qrcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class QRCode {

var $qrDataList;

function QRCode() {
function __construct() {
$this->typeNumber = 1;
$this->errorCorrectLevel = QR_ERROR_CORRECT_LEVEL_H;
$this->qrDataList = array();
Expand Down Expand Up @@ -973,7 +973,7 @@ class QRRSBlock {

);

function QRRSBlock($totalCount, $dataCount) {
function __construct($totalCount, $dataCount) {
$this->totalCount = $totalCount;
$this->dataCount = $dataCount;
}
Expand Down Expand Up @@ -1030,8 +1030,8 @@ static function getRsBlockTable($typeNumber, $errorCorrectLevel) {

class QRNumber extends QRData {

function QRNumber($data) {
QRData::QRData(QR_MODE_NUMBER, $data);
function __construct($data) {
QRData::__construct(QR_MODE_NUMBER, $data);
}

function write(&$buffer) {
Expand Down Expand Up @@ -1087,8 +1087,8 @@ static function parseIntAt($c) {

class QRKanji extends QRData {

function QRKanji($data) {
QRData::QRData(QR_MODE_KANJI, $data);
function __construct($data) {
QRData::__construct(QR_MODE_KANJI, $data);
}

function write(&$buffer) {
Expand Down Expand Up @@ -1132,8 +1132,8 @@ function getLength() {

class QRAlphaNum extends QRData {

function QRAlphaNum($data) {
QRData::QRData(QR_MODE_ALPHA_NUM, $data);
function __construct($data) {
QRData::__construct(QR_MODE_ALPHA_NUM, $data);
}

function write(&$buffer) {
Expand Down Expand Up @@ -1189,8 +1189,8 @@ static function getCode($c) {

class QR8BitByte extends QRData {

function QR8BitByte($data) {
QRData::QRData(QR_MODE_8BIT_BYTE, $data);
function __construct($data) {
QRData::__construct(QR_MODE_8BIT_BYTE, $data);
}

function write(&$buffer) {
Expand All @@ -1216,7 +1216,7 @@ class QRData {

var $data;

function QRData($mode, $data) {
function __construct($mode, $data) {
$this->mode = $mode;
$this->data = $data;
}
Expand Down Expand Up @@ -1358,7 +1358,7 @@ class QRPolynomial {

var $num;

function QRPolynomial($num, $shift = 0) {
function __construct($num, $shift = 0) {

$offset = 0;

Expand Down Expand Up @@ -1492,7 +1492,7 @@ class QRBitBuffer {
var $buffer;
var $length;

function QRBitBuffer() {
function __construct() {
$this->buffer = array();
$this->length = 0;
}
Expand Down

0 comments on commit 4ea896c

Please sign in to comment.