From: Kevin Israel Date: Mon, 30 Jul 2018 11:15:55 +0000 (-0400) Subject: Add parentheses around nested inline IF statements X-Git-Tag: 1.34.0-rc.0~4618^2 X-Git-Url: http://git.cyclocoop.org/data/%27%20.%20mediabox_timestamp%28find_in_path%28%27javascript/jquery.colorbox.js%27%29%29%20.%20%27?a=commitdiff_plain;h=f9c03c60376ed0bd20c0aeda8c612899787d8b8b;p=lhc%2Fweb%2Fwiklou.git 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 --- 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' );