Skip to content

Commit 5360e48

Browse files
chore: tweaks
1 parent 289b2d7 commit 5360e48

3 files changed

Lines changed: 6 additions & 151 deletions

File tree

phpstan-baseline.neon

Lines changed: 0 additions & 150 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,6 @@ parameters:
1818
count: 1
1919
path: classes/Visualizer/Gutenberg/Block.php
2020

21-
-
22-
message: '#^Constant VISUALIZER_ABSPATH not found\.$#'
23-
identifier: constant.notFound
24-
count: 1
25-
path: classes/Visualizer/Gutenberg/Block.php
26-
27-
-
28-
message: '#^Constant VISUALIZER_ABSURL not found\.$#'
29-
identifier: constant.notFound
30-
count: 7
31-
path: classes/Visualizer/Gutenberg/Block.php
32-
3321
-
3422
message: '#^If condition is always false\.$#'
3523
identifier: if.alwaysFalse
@@ -222,18 +210,6 @@ parameters:
222210
count: 1
223211
path: classes/Visualizer/Gutenberg/Block.php
224212

225-
-
226-
message: '#^Constant VISUALIZER_ABSPATH not found\.$#'
227-
identifier: constant.notFound
228-
count: 2
229-
path: classes/Visualizer/Module.php
230-
231-
-
232-
message: '#^Constant VISUALIZER_ABSURL not found\.$#'
233-
identifier: constant.notFound
234-
count: 2
235-
path: classes/Visualizer/Module.php
236-
237213
-
238214
message: '#^Constant VISUALIZER_PRO_VERSION not found\.$#'
239215
identifier: constant.notFound
@@ -624,30 +600,6 @@ parameters:
624600
count: 2
625601
path: classes/Visualizer/Module/Admin.php
626602

627-
-
628-
message: '#^Constant VISUALIZER_ABSPATH not found\.$#'
629-
identifier: constant.notFound
630-
count: 2
631-
path: classes/Visualizer/Module/Admin.php
632-
633-
-
634-
message: '#^Constant VISUALIZER_ABSURL not found\.$#'
635-
identifier: constant.notFound
636-
count: 12
637-
path: classes/Visualizer/Module/Admin.php
638-
639-
-
640-
message: '#^Constant VISUALIZER_BASEFILE not found\.$#'
641-
identifier: constant.notFound
642-
count: 3
643-
path: classes/Visualizer/Module/Admin.php
644-
645-
-
646-
message: '#^Constant VISUALIZER_DIRNAME not found\.$#'
647-
identifier: constant.notFound
648-
count: 4
649-
path: classes/Visualizer/Module/Admin.php
650-
651603
-
652604
message: '#^Function icl_get_current_language not found\.$#'
653605
identifier: function.notFound
@@ -1200,18 +1152,6 @@ parameters:
12001152
count: 1
12011153
path: classes/Visualizer/Module/Chart.php
12021154

1203-
-
1204-
message: '#^Constant VISUALIZER_ABSPATH not found\.$#'
1205-
identifier: constant.notFound
1206-
count: 2
1207-
path: classes/Visualizer/Module/Chart.php
1208-
1209-
-
1210-
message: '#^Constant VISUALIZER_ABSURL not found\.$#'
1211-
identifier: constant.notFound
1212-
count: 10
1213-
path: classes/Visualizer/Module/Chart.php
1214-
12151155
-
12161156
message: '#^If condition is always true\.$#'
12171157
identifier: if.alwaysTrue
@@ -1494,12 +1434,6 @@ parameters:
14941434
count: 1
14951435
path: classes/Visualizer/Module/Frontend.php
14961436

1497-
-
1498-
message: '#^Constant VISUALIZER_ABSURL not found\.$#'
1499-
identifier: constant.notFound
1500-
count: 1
1501-
path: classes/Visualizer/Module/Frontend.php
1502-
15031437
-
15041438
message: '#^Function icl_get_current_language not found\.$#'
15051439
identifier: function.notFound
@@ -1686,12 +1620,6 @@ parameters:
16861620
count: 1
16871621
path: classes/Visualizer/Module/Setup.php
16881622

