chore: Добавлены аннотации к типам
This commit is contained in:
parent
48269bd424
commit
ad920f656c
14 changed files with 127 additions and 127 deletions
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
namespace ctiso\Tools;
|
||||
use ctiso\Tools\Drawing;
|
||||
use GdImage;
|
||||
|
||||
class TemplateImage
|
||||
{
|
||||
|
|
@ -35,11 +36,11 @@ class TemplateImage
|
|||
protected array $context = [];
|
||||
protected array $data = [];
|
||||
protected string $base = "c:\\windows\\fonts\\";
|
||||
protected $image;
|
||||
protected GdImage $image;
|
||||
protected $_prepare = true;
|
||||
public $debug = false;
|
||||
public $resource;
|
||||
public $filename;
|
||||
public string $resource;
|
||||
public string $filename;
|
||||
|
||||
function __construct (?array $template = null)
|
||||
{
|
||||
|
|
@ -66,10 +67,10 @@ class TemplateImage
|
|||
|
||||
function set(string $name, $value)
|
||||
{
|
||||
$this->context['['.$name.']'] = $this->encode($value);
|
||||
$this->context['['.$name.']'] = $value;
|
||||
}
|
||||
|
||||
function setImage($name): void
|
||||
function setImage(string $name): void
|
||||
{
|
||||
$this->filename = $name;
|
||||
$this->image = $this->imagefromfile($name);
|
||||
|
|
@ -140,11 +141,11 @@ class TemplateImage
|
|||
|
||||
/**
|
||||
* Перекодировка текста
|
||||
* @deprecated
|
||||
* @deprecated Можно заменить encode($x) -> $x
|
||||
*/
|
||||
function encode(string $text): string
|
||||
{
|
||||
return $text; //iconv("WINDOWS-1251", "UTF-8", $text);
|
||||
return $text;
|
||||
}
|
||||
|
||||
function setSize(int $new_width, int $new_height): void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue