Skip to content

Commit afceecb

Browse files
Fix Chart.php type hint for PHP compatibility
Remove WP_Post type hint from _getChartArray method to match development branch and prevent PHP errors. A typed parameter cannot have a default value of null without using nullable operator. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 5a4ee44 commit afceecb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

classes/Visualizer/Module/Chart.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,11 +375,11 @@ public function getCharts() {
375375
*
376376
* @access private
377377
*
378-
* @param WP_Post $chart The chart object.
378+
* @param WP_Post|null $chart The chart object.
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)