Skip to content

Commit 9967f74

Browse files
committed
Fix PHPStan definition for "path_append_id" option at TreeListener
1 parent d1988ae commit 9967f74

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Tree/Mapping/Driver/Xml.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public function readExtendedMetadata($meta, array &$config)
108108
throw new InvalidMappingException("Tree Path field - [{$field}] Separator {$separator} is invalid. It must be only one character long.");
109109
}
110110

111-
$appendId = !$this->_isAttributeSet($mapping->{'tree-path'}, 'append_id') || $this->_getBooleanAttribute($mapping->{'tree-path'}, 'append_id');
111+
$appendId = $this->_isAttributeSet($mapping->{'tree-path'}, 'append_id') ? $this->_getBooleanAttribute($mapping->{'tree-path'}, 'append_id') : null;
112112
$startsWithSeparator = $this->_isAttributeSet($mapping->{'tree-path'}, 'starts_with_separator') && $this->_getBooleanAttribute($mapping->{'tree-path'}, 'starts_with_separator');
113113
$endsWithSeparator = !$this->_isAttributeSet($mapping->{'tree-path'}, 'ends_with_separator') || $this->_getBooleanAttribute($mapping->{'tree-path'}, 'ends_with_separator');
114114

src/Tree/TreeListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* path?: string,
3434
* path_source?: string,
3535
* path_separator?: string,
36-
* path_append_id?: bool,
36+
* path_append_id?: ?bool,
3737
* path_starts_with_separator?: bool,
3838
* path_ends_with_separator?: bool,
3939
* path_hash?: string,

0 commit comments

Comments
 (0)