chore: Аннотации к типам

This commit is contained in:
origami11@yandex.ru 2025-10-23 11:24:33 +03:00
parent e5713e9015
commit 530a3b931d
22 changed files with 388 additions and 131 deletions

View file

@ -202,6 +202,12 @@ class Table
return max(array_map([$this, 'getRowCells'], $this->rows));
}
/**
* Кодирование строки
* @deprecated
* @param string $s Строка
* @return string
*/
function encode($s)
{
return $s;
@ -209,6 +215,11 @@ class Table
/**
* Генерация клетки таблицы (Переработать)
* @param TableCell $ncell Клетка таблицы
* @param XMLWriter $doc XMLWriter
* @param int $j Индекс клетки
* @param mixed $value Значение клетки
* @param bool $setIndex Устанавливать индекс клетки в атрибут ss:Index
*/
function createCell (TableCell $ncell, XMLWriter $doc, $j, mixed $value, $setIndex) {
$doc->startElement("Cell");
@ -222,7 +233,7 @@ class Table
}
if ($setIndex) {
$doc->writeAttribute('ss:Index', $j);
$doc->writeAttribute('ss:Index', (string)$j);
}
$doc->startElement("Data");
@ -247,7 +258,7 @@ class Table
/**
* Генерация таблицы
*/
public function createTable (XMLWriter $doc) {
public function createTable (XMLWriter $doc): void {
$doc->startElement('Worksheet');
$doc->writeAttribute('ss:Name', $this->name);
@ -295,7 +306,7 @@ class Table
$doc->endElement();
}
protected function splitPane (XMLWriter $doc) {
protected function splitPane (XMLWriter $doc): void {
$doc->startElement('WorksheetOptions');
$doc->writeAttribute('xmlns', 'urn:schemas-microsoft-com:office:excel');