-
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generic/DisallowYodaConditions:
??
should not trigger the sniff
This commit changes the DisallowYodaConditions sniff so that the null coalescing operator (`??`) does not trigger it.
- Loading branch information
1 parent
8d2363d
commit e4d3743
Showing
2 changed files
with
6 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -173,3 +173,5 @@ echo match ($text) { | |
'foo' => 10 === $y, | ||
10 === $y => 'bar', | ||
}; | ||
|
||
1 ?? $nullCoalescingShouldNotTriggerSniff; |