Skip to content

Commit

Permalink
fix: Sniff options parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
gskema committed Dec 11, 2023
1 parent b5c2829 commit 28f954b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to `phpcs-type-sniff` will be documented in this file.

Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) principles.

## 81.3.2 - 2023-12-11
### Fixed
- Sniff options parsing

## 81.3.1 - 2023-12-11
### Fixed
- Fixed parsing of `new` initializers in promoted constructor properties
Expand Down
3 changes: 3 additions & 0 deletions src/Sniffs/AbstractConfigurableSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ public function process(File $file, $ptr): void
}
}

// since 3.8.0
$opts = array_map(fn ($value) => $value['value'] ?? $value, $opts);

array_walk_recursive($opts, function (&$val) {
if ('true' === $val) {
$val = true;
Expand Down

0 comments on commit 28f954b

Please sign in to comment.