Skip to content

Commit

Permalink
Phpstan fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sc0ttkclark committed Oct 27, 2024
1 parent 296b41f commit f2c451e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions wp-admin-ui/class-exports-reports-admin-ui.php
Original file line number Diff line number Diff line change
Expand Up @@ -1500,7 +1500,7 @@ function export() {
$export_file = apply_filters( 'wp_admin_ui_export_pdf_report_file', null, $this );

if ( ! $export_file ) {
$export_file = WP_Admin_UI_Export_PDF::CreateReport( $this );
$export_file = Exports_Reports_Admin_UI_Export_PDF::CreateReport( $this );
}

$this->message( '<strong>Success:</strong> Your export is ready, the download should begin in a few moments. If it doesn\'t, <a href="' . esc_url( $this->export_url . urlencode( $export_file ) ) . '" target="_blank">click here to access your PDF export file</a>.<br /><br />When you are done with your export, <a href="' . esc_url( $this->var_update( [
Expand Down Expand Up @@ -2641,7 +2641,7 @@ function table( $reorder = 0 ) {
'id' => $id,
] ) );
?>
" title="View &#8220;<?php echo htmlentities( $row[ $column ] ); ?>&#8221;"><?php echo wp_kses_post( $row[ $column ] ); ?></a></strong>
" title="View &#8220;<?php echo htmlentities( $row[ $column ], ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 ); ?>&#8221;"><?php echo wp_kses_post( $row[ $column ] ); ?></a></strong>
<?php
} elseif ( $this->edit && ( $reorder == 0 || false === $this->reorder ) ) {
?>
Expand All @@ -2653,7 +2653,7 @@ function table( $reorder = 0 ) {
'id' => $id,
] ) );
?>
" title="Edit &#8220;<?php echo htmlentities( $row[ $column ] ); ?>&#8221;"><?php echo wp_kses_post( $row[ $column ] ); ?></a></strong>
" title="Edit &#8220;<?php echo htmlentities( $row[ $column ], ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 ); ?>&#8221;"><?php echo wp_kses_post( $row[ $column ] ); ?></a></strong>
<?php
} else {
?>
Expand Down Expand Up @@ -2692,7 +2692,7 @@ function table( $reorder = 0 ) {
'action' => 'delete',
'id' => $id,
'_wpnonce' => wp_create_nonce( 'wp-admin-ui-delete' ),
] ) ) . '" onclick="if(confirm(\'You are about to delete this item \'' . htmlentities( $row[ $column ] ) . '\'\n \'Cancel\' to stop, \'OK\' to delete.\')){return true;}return false;">Delete</a></span>';
] ) ) . '" onclick="if(confirm(\'You are about to delete this item \'' . htmlentities( $row[ $column ], ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 ) . '\'\n \'Cancel\' to stop, \'OK\' to delete.\')){return true;}return false;">Delete</a></span>';
}
if ( is_array( $this->custom ) ) {
foreach ( $this->custom as $custom_action => $custom_data ) {
Expand Down
14 changes: 7 additions & 7 deletions wp-admin-ui/includes/export-pdf.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?php

/**
* Class WP_Admin_UI_Export_PDF
* Class Exports_Reports_Admin_UI_Export_PDF
*/
class WP_Admin_UI_Export_PDF extends TCPDF {
class Exports_Reports_Admin_UI_Export_PDF extends TCPDF {

/** WP_Admin_UI $admin */
/** Exports_Reports_Admin_UI $admin */
var $admin = null;

/**
* @param WP_Admin_UI $admin
* @param Exports_Reports_Admin_UI $admin
* @param string $orientation
* @param string $unit
* @param string $format
Expand All @@ -20,7 +20,7 @@ class WP_Admin_UI_Export_PDF extends TCPDF {
*
* @return self
*/
public static function setupPDFClass( WP_Admin_UI $admin, $orientation = 'P', $unit = 'mm', $format = 'A4', $unicode = true, $encoding = 'UTF-8', $diskcache = false, $pdfa = false ) {
public static function setupPDFClass( Exports_Reports_Admin_UI $admin, $orientation = 'P', $unit = 'mm', $format = 'A4', $unicode = true, $encoding = 'UTF-8', $diskcache = false, $pdfa = false ) {
$obj = new self( $orientation, $unit, $format, $unicode, $encoding, $diskcache, $pdfa );

$obj->admin = $admin;
Expand Down Expand Up @@ -174,7 +174,7 @@ public function Footer() {
}

/**
* @param WP_Admin_UI $admin
* @param Exports_Reports_Admin_UI $admin
*
* @return string Report file name
*/
Expand Down Expand Up @@ -266,7 +266,7 @@ public static function CreateReport( $admin ) {
}

/**
* @param WP_Admin_UI $admin
* @param Exports_Reports_Admin_UI $admin
*
* @return string
*/
Expand Down

0 comments on commit f2c451e

Please sign in to comment.