@@ -109,10 +109,12 @@ abstract class Properties
109109
110110 protected ChartColor $ glowColor ;
111111
112+ /** @var array{size: ?float} */
112113 protected array $ softEdges = [
113114 'size ' => null ,
114115 ];
115116
117+ /** @var mixed[] */
116118 protected array $ shadowProperties = self ::PRESETS_OPTIONS [0 ];
117119
118120 protected ChartColor $ shadowColor ;
@@ -395,13 +397,17 @@ protected function setColorProperties(?string $color, null|float|int|string $alp
395397 ],
396398 ];
397399
400+ /** @return mixed[] */
398401 protected function getShadowPresetsMap (int $ presetsOption ): array
399402 {
400403 return self ::PRESETS_OPTIONS [$ presetsOption ] ?? self ::PRESETS_OPTIONS [0 ];
401404 }
402405
403406 /**
404407 * Get value of array element.
408+ *
409+ * @param mixed[] $properties
410+ * @param array<mixed>|int|string $elements
405411 */
406412 protected function getArrayElementsValue (array $ properties , array |int |string $ elements ): mixed
407413 {
@@ -411,7 +417,7 @@ protected function getArrayElementsValue(array $properties, array|int|string $el
411417 }
412418
413419 foreach ($ elements as $ keys ) {
414- $ reference = &$ reference [$ keys ];
420+ $ reference = &$ reference [$ keys ]; //* @phpstan-ignore-line
415421 }
416422
417423 return $ reference ;
@@ -436,6 +442,10 @@ public function setGlowProperties(float $size, ?string $colorValue = null, ?int
436442
437443 /**
438444 * Get Glow Property.
445+ *
446+ * @param mixed[]|string $property
447+ *
448+ * @return null|array<mixed>|float|int|string
439449 */
440450 public function getGlowProperty (array |string $ property ): null |array |float |int |string
441451 {
@@ -449,7 +459,9 @@ public function getGlowProperty(array|string $property): null|array|float|int|st
449459 'alpha ' => $ this ->glowColor ->getColorProperty ('alpha ' ),
450460 ];
451461 } elseif (is_array ($ property ) && count ($ property ) >= 2 && $ property [0 ] === 'color ' ) {
452- $ retVal = $ this ->glowColor ->getColorProperty ($ property [1 ]);
462+ /** @var string */
463+ $ temp = $ property [1 ];
464+ $ retVal = $ this ->glowColor ->getColorProperty ($ temp );
453465 }
454466
455467 return $ retVal ;
@@ -566,6 +578,9 @@ protected function setShadowPresetsProperties(int $presets)
566578 /**
567579 * Set Shadow Properties Values.
568580 *
581+ * @param mixed[] $propertiesMap
582+ * @param null|mixed[] $reference
583+ *
569584 * @return $this
570585 */
571586 protected function setShadowPropertiesMapValues (array $ propertiesMap , ?array &$ reference = null )
@@ -574,8 +589,13 @@ protected function setShadowPropertiesMapValues(array $propertiesMap, ?array &$r
574589 foreach ($ propertiesMap as $ property_key => $ property_val ) {
575590 if (is_array ($ property_val )) {
576591 if (in_array ($ property_key , self ::SHADOW_ARRAY_KEYS , true )) {
577- $ reference = &$ this ->shadowProperties [$ property_key ];
578- $ this ->setShadowPropertiesMapValues ($ property_val , $ reference );
592+ /** @var null|array<mixed> */
593+ $ temp = &$ this ->shadowProperties [$ property_key ];
594+ $ reference = &$ temp ;
595+ $ this ->setShadowPropertiesMapValues (
596+ $ property_val ,
597+ $ reference
598+ );
579599 }
580600 } else {
581601 if ($ base_reference === null ) {
@@ -640,6 +660,8 @@ public function getShadowColorObject(): ChartColor
640660 * Get Shadow Property.
641661 *
642662 * @param string|string[] $elements
663+ *
664+ * @return null|mixed[]|string
643665 */
644666 public function getShadowProperty ($ elements ): array |string |null
645667 {
@@ -662,6 +684,7 @@ public function getShadowProperty($elements): array|string|null
662684 return $ retVal ;
663685 }
664686
687+ /** @return mixed[] */
665688 public function getShadowArray (): array
666689 {
667690 $ array = $ this ->shadowProperties ;
@@ -674,6 +697,7 @@ public function getShadowArray(): array
674697
675698 protected ChartColor $ lineColor ;
676699
700+ /** @var array{width: null|float|int|string, compound: ?string, dash: ?string, cap: ?string, join: ?string, arrow: array{head: array{type: ?string, size: null|int|string, w: ?string, len: ?string}, end: array{type: ?string, size: null|int|string, w: ?string, len: ?string}}} */
677701 protected array $ lineStyleProperties = [
678702 'width ' => null , //'9525',
679703 'compound ' => '' , //self::LINE_STYLE_COMPOUND_SIMPLE,
@@ -798,13 +822,16 @@ public function setLineStyleProperties(
798822 }
799823 }
800824
825+ /** @return mixed[] */
801826 public function getLineStyleArray (): array
802827 {
803828 return $ this ->lineStyleProperties ;
804829 }
805830
831+ /** @param mixed[] $lineStyleProperties */
806832 public function setLineStyleArray (array $ lineStyleProperties = []): self
807833 {
834+ /** @var array{width?: ?string, compound?: string, dash?: string, cap?: string, join?: string, arrow?: array{head?: array{type?: string, size?: int, w?: string, len?: string}, end?: array{type?: string, size?: int, w?: string, len?: string}}} $lineStyleProperties */
808835 $ this ->activateObject ();
809836 $ this ->lineStyleProperties ['width ' ] = $ lineStyleProperties ['width ' ] ?? null ;
810837 $ this ->lineStyleProperties ['compound ' ] = $ lineStyleProperties ['compound ' ] ?? '' ;
@@ -826,13 +853,15 @@ public function setLineStyleArray(array $lineStyleProperties = []): self
826853 public function setLineStyleProperty (string $ propertyName , mixed $ value ): self
827854 {
828855 $ this ->activateObject ();
829- $ this ->lineStyleProperties [$ propertyName ] = $ value ;
856+ $ this ->lineStyleProperties [$ propertyName ] = $ value ; //* @phpstan-ignore-line
830857
831858 return $ this ;
832859 }
833860
834861 /**
835862 * Get Line Style Property.
863+ *
864+ * @param array<mixed>|string $elements
836865 */
837866 public function getLineStyleProperty (array |string $ elements ): ?string
838867 {
@@ -873,7 +902,7 @@ protected function getLineStyleArrowSize(int $arraySelector, string $arrayKaySel
873902 */
874903 public function getLineStyleArrowParameters (string $ arrowSelector , string $ propertySelector ): string
875904 {
876- return $ this ->getLineStyleArrowSize ($ this ->lineStyleProperties ['arrow ' ][$ arrowSelector ]['size ' ], $ propertySelector );
905+ return $ this ->getLineStyleArrowSize (( int ) $ this ->lineStyleProperties ['arrow ' ][$ arrowSelector ]['size ' ], $ propertySelector );
877906 }
878907
879908 /**
0 commit comments