mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-08-19 05:30:05 +00:00
🚿
This commit is contained in:
@@ -11,7 +11,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace chillerlan\QRCodeBenchmark;
|
||||
|
||||
use chillerlan\QRCode\Output\QRStringJSON;
|
||||
use chillerlan\QRCode\QRCode;
|
||||
use PhpBench\Attributes\{BeforeMethods, Subject};
|
||||
|
||||
@@ -23,9 +22,8 @@ final class QRCodeBenchmark extends BenchmarkAbstract{
|
||||
public function initOptions():void{
|
||||
|
||||
$options = [
|
||||
'outputInterface' => QRStringJSON::class,
|
||||
'version' => $this->version->getVersionNumber(),
|
||||
'eccLevel' => $this->eccLevel->getLevel(),
|
||||
'version' => $this->version->getVersionNumber(),
|
||||
'eccLevel' => $this->eccLevel->getLevel(),
|
||||
];
|
||||
|
||||
$this->initQROptions($options);
|
||||
|
||||
@@ -74,7 +74,7 @@ $options = new QROptions;
|
||||
$options->version = 5;
|
||||
$options->eccLevel = 'L';
|
||||
|
||||
$data = 'https://www.youtube.com/watch?v=DLzxrzFCyOs&t=43s';
|
||||
$data = 'https://www.youtube.com/watch?v=dQw4w9WgXcQ';
|
||||
|
||||
// invoke the QROutputInterface manually
|
||||
// please note that an QROutputInterface invoked this way might become unusable after calling dump().
|
||||
|
||||
@@ -59,7 +59,6 @@ class QRInterventionImage extends QROutputAbstract{
|
||||
}
|
||||
|
||||
try{
|
||||
|
||||
$this->driver = match(true){
|
||||
extension_loaded('gd') => new GdDriver,
|
||||
extension_loaded('imagick') => new ImagickDriver,
|
||||
|
||||
@@ -33,6 +33,7 @@ interface QROutputInterface{
|
||||
QRGdImagePNG::class,
|
||||
QRGdImageWEBP::class,
|
||||
QRImagick::class,
|
||||
QRInterventionImage::class,
|
||||
QRMarkupHTML::class,
|
||||
QRMarkupSVG::class,
|
||||
QRMarkupXML::class,
|
||||
|
||||
Reference in New Issue
Block a user