Skip to content

Commit 61272c3

Browse files
committed
Make GraphNode not countable anymore
1 parent fd36796 commit 61272c3

File tree

2 files changed

+1
-20
lines changed

2 files changed

+1
-20
lines changed

src/GraphNode/GraphNode.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
/**
2626
* @package Facebook
2727
*/
28-
class GraphNode implements \ArrayAccess, \Countable, \IteratorAggregate
28+
class GraphNode implements \ArrayAccess, \IteratorAggregate
2929
{
3030
/**
3131
* @var array maps object key names to Graph object types
@@ -126,16 +126,6 @@ public function asJson($options = 0)
126126
return json_encode($this->uncastFields(), $options);
127127
}
128128

129-
/**
130-
* Count the number of fields in the collection.
131-
*
132-
* @return int
133-
*/
134-
public function count()
135-
{
136-
return count($this->fields);
137-
}
138-
139129
/**
140130
* Get an iterator for the fields.
141131
*

tests/GraphNode/GraphNodeTest.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -201,15 +201,6 @@ public function testACollectionCanBeConvertedToProperJson()
201201
$this->assertEquals('["foo","bar",123]', $graphNodeAsString);
202202
}
203203

204-
public function testACollectionCanBeCounted()
205-
{
206-
$graphNode = new GraphNode(['foo', 'bar', 'baz']);
207-
208-
$graphNodeCount = count($graphNode);
209-
210-
$this->assertEquals(3, $graphNodeCount);
211-
}
212-
213204
public function testACollectionCanBeAccessedAsAnArray()
214205
{
215206
$graphNode = new GraphNode(['foo' => 'bar', 'faz' => 'baz']);

0 commit comments

Comments
 (0)