public function sum(callable $callback = null)
    {

        if ($callback === null)
        {
            $callback = function ($time) {

                return $time->getSeconds();
            };

            return $this->createTime(0, 0, parent::sum($callback));
        }

        return parent::sum($callback);
    }
public function sum(callable $callback = null)
    {

        if ($callback === null)
        {
            $callback = function ($time) {

                return $time->getSeconds();
            };

            return $this->createTime(0, 0, parent::sum($callback));
        }

        return parent::sum($callback);
    }
public function sum ( callable $ callback = null ) { if ( $ callback === null ) { $ callback = function ( $ time ) { return $ time -> getSeconds ( ) ; } ; return $ this -> createTime ( 0 , 0 , parent :: sum ( $ callback ) ) ; } return parent :: sum ( $ callback ) ; }
Create a new instance of WallaceMaxters\Timer\Time with all
seconds of items of colection objets summed
@return \Wallacemaxters\Timer\Time | mixed
Create a new instance of WallaceMaxters \ Timer \ Time with all seconds of items of colection objets summed