Skip to content

Commit 289b2d7

Browse files
chore: tweaks
1 parent 19e24e9 commit 289b2d7

File tree

3 files changed

+229
-23
lines changed

3 files changed

+229
-23
lines changed

phpstan-baseline.neon

Lines changed: 228 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@ 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+
2133
-
2234
message: '#^If condition is always false\.$#'
2335
identifier: if.alwaysFalse
@@ -210,6 +222,18 @@ parameters:
210222
count: 1
211223
path: classes/Visualizer/Gutenberg/Block.php
212224

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+
213237
-
214238
message: '#^Constant VISUALIZER_PRO_VERSION not found\.$#'
215239
identifier: constant.notFound
@@ -486,12 +510,6 @@ parameters:
486510
count: 1
487511
path: classes/Visualizer/Module.php
488512

489-
-
490-
message: '#^Path in include_once\(\) "/Users/robert/Local Sites/redirection\-phpstan/app/public/wp\-content/plugins/visualizer/tests/php/static\-analysis\-stubs/vendor/autoload\.php" is not a file or it does not exist\.$#'
491-
identifier: includeOnce.fileNotFound
492-
count: 1
493-
path: classes/Visualizer/Module.php
494-
495513
-
496514
message: '#^Variable \$chart might not be defined\.$#'
497515
identifier: variable.undefined
@@ -606,6 +624,30 @@ parameters:
606624
count: 2
607625
path: classes/Visualizer/Module/Admin.php
608626

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+
609651
-
610652
message: '#^Function icl_get_current_language not found\.$#'
611653
identifier: function.notFound
@@ -1020,12 +1062,6 @@ parameters:
10201062
count: 1
10211063
path: classes/Visualizer/Module/Admin.php
10221064

1023-
-
1024-
message: '#^Path in include_once\(\) "/Users/robert/Local Sites/redirection\-phpstan/app/public/wp\-content/plugins/visualizer/tests/php/static\-analysis\-stubs/templates/support\.php" is not a file or it does not exist\.$#'
1025-
identifier: includeOnce.fileNotFound
1026-
count: 1
1027-
path: classes/Visualizer/Module/Admin.php
1028-
10291065
-
10301066
message: '#^Property WP_Screen\:\:\$id \(string\) in isset\(\) is not nullable\.$#'
10311067
identifier: isset.property
@@ -1164,6 +1200,18 @@ parameters:
11641200
count: 1
11651201
path: classes/Visualizer/Module/Chart.php
11661202

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+
11671215
-
11681216
message: '#^If condition is always true\.$#'
11691217
identifier: if.alwaysTrue
@@ -1446,6 +1494,12 @@ parameters:
14461494
count: 1
14471495
path: classes/Visualizer/Module/Frontend.php
14481496

1497+
-
1498+
message: '#^Constant VISUALIZER_ABSURL not found\.$#'
1499+
identifier: constant.notFound
1500+
count: 1
1501+
path: classes/Visualizer/Module/Frontend.php
1502+
14491503
-
14501504
message: '#^Function icl_get_current_language not found\.$#'
14511505
identifier: function.notFound
@@ -1632,6 +1686,12 @@ parameters:
16321686
count: 1
16331687
path: classes/Visualizer/Module/Setup.php
16341688

1689+
-
1690+
message: '#^Constant VISUALIZER_BASEFILE not found\.$#'
1691+
identifier: constant.notFound
1692+
count: 3
1693+
path: classes/Visualizer/Module/Setup.php
1694+
16351695
-
16361696
message: '#^Function delete_option invoked with 2 parameters, 1 required\.$#'
16371697
identifier: arguments.count
@@ -1980,6 +2040,18 @@ parameters:
19802040
count: 1
19812041
path: classes/Visualizer/Module/Wizard.php
19822042

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+
19832055
-
19842056
message: '#^Method Visualizer_Module_Wizard\:\:registerAdminMenu\(\) has no return type specified\.$#'
19852057
identifier: missingType.return
@@ -2214,6 +2286,12 @@ parameters:
22142286
count: 1
22152287
path: classes/Visualizer/Render/Layout.php
22162288