1689-
-
1690-
message: '#^Constant VISUALIZER_BASEFILE not found\.$#'
1691-
identifier: constant.notFound
1692-
count: 3
1693-
path: classes/Visualizer/Module/Setup.php
1694-
16951623
-
16961624
message: '#^Function delete_option invoked with 2 parameters, 1 required\.$#'
16971625
identifier: arguments.count
@@ -2040,18 +1968,6 @@ parameters:
20401968
count: 1
20411969
path: classes/Visualizer/Module/Wizard.php
20421970

2043-
-
2044-
message: '#^Constant VISUALIZER_ABSPATH not found\.$#'
2045-
identifier: constant.notFound
2046-
count: 4
2047-
path: classes/Visualizer/Module/Wizard.php
2048-
2049-
-
2050-
message: '#^Constant VISUALIZER_ABSURL not found\.$#'
2051-
identifier: constant.notFound
2052-
count: 6
2053-
path: classes/Visualizer/Module/Wizard.php
2054-
20551971
-
20561972
message: '#^Method Visualizer_Module_Wizard\:\:registerAdminMenu\(\) has no return type specified\.$#'
20571973
identifier: missingType.return
@@ -2286,12 +2202,6 @@ parameters:
22862202
count: 1
22872203
path: classes/Visualizer/Render/Layout.php
22882204

2289-
-
2290-
message: '#^Constant VISUALIZER_ABSURL not found\.$#'
2291-
identifier: constant.notFound
2292-
count: 2
2293-
path: classes/Visualizer/Render/Layout.php
2294-
22952205
-
22962206
message: '#^Method Visualizer_Render_Layout\:\:_renderDbQuery\(\) has no return type specified\.$#'
22972207
identifier: missingType.return
@@ -2460,12 +2370,6 @@ parameters:
24602370
count: 1
24612371
path: classes/Visualizer/Render/Library.php
24622372

2463-
-
2464-
message: '#^Constant VISUALIZER_ABSURL not found\.$#'
2465-
identifier: constant.notFound
2466-
count: 1
2467-
path: classes/Visualizer/Render/Library.php
2468-
24692373
-
24702374
message: '#^Method Visualizer_Render_Library\:\:_renderChartBox\(\) has no return type specified\.$#'
24712375
identifier: missingType.return
@@ -2568,12 +2472,6 @@ parameters:
25682472
count: 1
25692473
path: classes/Visualizer/Render/Page/Data.php
25702474

2571-
-
2572-
message: '#^Constant VISUALIZER_ABSURL not found\.$#'
2573-
identifier: constant.notFound
2574-
count: 1
2575-
path: classes/Visualizer/Render/Page/Data.php
2576-
25772475
-
25782476
message: '#^Left side of && is always true\.$#'
25792477
identifier: booleanAnd.leftAlwaysTrue
@@ -2634,12 +2532,6 @@ parameters:
26342532
count: 1
26352533
path: classes/Visualizer/Render/Page/Settings.php
26362534

2637-
-
2638-
message: '#^Constant VISUALIZER_ABSURL not found\.$#'
2639-
identifier: constant.notFound
2640-
count: 1
2641-
path: classes/Visualizer/Render/Page/Settings.php
2642-
26432535
-
26442536
message: '#^Method Visualizer_Render_Page_Settings\:\:_renderContent\(\) has no return type specified\.$#'
26452537
identifier: missingType.return
@@ -2808,18 +2700,6 @@ parameters:
28082700
count: 1
28092701
path: classes/Visualizer/Render/Sidebar.php
28102702

2811-
-
2812-
message: '#^Constant VISUALIZER_ABSPATH not found\.$#'
2813-
identifier: constant.notFound
2814-
count: 1
2815-
path: classes/Visualizer/Render/Sidebar.php
2816-
2817-
-
2818-
message: '#^Constant VISUALIZER_ABSURL not found\.$#'
2819-
identifier: constant.notFound
2820-
count: 1
2821-
path: classes/Visualizer/Render/Sidebar.php
2822-
28232703
-
28242704
message: '#^Default value of the parameter \#1 \$title \(false\) of method Visualizer_Render_Sidebar\:\:_renderSectionStart\(\) is incompatible with type string\.$#'
28252705
identifier: parameter.defaultValue
@@ -3180,12 +3060,6 @@ parameters:
31803060
count: 1
31813061
path: classes/Visualizer/Render/Sidebar/ChartJS.php
31823062

