Skip to content

Commit

Permalink
Fix return type annotation (#613)
Browse files Browse the repository at this point in the history
* Fix return type annotation

* BC with tools that do not support PHPStan annotations

Co-authored-by: William Desportes <williamdes@wdes.fr>

---------

Co-authored-by: William Desportes <williamdes@wdes.fr>
Co-authored-by: Nicola Asuni <nicolaasuni@users.noreply.github.com>
  • Loading branch information
3 people committed Sep 6, 2023
1 parent 548c0f2 commit 128b268
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tcpdf.php
Expand Up @@ -4102,6 +4102,7 @@ public function setTextColor($col1=0, $col2=-1, $col3=-1, $col4=-1, $ret=false,
* @param float $fontsize Font size in points. The default value is the current size.
* @param boolean $getarray if true returns an array of characters widths, if false returns the total length.
* @return float[]|float total string length or array of characted widths
* @phpstan-return ($getarray is true ? float[] : float) total string length or array of characted widths
* @author Nicola Asuni
* @public
* @since 1.2
Expand All @@ -4118,6 +4119,7 @@ public function GetStringWidth($s, $fontname='', $fontstyle='', $fontsize=0, $ge
* @param float $fontsize Font size in points. The default value is the current size.
* @param boolean $getarray if true returns an array of characters widths, if false returns the total length.
* @return float[]|float total string length or array of characted widths
* @phpstan-return ($getarray is true ? float[] : float) total string length or array of characted widths
* @author Nicola Asuni
* @public
* @since 2.4.000 (2008-03-06)
Expand Down

0 comments on commit 128b268

Please sign in to comment.