Code Duplication    Length = 5-5 lines in 2 locations

src/Commands/CommandsCollection.php 1 location

@@ 83-87 (lines=5) @@
80
     */
81
    public function offsetSet($offset, $value)
82
    {
83
        if ($offset == null) {
84
            $this->items[] = $value;
85
        } else {
86
            $this->items[$offset] = $value;
87
        }
88
        $this->hops = count($this->items);
89
        if ($this->overflow()) {
90
            throw new Exception(

src/Resolver/Cache/DefinitionsCollection.php 1 location

@@ 89-93 (lines=5) @@
86
     */
87
    public function offsetSet($offset, $value)
88
    {
89
        if ($offset == null) {
90
            $this->items[] = $value;
91
        } else {
92
            $this->items[$offset] = $value;
93
        }
94
    }
95
}
96