-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpstan.neon
More file actions
43 lines (39 loc) · 1.89 KB
/
Copy pathphpstan.neon
File metadata and controls
43 lines (39 loc) · 1.89 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
# Analyse this extension using FreshRSS's own PHPStan configuration.
#
# Requires FreshRSS checked out two levels up -- i.e. this extension sitting in
# its normal home at FreshRSS/extensions/xExtension-RssCloud -- with its dev
# dependencies installed. See .github/workflows/ci.yml.
#
# Run from this directory:
# ../../vendor/bin/phpstan analyse -c phpstan.neon
includes:
- ../../phpstan.dist.neon
parameters:
# Core's ruleset already covers extensions/, but analysing only this one means
# core's ignoreErrors patterns match nothing, which is itself reported as an error.
reportUnmatchedIgnoredErrors: false
# Override rather than extend core's `paths: [.]`, so core is not re-analysed.
paths!:
- .
# Still needed for symbol discovery: the global helpers (_t, _i, _url) and every
# FreshRSS_*/Minz_* class this extension touches live here.
scanDirectories:
- ../../app
- ../../lib
# `getCurlResolveInfo()` arrived after 1.29.1, so whether it exists depends on which core is
# checked out alongside -- something PHPStan cannot model from one checkout. Whichever core it
# analyses, it calls the runtime guard redundant, just from opposite directions. Both entries
# are listed so a single config serves either; `reportUnmatchedIgnoredErrors: false` above lets
# the inapplicable one pass unmatched. Drop the guard and this whole block once 1.29.2 is the
# oldest supported release.
ignoreErrors:
-
# Against edge, which has the method.
identifier: function.alreadyNarrowedType
message: '#Call to function method_exists\(\) with .FreshRSS_http_Util. and .getCurlResolveInfo. will always evaluate to true\.#'
path: RssCloud/Redirects.php
-
# Against 1.29.1 and older, which do not.
identifier: function.impossibleType
message: '#Call to function method_exists\(\) with .FreshRSS_http_Util. and .getCurlResolveInfo. will always evaluate to false\.#'
path: RssCloud/Redirects.php