Code Duplication    Length = 8-8 lines in 2 locations

src/Message/Part/MimePart.php 2 locations

@@ 127-134 (lines=8) @@
124
     * @param PartFilter $filter
125
     * @return MessagePart
126
     */
127
    public function getPart($index, PartFilter $filter = null)
128
    {
129
        $parts = $this->getAllParts($filter);
130
        if (!isset($parts[$index])) {
131
            return null;
132
        }
133
        return $parts[$index];
134
    }
135
136
    /**
137
     * Returns the current part, all child parts, and child parts of all
@@ 180-187 (lines=8) @@
177
     * @param PartFilter $filter
178
     * @return MessagePart
179
     */
180
    public function getChild($index, PartFilter $filter = null)
181
    {
182
        $parts = $this->getChildParts($filter);
183
        if (!isset($parts[$index])) {
184
            return null;
185
        }
186
        return $parts[$index];
187
    }
188
    
189
    /**
190
     * Returns all direct child parts.