Code Duplication    Length = 10-10 lines in 2 locations

src/DP/Core/CoreBundle/Behat/DefaultContext.php 1 location

@@ 53-62 (lines=10) @@
50
    /**
51
     * @param string $baseName
52
     */
53
    protected function getRepository($resource, $baseName = null)
54
    {
55
        $service = 'dedipanel.';
56
57
        if (!empty($baseName)) {
58
            $service .= $baseName . '.';
59
        }
60
61
        return $this->getService($service . 'repository.'.$resource);
62
    }
63
64
    protected function findOneBy($type, array $criteria, $repoPrefix = '')
65
    {

src/DP/Core/CoreBundle/Behat/ResourceContext.php 1 location

@@ 469-478 (lines=10) @@
466
    /**
467
     * @param string $baseName
468
     */
469
    protected function getRepository($resource, $baseName = null)
470
    {
471
        $service = 'dedipanel.';
472
473
        if (!empty($baseName)) {
474
            $service .= $baseName . '.';
475
        }
476
477
        return $this->getService($service . 'repository.'.$resource);
478
    }
479
480
    protected function findOneBy($type, array $criteria, $repoPrefix = '')
481
    {