fix phpstan

This commit is contained in:
Frédéric France 2025-01-11 17:45:29 +01:00
parent b4babd6fcb
commit da7675c822
No known key found for this signature in database
GPG Key ID: CE25B0B7B53B9177
2 changed files with 17 additions and 19 deletions

View File

@ -21108,12 +21108,6 @@ parameters:
count: 1
path: ../../../htdocs/includes/odtphp/Segment.php
-
message: '#^Property Segment\:\:\$name has no type specified\.$#'
identifier: missingType.property
count: 1
path: ../../../htdocs/includes/odtphp/Segment.php
-
message: '#^Property Segment\:\:\$odf has no type specified\.$#'
identifier: missingType.property
@ -21126,18 +21120,6 @@ parameters:
count: 1
path: ../../../htdocs/includes/odtphp/Segment.php
-
message: '#^Property Segment\:\:\$xml has no type specified\.$#'
identifier: missingType.property
count: 1
path: ../../../htdocs/includes/odtphp/Segment.php
-
message: '#^Property Segment\:\:\$xmlParsed has no type specified\.$#'
identifier: missingType.property
count: 1
path: ../../../htdocs/includes/odtphp/Segment.php
-
message: '#^Class SegmentIterator implements generic interface RecursiveIterator but does not specify its types\: TKey, TValue$#'
identifier: missingType.generics

View File

@ -16,8 +16,24 @@ class SegmentException extends Exception
*/
class Segment implements IteratorAggregate, Countable
{
/**
* @var string
*/
protected $xml;
/**
* @var string
*/
protected $savxml;
/**
* @var string
*/
protected $xmlParsed = '';
/**
* @var string
*/
protected $name;
protected $children = array();
protected $vars = array();
@ -30,7 +46,7 @@ class Segment implements IteratorAggregate, Countable
*
* @param string $name name of the segment to construct
* @param string $xml XML tree of the segment
* @param string $odf odf
* @param Odf $odf odf
*/
public function __construct($name, $xml, $odf)
{