mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/PdfHandler
synced 2024-11-24 00:07:10 +00:00
Tidy up some documentation
Remove @ error suppression Change-Id: I6da825cf203377b6f25548f9d5112bade4be30d7
This commit is contained in:
parent
7663952c34
commit
c2eae6e584
|
@ -200,7 +200,7 @@ class PdfImage {
|
|||
* of the image description page.
|
||||
*
|
||||
* @param $data Array metadata
|
||||
* @return $data Array post-processed metadata
|
||||
* @return Array post-processed metadata
|
||||
*/
|
||||
protected function postProcessDump( array $data ) {
|
||||
|
||||
|
@ -274,7 +274,7 @@ class PdfImage {
|
|||
// mostly because I am unsure of what a good way to
|
||||
// present that information to the user would be.
|
||||
$pageSizes = array();
|
||||
foreach( $val as $pageNumber => $page ) {
|
||||
foreach( $val as $page ) {
|
||||
if( isset( $page['Page size'] ) ) {
|
||||
$pageSizes[ $page['Page size'] ] = true;
|
||||
}
|
||||
|
|
|
@ -139,7 +139,11 @@ class PdfHandler extends ImageHandler {
|
|||
$metadata = $image->getMetadata();
|
||||
|
||||
if ( !$metadata ) {
|
||||
return $this->doThumbError( @$params['width'], @$params['height'], 'pdf_no_metadata' );
|
||||
return $this->doThumbError(
|
||||
isset( $params['width'] ) ? $params['width'] : null,
|
||||
isset( $params['height'] ) ? $params['height'] : null,
|
||||
'pdf_no_metadata'
|
||||
);
|
||||
}
|
||||
|
||||
if ( !$this->normaliseParams( $image, $params ) ) {
|
||||
|
@ -306,7 +310,10 @@ class PdfHandler extends ImageHandler {
|
|||
return $this->formatMetadataHelper( $meta['mergedMetadata'] );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param $image
|
||||
* @return bool|int
|
||||
*/
|
||||
function pageCount( $image ) {
|
||||
$data = $this->getMetaArray( $image );
|
||||
if ( !$data ) {
|
||||
|
|
Loading…
Reference in a new issue