Skip to content

Commit 2265fe9

Browse files
committed
implemented Countable interface for cypher containers
1 parent 5591264 commit 2265fe9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/Types/CypherList.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
use ArrayIterator;
2525
use BadMethodCallException;
2626
use function count;
27+
use Countable;
2728
use function in_array;
2829
use function is_int;
2930
use Laudis\Neo4j\Contracts\CypherContainerInterface;
@@ -36,7 +37,7 @@
3637
*
3738
* @implements CypherContainerInterface<int, T>
3839
*/
39-
final class CypherList implements CypherContainerInterface
40+
final class CypherList implements CypherContainerInterface, Countable
4041
{
4142
/** @var list<T> */
4243
private array $array;

src/Types/CypherMap.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
use ArrayIterator;
2525
use BadMethodCallException;
2626
use function count;
27+
use Countable;
2728
use function func_num_args;
2829
use function in_array;
2930
use function is_array;
@@ -46,7 +47,7 @@
4647
*
4748
* @psalm-immutable
4849
*/
49-
final class CypherMap implements CypherContainerInterface
50+
final class CypherMap implements CypherContainerInterface, Countable
5051
{
5152
/** @var array<string, T> */
5253
private array $map;

0 commit comments

Comments
 (0)