File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,9 @@ public function build(
88
88
$ writerOptions = $ writerOptions ?? $ this ->writerOptions ;
89
89
$ validateResult = $ validateResult ?? $ this ->validateResult ;
90
90
91
+ $ createLabel = $ this ->labelText || $ labelText ;
92
+ $ createLogo = $ this ->logoPath || $ logoPath ;
93
+
91
94
$ qrCode = new QrCode (
92
95
data: $ data ?? $ this ->data ,
93
96
encoding: $ encoding ?? $ this ->encoding ,
@@ -99,14 +102,14 @@ public function build(
99
102
backgroundColor: $ backgroundColor ?? $ this ->backgroundColor
100
103
);
101
104
102
- $ logo = $ this -> logoPath ? new Logo (
105
+ $ logo = $ createLogo ? new Logo (
103
106
path: $ logoPath ?? $ this ->logoPath ,
104
107
resizeToWidth: $ logoResizeToWidth ?? $ this ->logoResizeToWidth ,
105
108
resizeToHeight: $ logoResizeToHeight ?? $ this ->logoResizeToHeight ,
106
109
punchoutBackground: $ logoPunchoutBackground ?? $ this ->logoPunchoutBackground
107
110
) : null ;
108
111
109
- $ label = $ this -> labelText ? new Label (
112
+ $ label = $ createLabel ? new Label (
110
113
text: $ labelText ?? $ this ->labelText ,
111
114
font: $ labelFont ?? $ this ->labelFont ,
112
115
alignment: $ labelAlignment ?? $ this ->labelAlignment ,
You can’t perform that action at this time.
0 commit comments