Skip to content

Commit

Permalink
Extend Object, use Iterables::toString() instead
Browse files Browse the repository at this point in the history
  • Loading branch information
Janos Szurovecz committed May 26, 2015
1 parent b2e91e4 commit 1a7f02f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/precore/util/FluentIterable.php
Expand Up @@ -25,6 +25,7 @@

use Iterator;
use IteratorAggregate;
use precore\lang\Object;
use Traversable;

/**
Expand All @@ -45,7 +46,7 @@
* @package precore\util
* @author Janos Szurovecz <szjani@szjani.hu>
*/
final class FluentIterable implements IteratorAggregate
final class FluentIterable extends Object implements IteratorAggregate
{
/**
* @var IteratorAggregate
Expand Down Expand Up @@ -307,8 +308,8 @@ public function getIterator()
return $this->iterator();
}

public function __toString()
public function toString()
{
return '[' . Joiner::on(', ')->useForNull('null')->join($this) . ']';
return Iterables::toString($this);
}
}

0 comments on commit 1a7f02f

Please sign in to comment.