2289+
-
2290+
message: '#^Constant VISUALIZER_ABSURL not found\.$#'
2291+
identifier: constant.notFound
2292+
count: 2
2293+
path: classes/Visualizer/Render/Layout.php
2294+
22172295
-
22182296
message: '#^Method Visualizer_Render_Layout\:\:_renderDbQuery\(\) has no return type specified\.$#'
22192297
identifier: missingType.return
@@ -2382,6 +2460,12 @@ parameters:
23822460
count: 1
23832461
path: classes/Visualizer/Render/Library.php
23842462

2463+
-
2464+
message: '#^Constant VISUALIZER_ABSURL not found\.$#'
2465+
identifier: constant.notFound
2466+
count: 1
2467+
path: classes/Visualizer/Render/Library.php
2468+
23852469
-
23862470
message: '#^Method Visualizer_Render_Library\:\:_renderChartBox\(\) has no return type specified\.$#'
23872471
identifier: missingType.return
@@ -2484,6 +2568,12 @@ parameters:
24842568
count: 1
24852569
path: classes/Visualizer/Render/Page/Data.php
24862570

2571+
-
2572+
message: '#^Constant VISUALIZER_ABSURL not found\.$#'
2573+
identifier: constant.notFound
2574+
count: 1
2575+
path: classes/Visualizer/Render/Page/Data.php
2576+
24872577
-
24882578
message: '#^Left side of && is always true\.$#'
24892579
identifier: booleanAnd.leftAlwaysTrue
@@ -2544,6 +2634,12 @@ parameters:
25442634
count: 1
25452635
path: classes/Visualizer/Render/Page/Settings.php
25462636

2637+
-
2638+
message: '#^Constant VISUALIZER_ABSURL not found\.$#'
2639+
identifier: constant.notFound
2640+
count: 1
2641+
path: classes/Visualizer/Render/Page/Settings.php
2642+
25472643
-
25482644
message: '#^Method Visualizer_Render_Page_Settings\:\:_renderContent\(\) has no return type specified\.$#'
25492645
identifier: missingType.return
@@ -2712,6 +2808,18 @@ parameters:
27122808
count: 1
27132809
path: classes/Visualizer/Render/Sidebar.php
27142810

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+
27152823
-
27162824
message: '#^Default value of the parameter \#1 \$title \(false\) of method Visualizer_Render_Sidebar\:\:_renderSectionStart\(\) is incompatible with type string\.$#'
27172825
identifier: parameter.defaultValue
@@ -2982,12 +3090,6 @@ parameters:
29823090
count: 1
29833091
path: classes/Visualizer/Render/Sidebar.php
29843092

