----------------------------------------------------------------------
()
| 605 | |
| 606 | //---------------------------------------------------------------------- |
| 607 | public function convertData() |
| 608 | { |
| 609 | $ver = $this->estimateVersion(); |
| 610 | if($ver > $this->getVersion()) { |
| 611 | $this->setVersion($ver); |
| 612 | } |
| 613 | |
| 614 | for(;;) { |
| 615 | $bits = $this->createBitStream(); |
| 616 | |
| 617 | if($bits < 0) |
| 618 | return -1; |
| 619 | |
| 620 | $ver = QRspec::getMinimumVersion((int)(($bits + 7) / 8), $this->level); |
| 621 | if($ver < 0) { |
| 622 | throw new Exception('WRONG VERSION'); |
| 623 | return -1; |
| 624 | } else if($ver > $this->getVersion()) { |
| 625 | $this->setVersion($ver); |
| 626 | } else { |
| 627 | break; |
| 628 | } |
| 629 | } |
| 630 | |
| 631 | return 0; |
| 632 | } |
| 633 | |
| 634 | //---------------------------------------------------------------------- |
| 635 | public function appendPaddingBit(&$bstream) |
no test coverage detected