Code Duplication    Length = 13-13 lines in 2 locations

src/Traits/ConstSetLikeTrait.php 1 location

@@ 85-97 (lines=13) @@
82
    /**
83
     * Returns an array containing the values from this VectorLike.
84
     */
85
    public function toArray()
86
    {
87
        $arr = [];
88
        foreach ($this as $k => $v) {
89
            if ($v instanceof Iterable) {
90
                $arr[] = $v->toArray();
91
            } else {
92
                $arr[] = $v;
93
            }
94
        }
95
96
        return $arr;
97
    }
98
}
99

src/Traits/ConstVectorLikeTrait.php 1 location

@@ 92-104 (lines=13) @@
89
    /**
90
     * Returns an array containing the values from this VectorLike.
91
     */
92
    public function toArray()
93
    {
94
        $arr = [];
95
        foreach ($this as $k => $v) {
96
            if ($v instanceof Iterable) {
97
                $arr[] = $v->toArray();
98
            } else {
99
                $arr[] = $v;
100
            }
101
        }
102
103
        return $arr;
104
    }
105
}
106