From fdcc30312221ce08f3a4413588e2df4b77f843fc Mon Sep 17 00:00:00 2001 From: Ivan Fedorov Date: Thu, 4 Nov 2021 13:49:20 +0100 Subject: [PATCH] [phpstorm-stubs] fix test for meta and update related meta files --- meta/.phpstorm.meta.php | 1 - meta/encodings/.phpstorm.meta.php | 4 ++++ tests/StubsMetaExpectedArgumentsTest.php | 5 ++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/meta/.phpstorm.meta.php b/meta/.phpstorm.meta.php index 39290c45b..b6a98c937 100644 --- a/meta/.phpstorm.meta.php +++ b/meta/.phpstorm.meta.php @@ -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); diff --git a/meta/encodings/.phpstorm.meta.php b/meta/encodings/.phpstorm.meta.php index 23adf0710..fbd6596ec 100644 --- a/meta/encodings/.phpstorm.meta.php +++ b/meta/encodings/.phpstorm.meta.php @@ -65,6 +65,8 @@ 'HZ', 'EUC-TW', 'BIG-5', + 'BIG5', + 'BIG5-HKSCS', 'CP950', 'EUC-KR', 'UHC', @@ -115,6 +117,7 @@ 'x-euc-jp', 'x-sjis', 'SHIFT-JIS', + 'Shift_JIS', 'eucJP-open', 'eucJP-ms', 'EUC_JP-2004', @@ -128,6 +131,7 @@ 'shift_jis-softbank', 'x-sjis-emoji-softbank', 'MacJapanese', + 'MacRoman', 'x-Mac-Japanese', 'SJIS2004', 'Shift_JIS-2004', diff --git a/tests/StubsMetaExpectedArgumentsTest.php b/tests/StubsMetaExpectedArgumentsTest.php index 2c6ed9143..5a42bfb16 100644 --- a/tests/StubsMetaExpectedArgumentsTest.php +++ b/tests/StubsMetaExpectedArgumentsTest.php @@ -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]; }