@@ -204,7 +204,7 @@ private static function mapRange(float $value, float $fromMin, float $fromMax, f
204204 */
205205 public function getColor ()
206206 {
207- return $ this ->aComponents ;
207+ return $ this ->components ;
208208 }
209209
210210 /**
@@ -213,7 +213,7 @@ public function getColor()
213213 public function setColor (array $ colorValues ): void
214214 {
215215 $ this ->setName (\implode ('' , \array_keys ($ colorValues )));
216- $ this ->aComponents = $ colorValues ;
216+ $ this ->components = $ colorValues ;
217217 }
218218
219219 /**
@@ -260,7 +260,7 @@ private function shouldRenderAsHex(OutputFormat $outputFormat): bool
260260 */
261261 private function getRealName (): string
262262 {
263- return \implode ('' , \array_keys ($ this ->aComponents ));
263+ return \implode ('' , \array_keys ($ this ->components ));
264264 }
265265
266266 /**
@@ -269,7 +269,7 @@ private function getRealName(): string
269269 */
270270 private function allComponentsAreNumbers (): bool
271271 {
272- foreach ($ this ->aComponents as $ component ) {
272+ foreach ($ this ->components as $ component ) {
273273 if (!($ component instanceof Size) || $ component ->getUnit () !== null ) {
274274 return false ;
275275 }
@@ -280,7 +280,7 @@ private function allComponentsAreNumbers(): bool
280280
281281 /**
282282 * Note that this method assumes the following:
283- * - The `aComponents ` array has keys for `r`, `g` and `b`;
283+ * - The `components ` array has keys for `r`, `g` and `b`;
284284 * - The values in the array are all instances of `Size`.
285285 *
286286 * Errors will be triggered or thrown if this is not the case.
@@ -291,9 +291,9 @@ private function renderAsHex(): string
291291 {
292292 $ result = \sprintf (
293293 '%02x%02x%02x ' ,
294- $ this ->aComponents ['r ' ]->getSize (),
295- $ this ->aComponents ['g ' ]->getSize (),
296- $ this ->aComponents ['b ' ]->getSize ()
294+ $ this ->components ['r ' ]->getSize (),
295+ $ this ->components ['g ' ]->getSize (),
296+ $ this ->components ['b ' ]->getSize ()
297297 );
298298 $ canUseShortVariant = ($ result [0 ] == $ result [1 ]) && ($ result [2 ] == $ result [3 ]) && ($ result [4 ] == $ result [5 ]);
299299
@@ -327,7 +327,7 @@ private function shouldRenderInModernSyntax(): bool
327327
328328 $ hasPercentage = false ;
329329 $ hasNumber = false ;
330- foreach ($ this ->aComponents as $ key => $ value ) {
330+ foreach ($ this ->components as $ key => $ value ) {
331331 if ($ key === 'a ' ) {
332332 // Alpha can have units that don't match those of the RGB components in the "legacy" syntax.
333333 // So it is not necessary to check it. It's also always last, hence `break` rather than `continue`.
@@ -354,7 +354,7 @@ private function shouldRenderInModernSyntax(): bool
354354
355355 private function hasNoneAsComponentValue (): bool
356356 {
357- return \in_array ('none ' , $ this ->aComponents , true );
357+ return \in_array ('none ' , $ this ->components , true );
358358 }
359359
360360 /**
@@ -376,10 +376,10 @@ private function colorFunctionMayHaveMixedValueTypes(string $function): bool
376376 private function renderInModernSyntax (OutputFormat $ outputFormat ): string
377377 {
378378 // Maybe not yet without alpha, but will be...
379- $ componentsWithoutAlpha = $ this ->aComponents ;
379+ $ componentsWithoutAlpha = $ this ->components ;
380380 \end ($ componentsWithoutAlpha );
381381 if (\key ($ componentsWithoutAlpha ) === 'a ' ) {
382- $ alpha = $ this ->aComponents ['a ' ];
382+ $ alpha = $ this ->components ['a ' ];
383383 unset($ componentsWithoutAlpha ['a ' ]);
384384 }
385385
0 commit comments