From f9c03c60376ed0bd20c0aeda8c612899787d8b8b Mon Sep 17 00:00:00 2001 From: Kevin Israel Date: Mon, 30 Jul 2018 07:15:55 -0400 Subject: [PATCH] Add parentheses around nested inline IF statements To improve readability of the code. Done using the NestedInlineIfsSniff I wrote for MediaWiki-Codesniffer (T171520, I0ddf05d9). Change-Id: I89ac6e9b5eab1f599fec3686b40a3e01d29d0250 --- tests/phpunit/includes/session/CookieSessionProviderTest.php | 2 +- tests/phpunit/includes/session/PHPSessionHandlerTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/includes/session/CookieSessionProviderTest.php b/tests/phpunit/includes/session/CookieSessionProviderTest.php index aeaf2737d5..33bc29f1ce 100644 --- a/tests/phpunit/includes/session/CookieSessionProviderTest.php +++ b/tests/phpunit/includes/session/CookieSessionProviderTest.php @@ -540,7 +540,7 @@ class CookieSessionProviderTest extends MediaWikiTestCase { 'forceHTTPS' => [ 'value' => $secure ? 'true' : '', 'secure' => false, - 'expire' => $secure ? $remember ? $defaults['expire'] : 0 : -31536000, + 'expire' => $secure ? ( $remember ? $defaults['expire'] : 0 ) : -31536000, ] + $defaults, ]; foreach ( $expect as $key => $value ) { diff --git a/tests/phpunit/includes/session/PHPSessionHandlerTest.php b/tests/phpunit/includes/session/PHPSessionHandlerTest.php index 28fc04aded..b001eb9d7d 100644 --- a/tests/phpunit/includes/session/PHPSessionHandlerTest.php +++ b/tests/phpunit/includes/session/PHPSessionHandlerTest.php @@ -126,7 +126,7 @@ class PHPSessionHandlerTest extends MediaWikiTestCase { $wrap = TestingAccessWrapper::newFromObject( $rProp->getValue() ); $reset[] = new \Wikimedia\ScopedCallback( [ $wrap, 'setEnableFlags' ], - [ $wrap->enable ? $wrap->warn ? 'warn' : 'enable' : 'disable' ] + [ $wrap->enable ? ( $wrap->warn ? 'warn' : 'enable' ) : 'disable' ] ); $wrap->setEnableFlags( 'warn' ); -- 2.20.1