Skip to content

faustbrian/qr

GitHub Workflow Status Latest Version on Packagist Software License Total Downloads


qr

cline/qr is a standalone QR code generation and decoding package. The repository keeps the Cline project skeleton for tooling and maintenance while the implementation and test coverage live directly in this package.

Requirements

Requires PHP 8.4+

Installation

composer require cline/qr

Usage

use Cline\Qr\Builder\Builder;
use Cline\Qr\Writer\PngWriter;

$result = new Builder(
    data: 'Hello world',
)
    ->withWriter(new PngWriter())
    ->build();

file_put_contents('qr.png', $result->getString());

Public immutable value objects also expose additive with* methods when you want to derive a modified copy without going back through the builder:

use Cline\Qr\Color\Color;
use Cline\Qr\QrCode;

$qrCode = (new QrCode('Hello world'))
    ->withSize(512)
    ->withMargin(4)
    ->withForegroundColor(new Color(12, 34, 56));

Change log

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please use the GitHub security reporting form rather than the issue queue.

Credits

License

The MIT License. Please see License File for more information.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages