Skip to content

Commit

Permalink
[phpstorm-stubs] fix test for meta and update related meta files
Browse files Browse the repository at this point in the history
  • Loading branch information
isfedorov committed Nov 4, 2021
1 parent 0469566 commit fdcc303
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 0 additions & 1 deletion meta/.phpstorm.meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ function argumentsSet($setName) {
expectedArguments(\SplFileInfo::openFile(), 0, 'r', 'r+', 'w', 'w+', 'a', 'a+', 'x', 'x+', 'c', 'c+', 'e');

expectedArguments(\htmlentities(), 1, ENT_COMPAT | ENT_QUOTES | ENT_NOQUOTES | ENT_IGNORE | ENT_SUBSTITUTE | ENT_DISALLOWED | ENT_HTML401 | ENT_XML1 | ENT_XHTML | ENT_HTML5);
expectedArguments(\htmlentities(), 2, 'ISO-8859-1', 'ISO-8859-5', 'ISO-8859-15', 'UTF-8', 'cp866', 'cp1251', 'cp1252', 'KOI8-R', 'BIG5', 'GB2312', 'BIG5-HKSCS', 'Shift_JIS', 'EUC-JP', 'MacRoman');
expectedArguments(\htmlspecialchars(), 1, ENT_COMPAT | ENT_QUOTES | ENT_NOQUOTES | ENT_IGNORE | ENT_SUBSTITUTE | ENT_DISALLOWED | ENT_HTML401 | ENT_XML1 | ENT_XHTML | ENT_HTML5);
expectedArguments(\html_entity_decode(), 1, ENT_COMPAT | ENT_QUOTES | ENT_NOQUOTES | ENT_HTML401 | ENT_XML1 | ENT_XHTML | ENT_HTML5);
expectedArguments(\htmlspecialchars_decode(), 1, ENT_COMPAT | ENT_QUOTES | ENT_NOQUOTES | ENT_HTML401 | ENT_XML1 | ENT_XHTML | ENT_HTML5);
Expand Down
4 changes: 4 additions & 0 deletions meta/encodings/.phpstorm.meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@
'HZ',
'EUC-TW',
'BIG-5',
'BIG5',
'BIG5-HKSCS',
'CP950',
'EUC-KR',
'UHC',
Expand Down Expand Up @@ -115,6 +117,7 @@
'x-euc-jp',
'x-sjis',
'SHIFT-JIS',
'Shift_JIS',
'eucJP-open',
'eucJP-ms',
'EUC_JP-2004',
Expand All @@ -128,6 +131,7 @@
'shift_jis-softbank',
'x-sjis-emoji-softbank',
'MacJapanese',
'MacRoman',
'x-Mac-Japanese',
'SJIS2004',
'Shift_JIS-2004',
Expand Down
5 changes: 2 additions & 3 deletions tests/StubsMetaExpectedArgumentsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,8 @@ public function testExpectedArgumentsAreUnique()
$functionReferenceFqn = self::getFqn($argument->getFunctionReference());
$index = $argument->getIndex();
if (array_key_exists($functionReferenceFqn, $functionsFqnsWithIndeces)) {
$indices = $functionsFqnsWithIndeces[$functionReferenceFqn];
self::assertNotContains($index, $indices, 'Expected arguments for ' . $functionReferenceFqn . ' with index ' . $index . ' already registered');
$indices[] = $index;
self::assertNotContains($index, $functionsFqnsWithIndeces[$functionReferenceFqn], 'Expected arguments for ' . $functionReferenceFqn . ' with index ' . $index . ' already registered');
$functionsFqnsWithIndeces[$functionReferenceFqn][] = $index;
} else {
$functionsFqnsWithIndeces[$functionReferenceFqn] = [$index];
}
Expand Down

0 comments on commit fdcc303

Please sign in to comment.