Code Duplication    Length = 10-10 lines in 2 locations

src/Collection/Collection.php 1 location

@@ 79-88 (lines=10) @@
76
     *
77
     * @return int
78
     */
79
    public function count()
80
    {
81
        $traversable = $this->optimizeUnwrap();
82
83
        if (is_array($traversable)) {
84
            return count($traversable);
85
        }
86
87
        return iterator_count($traversable);
88
    }
89
90
    /**
91
     * {@inheritDoc}

src/Collection/CollectionTrait.php 1 location

@@ 991-1000 (lines=10) @@
988
     *
989
     * @return int
990
     */
991
    public function count()
992
    {
993
        $traversable = $this->optimizeUnwrap();
994
995
        if (is_array($traversable)) {
996
            return count($traversable);
997
        }
998
999
        return iterator_count($traversable);
1000
    }
1001
1002
    /**
1003
     * {@inheritDoc}