@@ -1716,6 +1716,157 @@ public function testCountArrayShift(): void
1716
1716
$ this ->analyse ([__DIR__ . '/data/count-array-shift.php ' ], $ errors );
1717
1717
}
1718
1718
1719
+ public function testArrayDiffUassoc (): void
1720
+ {
1721
+ $ this ->checkExplicitMixed = true ;
1722
+ $ this ->analyse ([__DIR__ . '/data/array_diff_uassoc.php ' ], [
1723
+ [
1724
+ 'Parameter #3 $data_comp_func of function array_diff_uassoc expects callable(string, string): int<-1, 1>, Closure(int, int): int<-1, 1> given. ' ,
1725
+ 22 ,
1726
+ ],
1727
+ [
1728
+ 'Parameter #3 $data_comp_func of function array_diff_uassoc expects callable(int, int): int<-1, 1>, Closure(string, string): int<-1, 1> given. ' ,
1729
+ 30 ,
1730
+ ],
1731
+ ]);
1732
+ }
1733
+
1734
+ public function testArrayDiffUkey (): void
1735
+ {
1736
+ $ this ->checkExplicitMixed = true ;
1737
+ $ this ->analyse ([__DIR__ . '/data/array_diff_ukey.php ' ], [
1738
+ [
1739
+ 'Parameter #3 $key_comp_func of function array_diff_ukey expects callable(string, string): int<-1, 1>, Closure(int, int): int<-1, 1> given. ' ,
1740
+ 22 ,
1741
+ ],
1742
+ [
1743
+ 'Parameter #3 $key_comp_func of function array_diff_ukey expects callable(int, int): int<-1, 1>, Closure(string, string): int<-1, 1> given. ' ,
1744
+ 30 ,
1745
+ ],
1746
+ ]);
1747
+ }
1748
+
1749
+ public function testArrayIntersectUassoc (): void
1750
+ {
1751
+ $ this ->checkExplicitMixed = true ;
1752
+ $ this ->analyse ([__DIR__ . '/data/array_intersect_uassoc.php ' ], [
1753
+ [
1754
+ 'Parameter #3 $key_compare_func of function array_intersect_uassoc expects callable(string, string): int<-1, 1>, Closure(int, int): int<-1, 1> given. ' ,
1755
+ 22 ,
1756
+ ],
1757
+ [
1758
+ 'Parameter #3 $key_compare_func of function array_intersect_uassoc expects callable(int, int): int<-1, 1>, Closure(string, string): int<-1, 1> given. ' ,
1759
+ 30 ,
1760
+ ],
1761
+ ]);
1762
+ }
1763
+
1764
+ public function testArrayIntersectUkey (): void
1765
+ {
1766
+ $ this ->checkExplicitMixed = true ;
1767
+ $ this ->analyse ([__DIR__ . '/data/array_intersect_ukey.php ' ], [
1768
+ [
1769
+ 'Parameter #3 $key_compare_func of function array_intersect_ukey expects callable(string, string): int<-1, 1>, Closure(int, int): int<-1, 1> given. ' ,
1770
+ 22 ,
1771
+ ],
1772
+ [
1773
+ 'Parameter #3 $key_compare_func of function array_intersect_ukey expects callable(int, int): int<-1, 1>, Closure(string, string): int<-1, 1> given. ' ,
1774
+ 30 ,
1775
+ ],
1776
+ ]);
1777
+ }
1778
+
1779
+ public function testArrayUdiffAssoc (): void
1780
+ {
1781
+ $ this ->checkExplicitMixed = true ;
1782
+ $ this ->analyse ([__DIR__ . '/data/array_udiff_assoc.php ' ], [
1783
+ [
1784
+ 'Parameter #3 $key_comp_func of function array_udiff_assoc expects callable(int, int): int<-1, 1>, Closure(string, string): int<-1, 1> given. ' ,
1785
+ 22 ,
1786
+ ],
1787
+ [
1788
+ 'Parameter #3 $key_comp_func of function array_udiff_assoc expects callable(int, int): int<-1, 1>, Closure(string, string): int<-1, 1> given. ' ,
1789
+ 30 ,
1790
+ ],
1791
+ ]);
1792
+ }
1793
+
1794
+ public function testArrayUdiffUsssoc (): void
1795
+ {
1796
+ $ this ->checkExplicitMixed = true ;
1797
+ $ this ->analyse ([__DIR__ . '/data/array_udiff_uassoc.php ' ], [
1798
+ [
1799
+ 'Parameter #3 $data_comp_func of function array_udiff_uassoc expects callable(string, string): int<-1, 1>, Closure(int, int): int<-1, 1> given. ' ,
1800
+ 28 ,
1801
+ ],
1802
+ [
1803
+ 'Parameter #4 $key_comp_func of function array_udiff_uassoc expects callable(string, string): int<-1, 1>, Closure(int, int): int<-1, 1> given. ' ,
1804
+ 31 ,
1805
+ ],
1806
+ [
1807
+ 'Parameter #3 $data_comp_func of function array_udiff_uassoc expects callable(int, int): int<-1, 1>, Closure(string, string): int<-1, 1> given. ' ,
1808
+ 39 ,
1809
+ ],
1810
+ [
1811
+ 'Parameter #4 $key_comp_func of function array_udiff_uassoc expects callable(int, int): int<-1, 1>, Closure(string, string): int<-1, 1> given. ' ,
1812
+ 42 ,
1813
+ ],
1814
+ ]);
1815
+ }
1816
+
1817
+ public function testArrayUintersectAssoc (): void
1818
+ {
1819
+ $ this ->checkExplicitMixed = true ;
1820
+ $ this ->analyse ([__DIR__ . '/data/array_uintersect_assoc.php ' ], [
1821
+ [
1822
+ 'Parameter #3 $data_compare_func of function array_uintersect_assoc expects callable(string, string): int<-1, 1>, Closure(int, int): int<-1, 1> given. ' ,
1823
+ 22 ,
1824
+ ],
1825
+ [
1826
+ 'Parameter #3 $data_compare_func of function array_uintersect_assoc expects callable(int, int): int<-1, 1>, Closure(string, string): int<-1, 1> given. ' ,
1827
+ 30 ,
1828
+ ],
1829
+ ]);
1830
+ }
1831
+
1832
+ public function testArrayUintersectUassoc (): void
1833
+ {
1834
+ $ this ->checkExplicitMixed = true ;
1835
+ $ this ->analyse ([__DIR__ . '/data/array_uintersect_uassoc.php ' ], [
1836
+ [
1837
+ 'Parameter #3 $data_compare_func of function array_uintersect_uassoc expects callable(string, string): int<-1, 1>, Closure(int, int): int<-1, 1> given. ' ,
1838
+ 28 ,
1839
+ ],
1840
+ [
1841
+ 'Parameter #4 $key_compare_func of function array_uintersect_uassoc expects callable(string, string): int<-1, 1>, Closure(int, int): int<-1, 1> given. ' ,
1842
+ 31 ,
1843
+ ],
1844
+ [
1845
+ 'Parameter #3 $data_compare_func of function array_uintersect_uassoc expects callable(int, int): int<-1, 1>, Closure(string, string): int<-1, 1> given. ' ,
1846
+ 39 ,
1847
+ ],
1848
+ [
1849
+ 'Parameter #4 $key_compare_func of function array_uintersect_uassoc expects callable(int, int): int<-1, 1>, Closure(string, string): int<-1, 1> given. ' ,
1850
+ 42 ,
1851
+ ],
1852
+ ]);
1853
+ }
1854
+
1855
+ public function testArrayUintersect (): void
1856
+ {
1857
+ $ this ->checkExplicitMixed = true ;
1858
+ $ this ->analyse ([__DIR__ . '/data/array_uintersect.php ' ], [
1859
+ [
1860
+ 'Parameter #3 $data_compare_func of function array_uintersect expects callable(string, string): int<-1, 1>, Closure(int, int): int<-1, 1> given. ' ,
1861
+ 22 ,
1862
+ ],
1863
+ [
1864
+ 'Parameter #3 $data_compare_func of function array_uintersect expects callable(int, int): int<-1, 1>, Closure(string, string): int<-1, 1> given. ' ,
1865
+ 30 ,
1866
+ ],
1867
+ ]);
1868
+ }
1869
+
1719
1870
public function testNoNamedArguments (): void
1720
1871
{
1721
1872
if (PHP_VERSION_ID < 80000 ) {
0 commit comments