@@ -1839,6 +1839,157 @@ public function testCountArrayShift(): void
1839
1839
$ this ->analyse ([__DIR__ . '/data/count-array-shift.php ' ], $ errors );
1840
1840
}
1841
1841
1842
+ public function testArrayDiffUassoc (): void
1843
+ {
1844
+ $ this ->checkExplicitMixed = true ;
1845
+ $ this ->analyse ([__DIR__ . '/data/array_diff_uassoc.php ' ], [
1846
+ [
1847
+ 'Parameter #3 $data_comp_func of function array_diff_uassoc expects callable(string, string): int<-1, 1>, Closure(int, int): int<-1, 1> given. ' ,
1848
+ 22 ,
1849
+ ],
1850
+ [
1851
+ 'Parameter #3 $data_comp_func of function array_diff_uassoc expects callable(int, int): int<-1, 1>, Closure(string, string): int<-1, 1> given. ' ,
1852
+ 30 ,
1853
+ ],
1854
+ ]);
1855
+ }
1856
+
1857
+ public function testArrayDiffUkey (): void
1858
+ {
1859
+ $ this ->checkExplicitMixed = true ;
1860
+ $ this ->analyse ([__DIR__ . '/data/array_diff_ukey.php ' ], [
1861
+ [
1862
+ 'Parameter #3 $key_comp_func of function array_diff_ukey expects callable(string, string): int<-1, 1>, Closure(int, int): int<-1, 1> given. ' ,
1863
+ 22 ,
1864
+ ],
1865
+ [
1866
+ 'Parameter #3 $key_comp_func of function array_diff_ukey expects callable(int, int): int<-1, 1>, Closure(string, string): int<-1, 1> given. ' ,
1867
+ 30 ,
1868
+ ],
1869
+ ]);
1870
+ }
1871
+
1872
+ public function testArrayIntersectUassoc (): void
1873
+ {
1874
+ $ this ->checkExplicitMixed = true ;
1875
+ $ this ->analyse ([__DIR__ . '/data/array_intersect_uassoc.php ' ], [
1876
+ [
1877
+ 'Parameter #3 $key_compare_func of function array_intersect_uassoc expects callable(string, string): int<-1, 1>, Closure(int, int): int<-1, 1> given. ' ,
1878
+ 22 ,
1879
+ ],
1880
+ [
1881
+ 'Parameter #3 $key_compare_func of function array_intersect_uassoc expects callable(int, int): int<-1, 1>, Closure(string, string): int<-1, 1> given. ' ,
1882
+ 30 ,
1883
+ ],
1884
+ ]);
1885
+ }
1886
+
1887
+ public function testArrayIntersectUkey (): void
1888
+ {
1889
+ $ this ->checkExplicitMixed = true ;
1890
+ $ this ->analyse ([__DIR__ . '/data/array_intersect_ukey.php ' ], [
1891
+ [
1892
+ 'Parameter #3 $key_compare_func of function array_intersect_ukey expects callable(string, string): int<-1, 1>, Closure(int, int): int<-1, 1> given. ' ,
1893
+ 22 ,
1894
+ ],
1895
+ [
1896
+ 'Parameter #3 $key_compare_func of function array_intersect_ukey expects callable(int, int): int<-1, 1>, Closure(string, string): int<-1, 1> given. ' ,
1897
+ 30 ,
1898
+ ],
1899
+ ]);
1900
+ }
1901
+
1902
+ public function testArrayUdiffAssoc (): void
1903
+ {
1904
+ $ this ->checkExplicitMixed = true ;
1905
+ $ this ->analyse ([__DIR__ . '/data/array_udiff_assoc.php ' ], [
1906
+ [
1907
+ 'Parameter #3 $key_comp_func of function array_udiff_assoc expects callable(int, int): int<-1, 1>, Closure(string, string): int<-1, 1> given. ' ,
1908
+ 22 ,
1909
+ ],
1910
+ [
1911
+ 'Parameter #3 $key_comp_func of function array_udiff_assoc expects callable(int, int): int<-1, 1>, Closure(string, string): int<-1, 1> given. ' ,
1912
+ 30 ,
1913
+ ],
1914
+ ]);
1915
+ }
1916
+
1917
+ public function testArrayUdiffUsssoc (): void
1918
+ {
1919
+ $ this ->checkExplicitMixed = true ;
1920
+ $ this ->analyse ([__DIR__ . '/data/array_udiff_uassoc.php ' ], [
1921
+ [
1922
+ 'Parameter #3 $data_comp_func of function array_udiff_uassoc expects callable(string, string): int<-1, 1>, Closure(int, int): int<-1, 1> given. ' ,
1923
+ 28 ,
1924
+ ],
1925
+ [
1926
+ 'Parameter #4 $key_comp_func of function array_udiff_uassoc expects callable(string, string): int<-1, 1>, Closure(int, int): int<-1, 1> given. ' ,
1927
+ 31 ,
1928
+ ],
1929
+ [
1930
+ 'Parameter #3 $data_comp_func of function array_udiff_uassoc expects callable(int, int): int<-1, 1>, Closure(string, string): int<-1, 1> given. ' ,
1931
+ 39 ,
1932
+ ],
1933
+ [
1934
+ 'Parameter #4 $key_comp_func of function array_udiff_uassoc expects callable(int, int): int<-1, 1>, Closure(string, string): int<-1, 1> given. ' ,
1935
+ 42 ,
1936
+ ],
1937
+ ]);
1938
+ }
1939
+
1940
+ public function testArrayUintersectAssoc (): void
1941
+ {
1942
+ $ this ->checkExplicitMixed = true ;
1943
+ $ this ->analyse ([__DIR__ . '/data/array_uintersect_assoc.php ' ], [
1944
+ [
1945
+ 'Parameter #3 $data_compare_func of function array_uintersect_assoc expects callable(string, string): int<-1, 1>, Closure(int, int): int<-1, 1> given. ' ,
1946
+ 22 ,
1947
+ ],
1948
+ [
1949
+ 'Parameter #3 $data_compare_func of function array_uintersect_assoc expects callable(int, int): int<-1, 1>, Closure(string, string): int<-1, 1> given. ' ,
1950
+ 30 ,
1951
+ ],
1952
+ ]);
1953
+ }
1954
+
1955
+ public function testArrayUintersectUassoc (): void
1956
+ {
1957
+ $ this ->checkExplicitMixed = true ;
1958
+ $ this ->analyse ([__DIR__ . '/data/array_uintersect_uassoc.php ' ], [
1959
+ [
1960
+ 'Parameter #3 $data_compare_func of function array_uintersect_uassoc expects callable(string, string): int<-1, 1>, Closure(int, int): int<-1, 1> given. ' ,
1961
+ 28 ,
1962
+ ],
1963
+ [
1964
+ 'Parameter #4 $key_compare_func of function array_uintersect_uassoc expects callable(string, string): int<-1, 1>, Closure(int, int): int<-1, 1> given. ' ,
1965
+ 31 ,
1966
+ ],
1967
+ [
1968
+ 'Parameter #3 $data_compare_func of function array_uintersect_uassoc expects callable(int, int): int<-1, 1>, Closure(string, string): int<-1, 1> given. ' ,
1969
+ 39 ,
1970
+ ],
1971
+ [
1972
+ 'Parameter #4 $key_compare_func of function array_uintersect_uassoc expects callable(int, int): int<-1, 1>, Closure(string, string): int<-1, 1> given. ' ,
1973
+ 42 ,
1974
+ ],
1975
+ ]);
1976
+ }
1977
+
1978
+ public function testArrayUintersect (): void
1979
+ {
1980
+ $ this ->checkExplicitMixed = true ;
1981
+ $ this ->analyse ([__DIR__ . '/data/array_uintersect.php ' ], [
1982
+ [
1983
+ 'Parameter #3 $data_compare_func of function array_uintersect expects callable(string, string): int<-1, 1>, Closure(int, int): int<-1, 1> given. ' ,
1984
+ 22 ,
1985
+ ],
1986
+ [
1987
+ 'Parameter #3 $data_compare_func of function array_uintersect expects callable(int, int): int<-1, 1>, Closure(string, string): int<-1, 1> given. ' ,
1988
+ 30 ,
1989
+ ],
1990
+ ]);
1991
+ }
1992
+
1842
1993
public function testNoNamedArguments (): void
1843
1994
{
1844
1995
if (PHP_VERSION_ID < 80000 ) {
0 commit comments