-
Notifications
You must be signed in to change notification settings - Fork 0
/
intelephense.php
41 lines (36 loc) · 1.12 KB
/
intelephense.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
/**
* Dummy file to make intelephense (PHP linter in VSCode) happy. Will never
* be actually executed nor imported. Workaround for issues like
* * https://github.com/bmewburn/vscode-intelephense/issues/568
* * https://github.com/bmewburn/vscode-intelephense/issues/952
* * https://github.com/bmewburn/vscode-intelephense/issues/1042
* * https://github.com/bmewburn/vscode-intelephense/issues/1045
*
* The idea is to avoid false intelephense errors on lines like
* if (defined('WP_DEBUG') && WP_DEBUG) {
*
* @package FramerightImageDisplayControl\Intelephense
*/
// makes PHP_CodeSniffer happy:
if (true || false) {
throw new \Exception('Do not import nor run me');
}
/**
* See https://wordpress.org/support/article/debugging-in-wordpress/
*/
define('WP_DEBUG', false);
/**
* See https://developer.wordpress.org/reference/classes/wp_filesystem_base/abspath/
*/
define('ABSPATH', '');
/**
* See https://developer.wordpress.org/reference/functions/add_action/
*/
function add_action() {
}
/**
* See https://developer.wordpress.org/reference/functions/current_action/
*/
function current_action() {
}