@@ -110,7 +110,7 @@ public static function moduleValueIsValid($value):bool{
110110 * @inheritDoc
111111 * @throws \chillerlan\QRCode\Output\QRCodeOutputException
112112 */
113- protected function getModuleValue ($ value ):int {
113+ protected function prepareModuleValue ($ value ):int {
114114 $ values = [];
115115
116116 foreach (array_values ($ value ) as $ i => $ val ){
@@ -136,7 +136,7 @@ protected function getModuleValue($value):int{
136136 * @inheritDoc
137137 */
138138 protected function getDefaultModuleValue (bool $ isDark ):int {
139- return $ this ->getModuleValue (($ isDark ) ? [0 , 0 , 0 ] : [255 , 255 , 255 ]);
139+ return $ this ->prepareModuleValue (($ isDark ) ? [0 , 0 , 0 ] : [255 , 255 , 255 ]);
140140 }
141141
142142 /**
@@ -199,12 +199,12 @@ protected function setBgColor():void{
199199 }
200200
201201 if ($ this ::moduleValueIsValid ($ this ->options ->bgColor )){
202- $ this ->background = $ this ->getModuleValue ($ this ->options ->bgColor );
202+ $ this ->background = $ this ->prepareModuleValue ($ this ->options ->bgColor );
203203
204204 return ;
205205 }
206206
207- $ this ->background = $ this ->getModuleValue ([255 , 255 , 255 ]);
207+ $ this ->background = $ this ->prepareModuleValue ([255 , 255 , 255 ]);
208208 }
209209
210210 /**
@@ -219,7 +219,7 @@ protected function setTransparencyColor():void{
219219 $ transparencyColor = $ this ->background ;
220220
221221 if ($ this ::moduleValueIsValid ($ this ->options ->transparencyColor )){
222- $ transparencyColor = $ this ->getModuleValue ($ this ->options ->transparencyColor );
222+ $ transparencyColor = $ this ->prepareModuleValue ($ this ->options ->transparencyColor );
223223 }
224224
225225 imagecolortransparent ($ this ->image , $ transparencyColor );
0 commit comments