From 44e2d41b8fc5f0ffae2840d06b0f2a9d80c63c98 Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Sun, 26 Sep 2021 13:45:58 +0200 Subject: [PATCH] build: Disable phan option scalar_implicit_cast and make pass Change-Id: I30c11acd17334f292c7a83dba49cf59d182728f3 --- .phan/config.php | 6 +----- includes/PdfHandler.php | 4 ++-- includes/PdfImage.php | 4 ++-- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.phan/config.php b/.phan/config.php index da8397e..76efd06 100644 --- a/.phan/config.php +++ b/.phan/config.php @@ -1,7 +1,3 @@ getMetadataItems( [ 'mergedMetadata', 'pages' ] ); diff --git a/includes/PdfImage.php b/includes/PdfImage.php index fd135ec..1b98e20 100644 --- a/includes/PdfImage.php +++ b/includes/PdfImage.php @@ -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;