mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/PdfHandler
synced 2024-11-23 15:57:17 +00:00
build: Disable phan option scalar_implicit_cast and make pass
Change-Id: I30c11acd17334f292c7a83dba49cf59d182728f3
This commit is contained in:
parent
85fbb12dbe
commit
44e2d41b8f
|
@ -1,7 +1,3 @@
|
|||
<?php
|
||||
|
||||
$cfg = require __DIR__ . '/../vendor/mediawiki/mediawiki-phan-config/src/config.php';
|
||||
|
||||
$cfg['scalar_implicit_cast'] = true;
|
||||
|
||||
return $cfg;
|
||||
return require __DIR__ . '/../vendor/mediawiki/mediawiki-phan-config/src/config.php';
|
||||
|
|
|
@ -230,7 +230,7 @@ class PdfHandler extends ImageHandler {
|
|||
"-quality",
|
||||
$wgPdfHandlerJpegQuality,
|
||||
"-resize",
|
||||
$width,
|
||||
(string)$width,
|
||||
"-",
|
||||
$dstPath
|
||||
);
|
||||
|
@ -304,7 +304,7 @@ class PdfHandler extends ImageHandler {
|
|||
|
||||
/**
|
||||
* @param File $file
|
||||
* @return bool
|
||||
* @return bool|int
|
||||
*/
|
||||
public function isFileMetadataValid( $file ) {
|
||||
$data = $file->getMetadataItems( [ 'mergedMetadata', 'pages' ] );
|
||||
|
|
|
@ -81,9 +81,9 @@ class PdfImage {
|
|||
}
|
||||
$size = explode( 'x', $pageSize, 2 );
|
||||
|
||||
$width = intval( trim( $size[0] ) / 72 * $wgPdfHandlerDpi );
|
||||
$width = intval( (int)trim( $size[0] ) / 72 * $wgPdfHandlerDpi );
|
||||
$height = explode( ' ', trim( $size[1] ), 2 );
|
||||
$height = intval( trim( $height[0] ) / 72 * $wgPdfHandlerDpi );
|
||||
$height = intval( (int)trim( $height[0] ) / 72 * $wgPdfHandlerDpi );
|
||||
if ( ( $pageRotation / 90 ) & 1 ) {
|
||||
// Swap width and height for landscape pages
|
||||
$temp = $width;
|
||||
|
|
Loading…
Reference in a new issue