-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathphpstan-bootstrap.php
More file actions
52 lines (45 loc) · 1.4 KB
/
phpstan-bootstrap.php
File metadata and controls
52 lines (45 loc) · 1.4 KB
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
42
43
44
45
46
47
48
49
50
51
52
<?php
/**
* PHPStan bootstrap file for Knowledge Base Pro.
*
* @package WebberZone\Knowledge_Base
*/
if ( ! defined( 'WZKB_VERSION' ) ) {
define( 'WZKB_VERSION', '0.0.0' );
}
if ( ! defined( 'WZKB_PLUGIN_FILE' ) ) {
define( 'WZKB_PLUGIN_FILE', '' );
}
if ( ! defined( 'WZKB_PLUGIN_DIR' ) ) {
define( 'WZKB_PLUGIN_DIR', '' );
}
if ( ! defined( 'WZKB_PLUGIN_URL' ) ) {
define( 'WZKB_PLUGIN_URL', '' );
}
if ( ! defined( 'WZKB_DEFAULT_THUMBNAIL_URL' ) ) {
define( 'WZKB_DEFAULT_THUMBNAIL_URL', '' );
}
// Polylang stubs — provide type signatures for static analysis.
if ( ! function_exists( 'pll_get_term' ) ) {
/**
* Get the translated term ID in a given language.
*
* @param int $term_id Term ID.
* @param string $lang Language slug. Defaults to current language.
* @return int|false Translated term ID or false if not found.
*/
function pll_get_term( int $term_id, string $lang = '' ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed
return false;
}
}
if ( ! function_exists( 'pll_current_language' ) ) {
/**
* Get the current language.
*
* @param string $field Field to return ('slug', 'name', etc.). Defaults to 'slug'.
* @return string|false Language field value or false if no language is set.
*/
function pll_current_language( string $field = 'slug' ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.Found
return false;
}
}