Skip to content

Commit 936eb46

Browse files
committed
chore: fix phpstan
1 parent 4efe7a7 commit 936eb46

2 files changed

Lines changed: 15 additions & 3 deletions

File tree

classes/Visualizer/Module/Admin.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,11 @@ public function enqueueLibraryScripts( $suffix ) {
692692
if ( $has_d3 ) {
693693
$d3_renderer_asset = VISUALIZER_ABSPATH . '/classes/Visualizer/D3Renderer/build/index.asset.php';
694694
if ( file_exists( $d3_renderer_asset ) && ! wp_script_is( 'visualizer-d3-renderer', 'registered' ) ) {
695-
/** @phpstan-ignore-next-line -- Build asset may not exist in source checkout. */
695+
/**
696+
* Ignore missing build asset in source checkout.
697+
*
698+
* @phpstan-ignore-next-line
699+
*/
696700
$d3_asset = include $d3_renderer_asset;
697701
wp_register_script(
698702
'visualizer-d3-renderer',
@@ -707,7 +711,11 @@ public function enqueueLibraryScripts( $suffix ) {
707711

708712
$chart_builder_asset = VISUALIZER_ABSPATH . '/classes/Visualizer/ChartBuilder/build/index.asset.php';
709713
if ( file_exists( $chart_builder_asset ) ) {
710-
/** @phpstan-ignore-next-line -- Build asset may not exist in source checkout. */
714+
/**
715+
* Ignore missing build asset in source checkout.
716+
*
717+
* @phpstan-ignore-next-line
718+
*/
711719
$asset = include $chart_builder_asset;
712720
$chart_builder_deps = $asset['dependencies'];
713721
if ( ! wp_script_is( 'visualizer-handsontable', 'registered' ) && defined( 'Visualizer_Pro_ABSURL' ) && defined( 'VISUALIZER_PRO_VERSION' ) ) {

classes/Visualizer/Module/Frontend.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,11 @@ public function renderChart( $atts ) {
502502
if ( 'd3' === $library ) {
503503
$d3_renderer_asset = VISUALIZER_ABSPATH . '/classes/Visualizer/D3Renderer/build/index.asset.php';
504504
if ( file_exists( $d3_renderer_asset ) && ! wp_script_is( 'visualizer-d3-renderer', 'registered' ) ) {
505-
/** @phpstan-ignore-next-line -- Build asset may not exist in source checkout. */
505+
/**
506+
* Ignore missing build asset in source checkout.
507+
*
508+
* @phpstan-ignore-next-line
509+
*/
506510
$d3_asset = include $d3_renderer_asset;
507511
wp_register_script(
508512
'visualizer-d3-renderer',

0 commit comments

Comments
 (0)