Skip to content

Commit c75aa56

Browse files
Fix PHPStan error and remove type hint for compatibility
- Fix class name case: Visualizer_PRO → Visualizer_Pro in Block.php (2 occurrences) - Remove WP_Post type hint from _getChartArray for PHP compatibility 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 5a4ee44 commit c75aa56

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

classes/Visualizer/Gutenberg/Block.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ public function get_visualizer_data( $post ) {
469469
}
470470

471471
if ( Visualizer_Module::is_pro() ) {
472-
$permissions = get_post_meta( $post_id, Visualizer_PRO::CF_PERMISSIONS, true );
472+
$permissions = get_post_meta( $post_id, Visualizer_Pro::CF_PERMISSIONS, true );
473473

474474
if ( empty( $permissions ) ) {
475475
$permissions = array( 'permissions' => array(
@@ -664,7 +664,7 @@ public function update_chart_data( $data ) {
664664
}
665665

666666
if ( Visualizer_Module::is_pro() ) {
667-
update_post_meta( $data['id'], Visualizer_PRO::CF_PERMISSIONS, $data['visualizer-permissions'] );
667+
update_post_meta( $data['id'], Visualizer_Pro::CF_PERMISSIONS, $data['visualizer-permissions'] );
668668
}
669669

670670
if ( $data['visualizer-chart-url'] ) {

classes/Visualizer/Module/Chart.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ public function getCharts() {
379379
*
380380
* @return array The array of chart data.
381381
*/
382-
private function _getChartArray( WP_Post $chart = null ) {
382+
private function _getChartArray( $chart = null ) {
383383
if ( is_null( $chart ) ) {
384384
$chart = $this->_chart;
385385
}

0 commit comments

Comments
 (0)