11<?php
22declare (strict_types=1 );
33
4-
54namespace DMS \PHPUnitExtensions \ArraySubset \Tests \Unit \Constraint ;
65
76use ArrayAccessible ;
1817
1918final class ArraySubsetTest extends TestCase
2019{
20+ /**
21+ * @return mixed[]
22+ */
2123 public static function evaluateDataProvider (): array
2224 {
2325 return [
24- 'loose array subset and array other ' => [
26+ 'loose array subset and array other ' => [
2527 'expected ' => true ,
2628 'subset ' => ['bar ' => 0 ],
2729 'other ' => ['foo ' => '' , 'bar ' => '0 ' ],
2830 'strict ' => false ,
2931 ],
30- 'strict array subset and array other ' => [
32+ 'strict array subset and array other ' => [
3133 'expected ' => false ,
3234 'subset ' => ['bar ' => 0 ],
3335 'other ' => ['foo ' => '' , 'bar ' => '0 ' ],
3436 'strict ' => true ,
3537 ],
36- 'loose array subset and ArrayObject other ' => [
38+ 'loose array subset and ArrayObject other ' => [
3739 'expected ' => true ,
3840 'subset ' => ['bar ' => 0 ],
3941 'other ' => new ArrayObject (['foo ' => '' , 'bar ' => '0 ' ]),
@@ -49,9 +51,9 @@ public static function evaluateDataProvider(): array
4951 }
5052
5153 /**
52- * @param array|Traversable $subset
53- * @param array|Traversable $other
54- * @param bool $strict
54+ * @param array|Traversable|mixed[] $subset
55+ * @param array|Traversable|mixed[] $other
56+ * @param bool $strict
5557 *
5658 * @throws ExpectationFailedException
5759 * @throws InvalidArgumentException
@@ -92,19 +94,25 @@ public function testIsCountable(): void
9294 {
9395 $ reflection = new ReflectionClass (ArraySubset::class);
9496
95- $ this ->assertTrue ($ reflection ->implementsInterface (Countable::class), sprintf (
96- 'Failed to assert that ArraySubset implements "%s". ' ,
97- Countable::class
98- ));
97+ $ this ->assertTrue (
98+ $ reflection ->implementsInterface (Countable::class),
99+ sprintf (
100+ 'Failed to assert that ArraySubset implements "%s". ' ,
101+ Countable::class
102+ )
103+ );
99104 }
100105
101106 public function testIsSelfDescribing (): void
102107 {
103108 $ reflection = new ReflectionClass (ArraySubset::class);
104109
105- $ this ->assertTrue ($ reflection ->implementsInterface (SelfDescribing::class), sprintf (
106- 'Failed to assert that Array implements "%s". ' ,
107- SelfDescribing::class
108- ));
110+ $ this ->assertTrue (
111+ $ reflection ->implementsInterface (SelfDescribing::class),
112+ sprintf (
113+ 'Failed to assert that Array implements "%s". ' ,
114+ SelfDescribing::class
115+ )
116+ );
109117 }
110118}
0 commit comments