resourceloader: Clarify operator precedence
Change-Id: I478db046a1cc162c6767003ce45c9b56270f3372
This commit is contained in:
parent
c16f2ef085
commit
ad7e98afbb
2 changed files with 3 additions and 3 deletions
|
|
@ -249,7 +249,7 @@ class ResourceLoaderImageModule extends ResourceLoaderModule {
|
|||
$fileDescriptor = is_string( $options ) ? $options : $options['file'];
|
||||
|
||||
$allowedVariants = array_merge(
|
||||
is_array( $options ) && isset( $options['variants'] ) ? $options['variants'] : [],
|
||||
( is_array( $options ) && isset( $options['variants'] ) ) ? $options['variants'] : [],
|
||||
$this->getGlobalVariants( $context )
|
||||
);
|
||||
if ( isset( $this->variants[$skin] ) ) {
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ class ResourceLoaderImageTest extends ResourceLoaderTestCase {
|
|||
protected function getTestImage( $name ) {
|
||||
$options = ResourceLoaderImageModuleTest::$commonImageData[$name];
|
||||
$fileDescriptor = is_string( $options ) ? $options : $options['file'];
|
||||
$allowedVariants = is_array( $options ) &&
|
||||
isset( $options['variants'] ) ? $options['variants'] : [];
|
||||
$allowedVariants = ( is_array( $options ) && isset( $options['variants'] ) ) ?
|
||||
$options['variants'] : [];
|
||||
$variants = array_fill_keys( $allowedVariants, [ 'color' => 'red' ] );
|
||||
return new ResourceLoaderImageTestable(
|
||||
$name,
|
||||
|
|
|
|||
Loading…
Reference in a new issue