Skip to content

Commit 0b496da

Browse files
committed
PHPStan: fix the build
The last few builds were failing due to the below PHPStan error: ``` ------ --------------------------------- Line tests/RulesetTest.php ------ --------------------------------- 146 Left side of && is always true. ------ --------------------------------- ``` Fixed now. Note: the condition could possibly be removed, but I have a feeling I added it for a reason, so I left it in under the guise of "better safe than sorry".
1 parent 72ec09b commit 0b496da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: tests/RulesetTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ private function run() {
143143
*/
144144
private function collect_phpcs_result() {
145145
$php = '';
146-
if ( \PHP_BINARY && in_array( \PHP_SAPI, [ 'cgi-fcgi', 'cli', 'cli-server', 'phpdbg' ], true ) ) {
146+
if ( defined( 'PHP_BINARY' ) && in_array( \PHP_SAPI, [ 'cgi-fcgi', 'cli', 'cli-server', 'phpdbg' ], true ) ) {
147147
$php = \PHP_BINARY . ' ';
148148
}
149149

0 commit comments

Comments
 (0)