for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @copyright Zicht Online <http://zicht.nl>
*/
namespace Zicht\Itertools\lib\Traits;
trait CountableTrait
{
* Count elements of an object
*
* @link http://php.net/manual/en/countable.count.php
* @return int
public function count()
if ($this instanceof \Iterator) {
return iterator_count($this);
}
return null;