Skip to content

Commit

Permalink
Fix PHPStan definition for "path_append_id" option at TreeListener
Browse files Browse the repository at this point in the history
  • Loading branch information
phansys committed Nov 14, 2022
1 parent d1988ae commit 9967f74
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Tree/Mapping/Driver/Xml.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function readExtendedMetadata($meta, array &$config)
throw new InvalidMappingException("Tree Path field - [{$field}] Separator {$separator} is invalid. It must be only one character long.");
}

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

Expand Down
2 changes: 1 addition & 1 deletion src/Tree/TreeListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* path?: string,
* path_source?: string,
* path_separator?: string,
* path_append_id?: bool,
* path_append_id?: ?bool,
* path_starts_with_separator?: bool,
* path_ends_with_separator?: bool,
* path_hash?: string,
Expand Down

0 comments on commit 9967f74

Please sign in to comment.