Code Duplication    Length = 13-13 lines in 4 locations

htdocs/class/snoopy.php 4 locations

@@ 166-178 (lines=13) @@
163
                        }
164
                    }
165
166
                    if ($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0) {
167
                        $frameurls = $this->_frameurls;
168
                        $this->_frameurls = array();
169
170
                        while (list(, $frameurl) = each($frameurls)) {
171
                            if ($this->_framedepth < $this->maxframes) {
172
                                $this->fetch($frameurl);
173
                                $this->_framedepth++;
174
                            } else
175
                                break;
176
                        }
177
                    }
178
                } else {
179
                    return false;
180
                }
181
                return true;
@@ 214-226 (lines=13) @@
211
                    }
212
                }
213
214
                if ($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0) {
215
                    $frameurls = $this->_frameurls;
216
                    $this->_frameurls = array();
217
218
                    while (list(, $frameurl) = each($frameurls)) {
219
                        if ($this->_framedepth < $this->maxframes) {
220
                            $this->fetch($frameurl);
221
                            $this->_framedepth++;
222
                        } else
223
                            break;
224
                    }
225
                }
226
                return true;
227
                break;
228
            default:
229
                // not a valid protocol
@@ 300-312 (lines=13) @@
297
                        }
298
                    }
299
300
                    if ($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0) {
301
                        $frameurls = $this->_frameurls;
302
                        $this->_frameurls = array();
303
304
                        while (list(, $frameurl) = each($frameurls)) {
305
                            if ($this->_framedepth < $this->maxframes) {
306
                                $this->fetch($frameurl);
307
                                $this->_framedepth++;
308
                            } else
309
                                break;
310
                        }
311
                    }
312
313
                } else {
314
                    return false;
315
                }
@@ 355-367 (lines=13) @@
352
                    }
353
                }
354
355
                if ($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0) {
356
                    $frameurls = $this->_frameurls;
357
                    $this->_frameurls = array();
358
359
                    while (list(, $frameurl) = each($frameurls)) {
360
                        if ($this->_framedepth < $this->maxframes) {
361
                            $this->fetch($frameurl);
362
                            $this->_framedepth++;
363
                        } else
364
                            break;
365
                    }
366
                }
367
                return true;
368
                break;
369
370
            default: