-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugIssues that describe an unexpected behaviour in an existing functionality.Issues that describe an unexpected behaviour in an existing functionality.minor"bug" issues that are neither "critical" nor "major"."bug" issues that are neither "critical" nor "major".
Description
I ran into a strange case where our array sniff for PHP CodeSniffer does not detect a value that's part of a nested array and hence does not enforce a missing trailing comma. Here's a code snippet for reproducing this:
<?php
$a = [
'bla' => [
'blubb' // <-- This line is missing a trailing comma!
],
];I wasn't able to come up with an quick easy fix, because the code that collects the array values is mixed with the code that validates key/value pairs (which IMHO is not necessary at all, since php -l validates keyed arrays):
Metadata
Metadata
Assignees
Labels
bugIssues that describe an unexpected behaviour in an existing functionality.Issues that describe an unexpected behaviour in an existing functionality.minor"bug" issues that are neither "critical" nor "major"."bug" issues that are neither "critical" nor "major".