3183-
-
3184-
message: '#^Constant VISUALIZER_ABSURL not found\.$#'
3185-
identifier: constant.notFound
3186-
count: 2
3187-
path: classes/Visualizer/Render/Sidebar/ChartJS.php
3188-
31893063
-
31903064
message: '#^Method Visualizer_Render_Sidebar_ChartJS\:\:__construct\(\) has parameter \$data with no value type specified in iterable type array\.$#'
31913065
identifier: missingType.iterableValue
@@ -3372,12 +3246,6 @@ parameters:
33723246
count: 1
33733247
path: classes/Visualizer/Render/Sidebar/Google.php
33743248

3375-
-
3376-
message: '#^Constant VISUALIZER_ABSURL not found\.$#'
3377-
identifier: constant.notFound
3378-
count: 3
3379-
path: classes/Visualizer/Render/Sidebar/Google.php
3380-
33813249
-
33823250
message: '#^Method Visualizer_Render_Sidebar_Google\:\:__construct\(\) has parameter \$data with no value type specified in iterable type array\.$#'
33833251
identifier: missingType.iterableValue
@@ -3918,12 +3786,6 @@ parameters:
39183786
count: 1
39193787
path: classes/Visualizer/Render/Sidebar/Type/DataTable/DataTable.php
39203788

3921-
-
3922-
message: '#^Constant VISUALIZER_ABSURL not found\.$#'
3923-
identifier: constant.notFound
3924-
count: 6
3925-
path: classes/Visualizer/Render/Sidebar/Type/DataTable/DataTable.php
3926-
39273789
-
39283790
message: '#^Method Visualizer_Render_Sidebar_Type_DataTable_DataTable\:\:__construct\(\) has parameter \$data with no value type specified in iterable type array\.$#'
39293791
identifier: missingType.iterableValue
@@ -4086,12 +3948,6 @@ parameters:
40863948
count: 1
40873949
path: classes/Visualizer/Render/Sidebar/Type/DataTable/Tabular.php
40883950

4089-
-
4090-
message: '#^Constant VISUALIZER_ABSURL not found\.$#'
4091-
identifier: constant.notFound
4092-
count: 6
4093-
path: classes/Visualizer/Render/Sidebar/Type/DataTable/Tabular.php
4094-
40953951
-
40963952
message: '#^Method Visualizer_Render_Sidebar_Type_DataTable_Tabular\:\:__construct\(\) has parameter \$data with no value type specified in iterable type array\.$#'
40973953
identifier: missingType.iterableValue
@@ -5472,12 +5328,6 @@ parameters:
54725328
count: 1
54735329
path: classes/Visualizer/Source/Query/Params.php
54745330

5475-
-
5476-
message: '#^Constant VISUALIZER_BASEFILE not found\.$#'
5477-
identifier: constant.notFound
5478-
count: 1
5479-
path: index.php
5480-
54815331
-
54825332
message: '#^Function visualizer_launch\(\) has no return type specified\.$#'
54835333
identifier: missingType.return

phpstan.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ parameters:
1212
ignoreErrors:
1313
-
1414
identifiers:
15-
- include.fileNotFound
1615
- requireOnce.fileNotFound
1716
includes:
1817
- %currentWorkingDirectory%/vendor/szepeviktor/phpstan-wordpress/extension.neon

tests/php/static-analysis-stubs/symbols.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
<?php
2+
3+
define( 'VISUALIZER_BASEFILE', dirname( __FILE__, 4 ) . '/index.php' );
4+
define( 'VISUALIZER_BASENAME', plugin_basename( VISUALIZER_BASEFILE ) );
5+
define( 'VISUALIZER_ABSURL', plugins_url( '/', VISUALIZER_BASEFILE ) );
6+
define( 'VISUALIZER_ABSPATH', dirname( VISUALIZER_BASEFILE ) );
7+
define( 'VISUALIZER_DIRNAME', basename( VISUALIZER_ABSPATH ) );
28
define( 'VISUALIZER_REST_VERSION', 1 );
39
// if the below is true, then the js/customization.js in the plugin folder will be used instead of the one in the uploads folder (if it exists).
410
// this is also used in Block.php

0 commit comments

Comments
 (0)