Code Duplication    Length = 14-14 lines in 2 locations

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

@@ 462-475 (lines=14) @@
459
     * @param array|string $fieldName,...
460
     * @return $this
461
     */
462
    public function exclude($fieldName = null)
463
    {
464
        if ( ! isset($this->query['select'])) {
465
            $this->query['select'] = [];
466
        }
467
468
        $fieldNames = is_array($fieldName) ? $fieldName : func_get_args();
469
470
        foreach ($fieldNames as $fieldName) {
471
            $this->query['select'][$fieldName] = 0;
472
        }
473
474
        return $this;
475
    }
476
477
    /**
478
     * Specify $exists criteria for the current field.
@@ 1439-1452 (lines=14) @@
1436
     * @param array|string $fieldName,...
1437
     * @return $this
1438
     */
1439
    public function select($fieldName = null)
1440
    {
1441
        if ( ! isset($this->query['select'])) {
1442
            $this->query['select'] = [];
1443
        }
1444
1445
        $fieldNames = is_array($fieldName) ? $fieldName : func_get_args();
1446
1447
        foreach ($fieldNames as $fieldName) {
1448
            $this->query['select'][$fieldName] = 1;
1449
        }
1450
1451
        return $this;
1452
    }
1453
1454
    /**
1455
     * Select only matching embedded documents in an array field for the query