fix phpstan

This commit is contained in:
Frédéric France 2025-01-09 21:11:26 +01:00
parent 01a956a48a
commit 8ad5751d91
No known key found for this signature in database
GPG Key ID: CE25B0B7B53B9177

View File

@ -36,19 +36,41 @@ class Odf
'DELIMITER_RIGHT' => '}',
'PATH_TO_TMP' => '/tmp'
);
/**
* @var PclZipProxy|PhpZipProxy
*/
protected $file;
protected $contentXml; // To store content of content.xml file
/**
* @var string To store content of content.xml file
*/
protected $contentXml;
protected $metaXml; // To store content of meta.xml file
protected $stylesXml; // To store content of styles.xml file
protected $manifestXml; // To store content of META-INF/manifest.xml file
protected $tmpfile;
/**
* @var string
*/
protected $tmpdir='';
protected $images = array();
protected $vars = array();
protected $segments = array();
/**
* @var string
*/
public $creator;
/**
* @var string
*/
public $title;
/**
* @var string
*/
public $subject;
public $userdefined=array();
@ -566,13 +588,11 @@ IMG;
$matches = array();
preg_match_all($reg, $xml, $matches, PREG_SET_ORDER);
//var_dump($this->vars);exit;
foreach ($matches as $match) { // For each match, if there is no entry into this->vars, we add it
if (! empty($match[1]) && ! isset($this->vars[$match[1]])) {
$this->vars[$match[1]] = ''; // Not defined, so we set it to '', we just need entry into this->vars for next loop
}
}
//var_dump($this->vars);exit;
// Conditionals substitution
// Note: must be done before static substitution, else the variable will be replaced by its value and the conditional won't work anymore