Постфиксная запись типов вместо префиксной

This commit is contained in:
CORP\phedor 2018-05-04 14:57:52 +03:00
parent 04662a94df
commit 11370eecc9
33 changed files with 95 additions and 79 deletions

View file

@ -43,7 +43,7 @@ class Document {
if ($type == 'Borders') {
$doc->startElement('Borders');
foreach ($s as $border) {
/*.array.*/$border = $border;
$border/*: array*/ = $border;
$doc->startElement('Border');
foreach ($border as $key => $value) {
$doc->writeAttribute('ss:' . $key, $value);

View file

@ -69,7 +69,7 @@ class Table
if(! isset($this->rows[$x])) {
$this->rows[$x] = new TableRow();
}
/*.TableRow.*/$row = $this->rows[$x];
$row/*: TableRow*/ = $this->rows[$x];
$row->setCell($y, $value);
}
@ -123,7 +123,7 @@ class Table
assert(is_numeric($x) && $x > 0);
assert(is_numeric($cell) && $cell > 0);
/*.TableRow.*/$row = $this->rows[$x];
$row/*: TableRow*/ = $this->rows[$x];
$row->cells[$cell]->merge = $merge;
}
@ -158,7 +158,7 @@ class Table
*/
function getRows()
{
/*.array.*/$keys = array_keys($this->rows);
$keys/*: array*/ = array_keys($this->rows);
return max($keys);
}
@ -169,7 +169,7 @@ class Table
*/
function getRowCells(TableRow $row)
{
/*.array.*/$keys = array_keys($row->cells);
$keys/*: array*/ = array_keys($row->cells);
return max($keys);
}
@ -207,7 +207,7 @@ class Table
/**
* Генерация клетки таблицы (Переработать)
*/
function createCell (TableCell $ncell, XMLWriter $doc, $j, /*.any.*/$value, $setIndex) {
function createCell (TableCell $ncell, XMLWriter $doc, $j, $value/*: any*/, $setIndex) {
$doc->startElement("Cell");
if ($ncell->style) {
@ -267,7 +267,7 @@ class Table
$doc->writeAttribute('ss:Height', $this->rows[$i]->height);
}
/*.TableRow.*/$nrow = $this->rows[$i];
$nrow/*: TableRow*/ = $this->rows[$i];
// Флаг индикатор подстановки номера столбца
$setIndex = false;
for ($j = 1; $j <= $columns; $j++) {