@@ -5217,14 +5217,6 @@ public function testArrayFunctions(
5217
5217
5218
5218
public static function dataFunctions (): array
5219
5219
{
5220
- $ strSplitDefaultReturnType = 'non-empty-list<string>|false ' ;
5221
- if (PHP_VERSION_ID >= 80000 ) {
5222
- $ strSplitDefaultReturnType = 'non-empty-list<string> ' ;
5223
- }
5224
- if (PHP_VERSION_ID >= 80200 ) {
5225
- $ strSplitDefaultReturnType = 'list<string> ' ;
5226
- }
5227
-
5228
5220
return [
5229
5221
[
5230
5222
'string ' ,
@@ -5414,42 +5406,6 @@ public static function dataFunctions(): array
5414
5406
'(array{sec: int, usec: int, minuteswest: int, dsttime: int}|float) ' ,
5415
5407
'$gettimeofdayBenevolent ' ,
5416
5408
],
5417
- [
5418
- $ strSplitDefaultReturnType ,
5419
- '$strSplitConstantStringWithoutDefinedParameters ' ,
5420
- ],
5421
- [
5422
- 'array{ \'a \', \'b \', \'c \', \'d \', \'e \', \'f \'} ' ,
5423
- '$strSplitConstantStringWithoutDefinedSplitLength ' ,
5424
- ],
5425
- [
5426
- PHP_VERSION_ID < 80200 ? 'non-empty-list<string> ' : 'list<string> ' ,
5427
- '$strSplitStringWithoutDefinedSplitLength ' ,
5428
- ],
5429
- [
5430
- 'array{ \'a \', \'b \', \'c \', \'d \', \'e \', \'f \'} ' ,
5431
- '$strSplitConstantStringWithOneSplitLength ' ,
5432
- ],
5433
- [
5434
- 'array{ \'abcdef \'} ' ,
5435
- '$strSplitConstantStringWithGreaterSplitLengthThanStringLength ' ,
5436
- ],
5437
- [
5438
- 'false ' ,
5439
- '$strSplitConstantStringWithFailureSplitLength ' ,
5440
- ],
5441
- [
5442
- $ strSplitDefaultReturnType ,
5443
- '$strSplitConstantStringWithInvalidSplitLengthType ' ,
5444
- ],
5445
- [
5446
- "array{'a', 'b', 'c', 'd', 'e', 'f'}|array{'g', 'h', 'i', 'j', 'k', 'l'} " ,
5447
- '$strSplitConstantStringWithVariableStringAndConstantSplitLength ' ,
5448
- ],
5449
- [
5450
- $ strSplitDefaultReturnType ,
5451
- '$strSplitConstantStringWithVariableStringAndVariableSplitLength ' ,
5452
- ],
5453
5409
// parse_url
5454
5410
[
5455
5411
'array|int|string|false|null ' ,
@@ -8772,133 +8728,6 @@ public function testPhp73Functions(
8772
8728
);
8773
8729
}
8774
8730
8775
- public static function dataPhp74Functions (): array
8776
- {
8777
- return [
8778
- [
8779
- PHP_VERSION_ID < 80000 ? 'list<string>|false ' : 'list<string> ' ,
8780
- '$mbStrSplitConstantStringWithoutDefinedParameters ' ,
8781
- ],
8782
- [
8783
- 'array{ \'a \', \'b \', \'c \', \'d \', \'e \', \'f \'} ' ,
8784
- '$mbStrSplitConstantStringWithoutDefinedSplitLength ' ,
8785
- ],
8786
- [
8787
- 'list<string> ' ,
8788
- '$mbStrSplitStringWithoutDefinedSplitLength ' ,
8789
- ],
8790
- [
8791
- 'array{ \'a \', \'b \', \'c \', \'d \', \'e \', \'f \'} ' ,
8792
- '$mbStrSplitConstantStringWithOneSplitLength ' ,
8793
- ],
8794
- [
8795
- 'array{ \'abcdef \'} ' ,
8796
- '$mbStrSplitConstantStringWithGreaterSplitLengthThanStringLength ' ,
8797
- ],
8798
- [
8799
- 'false ' ,
8800
- '$mbStrSplitConstantStringWithFailureSplitLength ' ,
8801
- ],
8802
- [
8803
- PHP_VERSION_ID < 80000 ? 'list<string>|false ' : 'list<string> ' ,
8804
- '$mbStrSplitConstantStringWithInvalidSplitLengthType ' ,
8805
- ],
8806
- [
8807
- "array{'a', 'b', 'c', 'd', 'e', 'f'}|array{'g', 'h', 'i', 'j', 'k', 'l'} " ,
8808
- '$mbStrSplitConstantStringWithVariableStringAndConstantSplitLength ' ,
8809
- ],
8810
- [
8811
- PHP_VERSION_ID < 80000 ? 'list<string>|false ' : 'list<string> ' ,
8812
- '$mbStrSplitConstantStringWithVariableStringAndVariableSplitLength ' ,
8813
- ],
8814
- [
8815
- "array{'a', 'b', 'c', 'd', 'e', 'f'} " ,
8816
- '$mbStrSplitConstantStringWithOneSplitLengthAndValidEncoding ' ,
8817
- ],
8818
- [
8819
- 'false ' ,
8820
- '$mbStrSplitConstantStringWithOneSplitLengthAndInvalidEncoding ' ,
8821
- ],
8822
- [
8823
- PHP_VERSION_ID < 80000 ? 'list<string>|false ' : 'list<string> ' ,
8824
- '$mbStrSplitConstantStringWithOneSplitLengthAndVariableEncoding ' ,
8825
- ],
8826
- [
8827
- "array{'abcdef'} " ,
8828
- '$mbStrSplitConstantStringWithGreaterSplitLengthThanStringLengthAndValidEncoding ' ,
8829
- ],
8830
- [
8831
- 'false ' ,
8832
- '$mbStrSplitConstantStringWithGreaterSplitLengthThanStringLengthAndInvalidEncoding ' ,
8833
- ],
8834
- [
8835
- PHP_VERSION_ID < 80000 ? 'list<string>|false ' : 'list<string> ' ,
8836
- '$mbStrSplitConstantStringWithGreaterSplitLengthThanStringLengthAndVariableEncoding ' ,
8837
- ],
8838
- [
8839
- 'false ' ,
8840
- '$mbStrSplitConstantStringWithFailureSplitLengthAndValidEncoding ' ,
8841
- ],
8842
- [
8843
- 'false ' ,
8844
- '$mbStrSplitConstantStringWithFailureSplitLengthAndInvalidEncoding ' ,
8845
- ],
8846
- [
8847
- 'false ' ,
8848
- '$mbStrSplitConstantStringWithFailureSplitLengthAndVariableEncoding ' ,
8849
- ],
8850
- [
8851
- PHP_VERSION_ID < 80000 ? 'list<string>|false ' : 'list<string> ' ,
8852
- '$mbStrSplitConstantStringWithInvalidSplitLengthTypeAndValidEncoding ' ,
8853
- ],
8854
- [
8855
- 'false ' ,
8856
- '$mbStrSplitConstantStringWithInvalidSplitLengthTypeAndInvalidEncoding ' ,
8857
- ],
8858
- [
8859
- PHP_VERSION_ID < 80000 ? 'list<string>|false ' : 'list<string> ' ,
8860
- '$mbStrSplitConstantStringWithInvalidSplitLengthTypeAndVariableEncoding ' ,
8861
- ],
8862
- [
8863
- "array{'a', 'b', 'c', 'd', 'e', 'f'}|array{'g', 'h', 'i', 'j', 'k', 'l'} " ,
8864
- '$mbStrSplitConstantStringWithVariableStringAndConstantSplitLengthAndValidEncoding ' ,
8865
- ],
8866
- [
8867
- 'false ' ,
8868
- '$mbStrSplitConstantStringWithVariableStringAndConstantSplitLengthAndInvalidEncoding ' ,
8869
- ],
8870
- [
8871
- PHP_VERSION_ID < 80000 ? 'list<string>|false ' : 'list<string> ' ,
8872
- '$mbStrSplitConstantStringWithVariableStringAndConstantSplitLengthAndVariableEncoding ' ,
8873
- ],
8874
- [
8875
- PHP_VERSION_ID < 80000 ? 'list<string>|false ' : 'list<string> ' ,
8876
- '$mbStrSplitConstantStringWithVariableStringAndVariableSplitLengthAndValidEncoding ' ,
8877
- ],
8878
- [
8879
- 'false ' ,
8880
- '$mbStrSplitConstantStringWithVariableStringAndVariableSplitLengthAndInvalidEncoding ' ,
8881
- ],
8882
- [
8883
- PHP_VERSION_ID < 80000 ? 'list<string>|false ' : 'list<string> ' ,
8884
- '$mbStrSplitConstantStringWithVariableStringAndVariableSplitLengthAndVariableEncoding ' ,
8885
- ],
8886
- ];
8887
- }
8888
-
8889
- #[DataProvider('dataPhp74Functions ' )]
8890
- public function testPhp74Functions (
8891
- string $ description ,
8892
- string $ expression ,
8893
- ): void
8894
- {
8895
- $ this ->assertTypes (
8896
- __DIR__ . '/data/php74_functions.php ' ,
8897
- $ description ,
8898
- $ expression ,
8899
- );
8900
- }
8901
-
8902
8731
public static function dataUnionMethods (): array
8903
8732
{
8904
8733
return [
0 commit comments