Closed manuvarghese236 closed 2 months ago
Hi @manuvarghese236 did you find the problem yet? If your PHP interpreter does not recognise the private keyword you're probably working with an old PHP version but the info provided here is too limited to say anything meaningful about this issue.
syntax error, unexpected 'private' (T_PRIVATE), expecting variable (T_VARIABLE)
QrCode.php (15)
declare(strict_types=1); 04 05 namespace Endroid\QrCode; 06 07 use Endroid\QrCode\Color\Color; 08 use Endroid\QrCode\Color\ColorInterface; 09 use Endroid\QrCode\Encoding\Encoding; 10 use Endroid\QrCode\Encoding\EncodingInterface; 11 12 final class QrCode implements QrCodeInterface 13 { 14 public function __construct( 15 private string $data, 16 private EncodingInterface $encoding = new Encoding('UTF-8'), 17 private ErrorCorrectionLevel $errorCorrectionLevel = ErrorCorrectionLevel::Low, 18 private int $size = 300, 19 private int $margin = 10, 20 private RoundBlockSizeMode $roundBlockSizeMode = RoundBlockSizeMode::Margin, 21 private ColorInterface $foregroundColor = new Color(0, 0, 0), 22 private ColorInterface $backgroundColor = new Color(255, 255, 255) 23 ) { 24 } 25 26 public static function create(string $data): self 27 {