File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -164,15 +164,11 @@ public function create_image() {
164164 } else {
165165 $ url = course_get_url ($ this ->course )->out (false , ['utm_source ' => 'block_qrcode ' ]);
166166 }
167- $ qrcode = new QrCode ($ url );
168- $ qrcode ->setSize ($ this ->size );
169-
170- // Set advanced options.
171- $ qrcode ->setMargin (10 );
172- $ qrcode ->setEncoding (new Encoding ('UTF-8 ' ));
173- $ qrcode ->setErrorCorrectionLevel (new ErrorCorrectionLevel \ErrorCorrectionLevelHigh ());
174- $ qrcode ->setForegroundColor (new Color (0 , 0 , 0 ));
175- $ qrcode ->setBackgroundColor (new Color (255 , 255 , 255 ));
167+ $ qrcode = new QrCode (
168+ data: $ url ,
169+ size: $ this ->size ,
170+ errorCorrectionLevel: ErrorCorrectionLevel::High,
171+ );
176172
177173 // Png format.
178174 $ logo = null ;
You can’t perform that action at this time.
0 commit comments