Revert explict casts and use implict casts as before

This reverts commit df484dbe70.

Bug: T242517
Change-Id: I60adf4aa64586d457a32cb220b1fcd7518d32a5e
This commit is contained in:
Umherirrender 2020-01-12 08:56:49 +00:00
parent df484dbe70
commit 6bc6eff1e3
3 changed files with 9 additions and 5 deletions

View file

@ -1,3 +1,7 @@
<?php
return require __DIR__ . '/../vendor/mediawiki/mediawiki-phan-config/src/config.php';
$cfg = require __DIR__ . '/../vendor/mediawiki/mediawiki-phan-config/src/config.php';
$cfg['scalar_implicit_cast'] = true;
return $cfg;

View file

@ -212,7 +212,7 @@ class PdfHandler extends ImageHandler {
"-quality",
$wgPdfHandlerJpegQuality,
"-resize",
(string)$width,
$width,
"-",
$dstPath
);
@ -329,7 +329,7 @@ class PdfHandler extends ImageHandler {
/**
* @param File $image
* @param string $metadata
* @return bool|int
* @return bool
*/
public function isMetadataValid( $image, $metadata ) {
if ( !$metadata || $metadata === serialize( [] ) ) {

View file

@ -93,9 +93,9 @@ class PdfImage {
$size = explode( 'x', $o, 2 );
if ( $size ) {
$width = intval( trim( $size[0] ) ) / 72 * $wgPdfHandlerDpi;
$width = intval( trim( $size[0] ) / 72 * $wgPdfHandlerDpi );
$height = explode( ' ', trim( $size[1] ), 2 );
$height = intval( trim( $height[0] ) ) / 72 * $wgPdfHandlerDpi;
$height = intval( trim( $height[0] ) / 72 * $wgPdfHandlerDpi );
if ( ( $r / 90 ) & 1 ) {
// Swap width and height for landscape pages
$t = $width;