2985-
-
2986-
message: '#^Path in include_once\(\) "/Users/robert/Local Sites/redirection\-phpstan/app/public/wp\-content/plugins/visualizer/tests/php/static\-analysis\-stubs/vendor/autoload\.php" is not a file or it does not exist\.$#'
2987-
identifier: includeOnce.fileNotFound
2988-
count: 1
2989-
path: classes/Visualizer/Render/Sidebar.php
2990-
29913093
-
29923094
message: '#^Property Visualizer_Render_Sidebar\:\:\$_fontFamilies type has no value type specified in iterable type array\.$#'
29933095
identifier: missingType.iterableValue
@@ -3078,6 +3180,12 @@ parameters:
30783180
count: 1
30793181
path: classes/Visualizer/Render/Sidebar/ChartJS.php
30803182

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

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

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+
38073927
-
38083928
message: '#^Method Visualizer_Render_Sidebar_Type_DataTable_DataTable\:\:__construct\(\) has parameter \$data with no value type specified in iterable type array\.$#'
38093929
identifier: missingType.iterableValue
@@ -3966,6 +4086,12 @@ parameters:
39664086
count: 1
39674087
path: classes/Visualizer/Render/Sidebar/Type/DataTable/Tabular.php
39684088

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+
39694095
-
39704096
message: '#^Method Visualizer_Render_Sidebar_Type_DataTable_Tabular\:\:__construct\(\) has parameter \$data with no value type specified in iterable type array\.$#'
39714097
identifier: missingType.iterableValue
@@ -5345,3 +5471,87 @@ parameters:
53455471
identifier: deadCode.unreachable
53465472
count: 1
53475473
path: classes/Visualizer/Source/Query/Params.php
5474+
5475+
-
5476+
message: '#^Constant VISUALIZER_BASEFILE not found\.$#'
5477+
identifier: constant.notFound
5478+
count: 1
5479+
path: index.php
5480+
5481+
-
5482+
message: '#^Function visualizer_launch\(\) has no return type specified\.$#'
5483+
identifier: missingType.return
5484+
count: 1
5485+
path: index.php
5486+
5487+
-
5488+
message: '#^Function visualizer_register_parrot\(\) has no return type specified\.$#'
5489+
identifier: missingType.return
5490+
count: 1
5491+
path: index.php
5492+
5493+
-
5494+
message: '#^Function visualizer_register_parrot\(\) has parameter \$plugins with no type specified\.$#'
5495+
identifier: missingType.parameter
5496+
count: 1
5497+
path: index.php
5498+
5499+
-
5500+
message: '#^Function visualizer_register_sdk\(\) has no return type specified\.$#'
5501+
identifier: missingType.return
5502+
count: 1
5503+
path: index.php
5504+
5505+
-
5506+
message: '#^Function visualizer_register_sdk\(\) has parameter \$products with no type specified\.$#'
5507+
identifier: missingType.parameter
5508+
count: 1
5509+
path: index.php
5510+
5511+
-
5512+
message: '#^Function visualizer_themeisle_log_event\(\) has no return type specified\.$#'
5513+
identifier: missingType.return
5514+
count: 1
5515+
path: index.php
5516+
5517+
-
5518+
message: '#^Function visualizer_themeisle_log_event\(\) has parameter \$file with no type specified\.$#'
5519+
identifier: missingType.parameter
5520+
count: 1
5521+
path: index.php
5522+
5523+
-
5524+
message: '#^Function visualizer_themeisle_log_event\(\) has parameter \$line with no type specified\.$#'
5525+
identifier: missingType.parameter
5526+
count: 1
5527+
path: index.php
5528+
5529+
-
5530+
message: '#^Function visualizer_themeisle_log_event\(\) has parameter \$msg with no type specified\.$#'
5531+
identifier: missingType.parameter
5532+
count: 1
5533+
path: index.php
5534+
5535+
-
5536+
message: '#^Function visualizer_themeisle_log_event\(\) has parameter \$name with no type specified\.$#'
5537+
identifier: missingType.parameter
5538+
count: 1
5539+
path: index.php
5540+
5541+
-
5542+
message: '#^Function visualizer_themeisle_log_event\(\) has parameter \$type with no type specified\.$#'
5543+
identifier: missingType.parameter
5544+
count: 1
5545+
path: index.php
5546+
5547+
-
5548+
message: '#^If condition is always false\.$#'
5549+
identifier: if.alwaysFalse
5550+
count: 1
5551+
path: index.php
5552+
5553+
-
5554+
message: '#^Parameter \#1 \$autoload_function of function spl_autoload_register expects callable\(string\)\: void, ''visualizer…'' given\.$#'
5555+
identifier: argument.type
5556+
count: 1
5557+
path: index.php

phpstan.neon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
parameters:
22
level: 6
33
paths:
4+
- %currentWorkingDirectory%/index.php
45
- %currentWorkingDirectory%/classes
56
bootstrapFiles:
67
- %currentWorkingDirectory%/tests/php/static-analysis-stubs/symbols.php

0 commit comments

Comments
 (0)