Skip to content

Commit

Permalink
Add optional arguments to interface, to enhance compatibility (#456)
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias-93 authored Oct 29, 2024
1 parent 9991d34 commit 7a16f51
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion src/Builder/BuilderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,41 @@

namespace Endroid\QrCode\Builder;

use Endroid\QrCode\Color\ColorInterface;
use Endroid\QrCode\Encoding\EncodingInterface;
use Endroid\QrCode\ErrorCorrectionLevel;
use Endroid\QrCode\Label\Font\FontInterface;
use Endroid\QrCode\Label\LabelAlignment;
use Endroid\QrCode\Label\Margin\MarginInterface;
use Endroid\QrCode\RoundBlockSizeMode;
use Endroid\QrCode\Writer\Result\ResultInterface;
use Endroid\QrCode\Writer\WriterInterface;

interface BuilderInterface
{
public function build(): ResultInterface;
public function build(

Check failure on line 19 in src/Builder/BuilderInterface.php

View workflow job for this annotation

GitHub Actions / build (8.2)

Method Endroid\QrCode\Builder\BuilderInterface::build() has parameter $writerOptions with no value type specified in iterable type array.

Check failure on line 19 in src/Builder/BuilderInterface.php

View workflow job for this annotation

GitHub Actions / build (8.3)

Method Endroid\QrCode\Builder\BuilderInterface::build() has parameter $writerOptions with no value type specified in iterable type array.

Check failure on line 19 in src/Builder/BuilderInterface.php

View workflow job for this annotation

GitHub Actions / build (8.4)

Method Endroid\QrCode\Builder\BuilderInterface::build() has parameter $writerOptions with no value type specified in iterable type array.
?WriterInterface $writer = null,
?array $writerOptions = null,
?bool $validateResult = null,
// QrCode options
?string $data = null,
?EncodingInterface $encoding = null,
?ErrorCorrectionLevel $errorCorrectionLevel = null,
?int $size = null,
?int $margin = null,
?RoundBlockSizeMode $roundBlockSizeMode = null,
?ColorInterface $foregroundColor = null,
?ColorInterface $backgroundColor = null,
// Label options
?string $labelText = null,
?FontInterface $labelFont = null,
?LabelAlignment $labelAlignment = null,
?MarginInterface $labelMargin = null,
?ColorInterface $labelTextColor = null,
// Logo options
?string $logoPath = null,
?int $logoResizeToWidth = null,
?int $logoResizeToHeight = null,
?bool $logoPunchoutBackground = null,
): ResultInterface;
}

0 comments on commit 7a16f51

Please sign in to comment.