build: Updating mediawiki/mediawiki-phan-config to 0.8.0

Cast division and multiply to int, because that is what needed later

Bug: T235049
Change-Id: I70855b4674e69c332b73ed0fd28c4d1fd79f8da5
isekai
Umherirrender 5 years ago
parent f9bbb4c0ee
commit 93dd4042cf

@ -4,7 +4,7 @@
"mediawiki/mediawiki-codesniffer": "28.0.0", "mediawiki/mediawiki-codesniffer": "28.0.0",
"jakub-onderka/php-console-highlighter": "0.3.2", "jakub-onderka/php-console-highlighter": "0.3.2",
"mediawiki/minus-x": "0.3.1", "mediawiki/minus-x": "0.3.1",
"mediawiki/mediawiki-phan-config": "0.6.1" "mediawiki/mediawiki-phan-config": "0.8.0"
}, },
"scripts": { "scripts": {
"fix": [ "fix": [

@ -9,7 +9,7 @@ class TimelessTemplate extends BaseTemplate {
/** @var array */ /** @var array */
protected $pileOfTools; protected $pileOfTools;
/** @var array */ /** @var (array|false)[] */
protected $sidebar; protected $sidebar;
/** @var array|null */ /** @var array|null */
@ -460,6 +460,7 @@ class TimelessTemplate extends BaseTemplate {
} }
// Numeric strings gets an integer when set as key, cast back - T73639 // Numeric strings gets an integer when set as key, cast back - T73639
$name = (string)$name; $name = (string)$name;
// @phan-suppress-next-line PhanTypeArraySuspiciousNullable
$html .= $this->getPortlet( $name, $content['content'] ); $html .= $this->getPortlet( $name, $content['content'] );
} }
@ -1032,11 +1033,11 @@ class TimelessTemplate extends BaseTemplate {
} elseif ( $bound >= 230 && $bound <= 330 ) { } elseif ( $bound >= 230 && $bound <= 330 ) {
// It's a 2x image // It's a 2x image
$logoData['width'] = $width / 2; $logoData['width'] = (int)( $width / 2 );
$logoData['height'] = $height / 2; $logoData['height'] = (int)( $height / 2 );
$logoData['1x'] = $file->createThumb( $logoData['width'] ); $logoData['1x'] = $file->createThumb( $logoData['width'] );
$logoData['1.5x'] = $file->createThumb( $logoData['width'] * 1.5 ); $logoData['1.5x'] = $file->createThumb( (int)( $logoData['width'] * 1.5 ) );
if ( $svg || $file->mustRender() ) { if ( $svg || $file->mustRender() ) {
$logoData['2x'] = $file->createThumb( $logoData['width'] * 2 ); $logoData['2x'] = $file->createThumb( $logoData['width'] * 2 );
@ -1052,7 +1053,7 @@ class TimelessTemplate extends BaseTemplate {
$logoData['1x'] = $file->createThumb( $logoData['width'] ); $logoData['1x'] = $file->createThumb( $logoData['width'] );
if ( $svg || $logoData['width'] * 1.5 <= $width ) { if ( $svg || $logoData['width'] * 1.5 <= $width ) {
$logoData['1.5x'] = $file->createThumb( $logoData['width'] * 1.5 ); $logoData['1.5x'] = $file->createThumb( (int)( $logoData['width'] * 1.5 ) );
} }
if ( $svg || $logoData['width'] * 2 <= $width ) { if ( $svg || $logoData['width'] * 2 <= $width ) {
$logoData['2x'] = $file->createThumb( $logoData['width'] * $large ); $logoData['2x'] = $file->createThumb( $logoData['width'] * $large );

Loading…
Cancel
Save