Skip to content

Commit 7c8f25e

Browse files
committed
chore: update baseline
1 parent 6dfbe3d commit 7c8f25e

2 files changed

Lines changed: 9 additions & 10 deletions

File tree

classes/Visualizer/Gutenberg/Block.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,15 @@ public function enqueue_gutenberg_scripts() {
7272
$blockPath = VISUALIZER_ABSURL . 'classes/Visualizer/Gutenberg/build/index.js';
7373
$stylePath = VISUALIZER_ABSURL . 'classes/Visualizer/Gutenberg/build/style-index.css';
7474
$asset_path = VISUALIZER_ABSPATH . '/classes/Visualizer/Gutenberg/build/index.asset.php';
75-
$asset = file_exists( $asset_path ) ? include $asset_path : array(
76-
'dependencies' => array(),
77-
'version' => $this->version,
78-
);
75+
if ( file_exists( $asset_path ) ) {
76+
/** @phpstan-ignore-next-line */
77+
$asset = require $asset_path;
78+
} else {
79+
$asset = array(
80+
'dependencies' => array(),
81+
'version' => $this->version,
82+
);
83+
}
7984

8085
if ( VISUALIZER_TEST_JS_CUSTOMIZATION ) {
8186
$asset['version'] = filemtime( VISUALIZER_ABSPATH . '/classes/Visualizer/Gutenberg/build/index.js' );

phpstan-baseline.neon

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,6 @@ parameters:
102102
count: 1
103103
path: classes/Visualizer/Gutenberg/Block.php
104104

105-
-
106-
message: '#^Path in include\(\) "/Users/hardeep/Development/sites/particles/wp\-content/plugins/visualizer/classes/Visualizer/Gutenberg/build/index\.asset\.php" is not a file or it does not exist\.$#'
107-
identifier: include.fileNotFound
108-
count: 1
109-
path: classes/Visualizer/Gutenberg/Block.php
110-
111105
-
112106
message: '#^Constant VISUALIZER_PRO_VERSION not found\.$#'
113107
identifier: constant.notFound

0 commit comments

Comments
 (0)