Code Duplication    Length = 12-13 lines in 2 locations

lib/Doctrine/ORM/AbstractQuery.php 1 location

@@ 321-332 (lines=12) @@
318
     *
319
     * @return Query\Parameter|null The value of the bound parameter, or NULL if not available.
320
     */
321
    public function getParameter($key)
322
    {
323
        $filteredParameters = $this->parameters->filter(
324
            function ($parameter) use ($key)
325
            {
326
                // Must not be identical because of string to integer conversion
327
                return ($key == $parameter->getName());
328
            }
329
        );
330
331
        return count($filteredParameters) ? $filteredParameters->first() : null;
332
    }
333
334
    /**
335
     * Sets a collection of query parameters.

lib/Doctrine/ORM/QueryBuilder.php 1 location

@@ 614-626 (lines=13) @@
611
     *
612
     * @return Query\Parameter|null The value of the bound parameter.
613
     */
614
    public function getParameter($key)
615
    {
616
        $filteredParameters = $this->parameters->filter(
617
            function ($parameter) use ($key)
618
            {
619
                /* @var Query\Parameter $parameter */
620
                // Must not be identical because of string to integer conversion
621
                return ($key == $parameter->getName());
622
            }
623
        );
624
625
        return count($filteredParameters) ? $filteredParameters->first() : null;
626
    }
627
628
    /**
629
     * Sets the position of the first result to retrieve (the "offset").