Code Duplication    Length = 10-10 lines in 2 locations

lib/Doctrine/ODM/MongoDB/Query/Expr.php 2 locations

@@ 612-621 (lines=10) @@
609
     * @return $this
610
     * @throws \InvalidArgumentException if less than three points are given
611
     */
612
    public function geoWithinPolygon(/* array($x1, $y1), ... */)
613
    {
614
        if (func_num_args() < 3) {
615
            throw new \InvalidArgumentException('Polygon must be defined by three or more points.');
616
        }
617
618
        $shape = ['$polygon' => func_get_args()];
619
620
        return $this->operator('$geoWithin', $shape);
621
    }
622
623
    /**
624
     * Return the current field.
@@ 1506-1515 (lines=10) @@
1503
     * @return $this
1504
     * @throws \InvalidArgumentException if less than three points are given
1505
     */
1506
    public function withinPolygon(/* array($x1, $y1), array($x2, $y2), ... */)
1507
    {
1508
        if (func_num_args() < 3) {
1509
            throw new \InvalidArgumentException('Polygon must be defined by three or more points.');
1510
        }
1511
1512
        $shape = ['$polygon' => func_get_args()];
1513
1514
        return $this->operator('$within', $shape);
1515
    }
1516
1517
    /**
1518
     * Gets reference mapping for current field from current class or its descendants.