fix: noverify + типы для правил провеки
This commit is contained in:
parent
9680409ba9
commit
90cbd3b2b6
10 changed files with 319 additions and 300 deletions
|
|
@ -17,21 +17,21 @@ class Document {
|
|||
}
|
||||
|
||||
/**
|
||||
* Добавление стиля к документу
|
||||
* @param $name string Имя стиля
|
||||
* @param $values array Параметры стиля
|
||||
* @param $type Тип стиля
|
||||
* Добавление стиля к документу
|
||||
* @param string $name string Имя стиля
|
||||
* @param array $values array Параметры стиля
|
||||
* @param string $type Тип стиля
|
||||
*/
|
||||
function setStyle ($name, array $values, $type = 'Interior')
|
||||
{
|
||||
if(!isset($this->styles[$name])) {
|
||||
$this->styles[$name] = [];
|
||||
}
|
||||
$this->styles[$name] = [];
|
||||
}
|
||||
$this->styles[$name][$type] = $values;
|
||||
}
|
||||
|
||||
/**
|
||||
* Генерация стилей
|
||||
* Генерация стилей
|
||||
*/
|
||||
private function createStyles (XMLWriter $doc) {
|
||||
$doc->startElement('Styles');
|
||||
|
|
@ -43,7 +43,6 @@ class Document {
|
|||
if ($type == 'Borders') {
|
||||
$doc->startElement('Borders');
|
||||
foreach ($s as $border) {
|
||||
$border/*: array*/ = $border;
|
||||
$doc->startElement('Border');
|
||||
foreach ($border as $key => $value) {
|
||||
$doc->writeAttribute('ss:' . $key, $value);
|
||||
|
|
@ -72,8 +71,8 @@ class Document {
|
|||
|
||||
return strtr($s, ["\n" => " "]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
/**
|
||||
* Сохраняет таблицу в формате Office 2003 XML
|
||||
* http://en.wikipedia.org/wiki/Microsoft_Office_XML_formats
|
||||
*/
|
||||
|
|
@ -90,7 +89,7 @@ class Document {
|
|||
$doc->writeAttribute('xmlns:ss', self::$ns);
|
||||
|
||||
$this->createStyles($doc);
|
||||
|
||||
|
||||
foreach ($this->table as $table) {
|
||||
if ($table instanceof Table) {
|
||||
$table->createTable($doc);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue