diff --git a/CHANGELOG.md b/CHANGELOG.md index e195024..967d7e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/Sniffs/AbstractConfigurableSniff.php b/src/Sniffs/AbstractConfigurableSniff.php index 56fc488..5a2123e 100644 --- a/src/Sniffs/AbstractConfigurableSniff.php +++ b/src/Sniffs/AbstractConfigurableSniff.php @@ -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;