Skip to content

Commit 82b5ed5

Browse files
committed
PHPStan: ignore usage of internal classes
1 parent a34f4d8 commit 82b5ed5

File tree

1 file changed

+48
-18
lines changed

1 file changed

+48
-18
lines changed

tools/phpstan.baseline.neon

Lines changed: 48 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,97 @@
11
parameters:
22
ignoreErrors:
33
-
4-
message: """
5-
#^Fetching deprecated class constant VERSION of class Latte\\\\Engine\\:
6-
use Engine\\:\\:Version$#
7-
"""
4+
message: '''
5+
#^Fetching deprecated class constant VERSION of class Latte\\Engine\:
6+
use Engine\:\:Version$#
7+
'''
8+
identifier: classConstant.deprecated
89
count: 1
910
path: ../src/Bridge/NetteDI/LocalizationExtension.php
1011

1112
-
12-
message: "#^Method Orisai\\\\Localization\\\\Locale\\\\GrandfatheredLocale\\:\\:getStandardLocale\\(\\) never returns Orisai\\\\Localization\\\\Locale\\\\StandardLocale so it can be removed from the return type\\.$#"
13+
message: '#^Access to constant on internal class Symfony\\Polyfill\\Intl\\MessageFormatter\\MessageFormatter\.$#'
14+
identifier: classConstant.internalClass
15+
count: 1
16+
path: ../src/Formatting/MessageFormatterFactory.php
17+
18+
-
19+
message: '#^Call to static method create\(\) of internal class Symfony\\Polyfill\\Intl\\MessageFormatter\\MessageFormatter from outside its root namespace Symfony\.$#'
20+
identifier: staticMethod.internalClass
21+
count: 1
22+
path: ../src/Formatting/SymfonyMessageFormatter.php
23+
24+
-
25+
message: '#^Call to static method formatMessage\(\) of internal class Symfony\\Polyfill\\Intl\\MessageFormatter\\MessageFormatter from outside its root namespace Symfony\.$#'
26+
identifier: staticMethod.internalClass
27+
count: 1
28+
path: ../src/Formatting/SymfonyMessageFormatter.php
29+
30+
-
31+
message: '#^Method Orisai\\Localization\\Locale\\GrandfatheredLocale\:\:getStandardLocale\(\) never returns Orisai\\Localization\\Locale\\StandardLocale so it can be removed from the return type\.$#'
32+
identifier: return.unusedType
1333
count: 1
1434
path: ../src/Locale/GrandfatheredLocale.php
1535

1636
-
17-
message: "#^Method Tests\\\\Orisai\\\\Localization\\\\Doubles\\\\FakeLocaleConfigurator\\:\\:getLanguageTag\\(\\) should return string but returns string\\|null\\.$#"
37+
message: '#^Method Tests\\Orisai\\Localization\\Doubles\\FakeLocaleConfigurator\:\:getLanguageTag\(\) should return string but returns string\|null\.$#'
38+
identifier: return.type
1839
count: 1
1940
path: ../tests/Doubles/FakeLocaleConfigurator.php
2041

2142
-
22-
message: "#^Call to function assert\\(\\) with true will always evaluate to true\\.$#"
43+
message: '#^Call to function assert\(\) with true will always evaluate to true\.$#'
44+
identifier: function.alreadyNarrowedType
2345
count: 1
2446
path: ../tests/Unit/Bridge/NetteDI/LocalizationExtensionTest.php
2547

2648
-
27-
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with 'Orisai\\\\\\\\TranslationContracts\\\\\\\\TranslatorGetter' and Orisai\\\\TranslationContracts\\\\TranslatorGetter will always evaluate to true\\.$#"
49+
message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Orisai\\\\TranslationContracts\\\\TranslatorGetter'' and Orisai\\TranslationContracts\\TranslatorGetter will always evaluate to true\.$#'
50+
identifier: staticMethod.alreadyNarrowedType
2851
count: 1
2952
path: ../tests/Unit/Bridge/NetteDI/LocalizationExtensionTest.php
3053

3154
-
32-
message: """
33-
#^Fetching deprecated class constant VERSION of class Latte\\\\Engine\\:
34-
use Engine\\:\\:Version$#
35-
"""
55+
message: '''
56+
#^Fetching deprecated class constant VERSION of class Latte\\Engine\:
57+
use Engine\:\:Version$#
58+
'''
59+
identifier: classConstant.deprecated
3660
count: 2
3761
path: ../tests/Unit/Bridge/NetteDI/LocalizationExtensionTest.php
3862

3963
-
40-
message: "#^If condition is always false\\.$#"
64+
message: '#^If condition is always false\.$#'
65+
identifier: if.alwaysFalse
4166
count: 2
4267
path: ../tests/Unit/Bridge/NetteDI/LocalizationExtensionTest.php
4368

4469
-
45-
message: "#^Instanceof between Orisai\\\\Localization\\\\Locale\\\\LocaleProcessor and Orisai\\\\Localization\\\\Locale\\\\LocaleProcessor will always evaluate to true\\.$#"
70+
message: '#^Instanceof between Orisai\\Localization\\Locale\\LocaleProcessor and Orisai\\Localization\\Locale\\LocaleProcessor will always evaluate to true\.$#'
71+
identifier: instanceof.alwaysTrue
4672
count: 1
4773
path: ../tests/Unit/Bridge/NetteDI/LocalizationExtensionTest.php
4874

4975
-
50-
message: "#^Call to new Orisai\\\\Localization\\\\DefaultTranslator\\(\\) on a separate line has no effect\\.$#"
76+
message: '#^Call to new Orisai\\Localization\\DefaultTranslator\(\) on a separate line has no effect\.$#'
77+
identifier: new.resultUnused
5178
count: 1
5279
path: ../tests/Unit/DefaultTranslatorTest.php
5380

5481
-
55-
message: "#^Cannot call method getCount\\(\\) on Orisai\\\\Localization\\\\Logging\\\\MissingResource\\|null\\.$#"
82+
message: '#^Cannot call method getCount\(\) on Orisai\\Localization\\Logging\\MissingResource\|null\.$#'
83+
identifier: method.nonObject
5684
count: 1
5785
path: ../tests/Unit/DefaultTranslatorTest.php
5886

5987
-
60-
message: "#^Cannot call method getLanguageTags\\(\\) on Orisai\\\\Localization\\\\Logging\\\\MissingResource\\|null\\.$#"
88+
message: '#^Cannot call method getLanguageTags\(\) on Orisai\\Localization\\Logging\\MissingResource\|null\.$#'
89+
identifier: method.nonObject
6190
count: 1
6291
path: ../tests/Unit/DefaultTranslatorTest.php
6392

6493
-
65-
message: "#^Cannot call method getMessage\\(\\) on Orisai\\\\Localization\\\\Logging\\\\MissingResource\\|null\\.$#"
94+
message: '#^Cannot call method getMessage\(\) on Orisai\\Localization\\Logging\\MissingResource\|null\.$#'
95+
identifier: method.nonObject
6696
count: 1
6797
path: ../tests/Unit/DefaultTranslatorTest.php

0 commit comments

Comments
 (0)