Skip to content

Commit 767a07e

Browse files
committed
added test for get_object_vars()
1 parent 037ff92 commit 767a07e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
namespace GetObjectVars;
4+
5+
use function PHPStan\Testing\assertType;
6+
7+
/**
8+
* @param object{1: mixed} $object
9+
*/
10+
function getObjectVarsWithIntKeyTest(object $object): void
11+
{
12+
assertType('array<array-key, mixed>', get_object_vars($object));
13+
assertType('array<array-key, mixed>', get_object_vars(json_decode('{"1": "test"}')));
14+
}

0 commit comments

Comments
 (0)