Skip to content

Commit

Permalink
Make GraphNode not countable anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
yguedidi committed Dec 19, 2017
1 parent fd36796 commit 61272c3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
12 changes: 1 addition & 11 deletions src/GraphNode/GraphNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
/**
* @package Facebook
*/
class GraphNode implements \ArrayAccess, \Countable, \IteratorAggregate
class GraphNode implements \ArrayAccess, \IteratorAggregate
{
/**
* @var array maps object key names to Graph object types
Expand Down Expand Up @@ -126,16 +126,6 @@ public function asJson($options = 0)
return json_encode($this->uncastFields(), $options);
}

/**
* Count the number of fields in the collection.
*
* @return int
*/
public function count()
{
return count($this->fields);
}

/**
* Get an iterator for the fields.
*
Expand Down
9 changes: 0 additions & 9 deletions tests/GraphNode/GraphNodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,15 +201,6 @@ public function testACollectionCanBeConvertedToProperJson()
$this->assertEquals('["foo","bar",123]', $graphNodeAsString);
}

public function testACollectionCanBeCounted()
{
$graphNode = new GraphNode(['foo', 'bar', 'baz']);

$graphNodeCount = count($graphNode);

$this->assertEquals(3, $graphNodeCount);
}

public function testACollectionCanBeAccessedAsAnArray()
{
$graphNode = new GraphNode(['foo' => 'bar', 'faz' => 'baz']);
Expand Down

0 comments on commit 61272c3

Please sign in to comment.