Code Duplication    Length = 12-12 lines in 2 locations

src/Knp/FriendlyContexts/Context/Context.php 2 locations

@@ 96-107 (lines=12) @@
93
        return $this->get('friendly.http.http_content_type_guesser');
94
    }
95
96
    protected function get($service)
97
    {
98
        if ($this->container->has($service)) {
99
            return $this->container->get($service);
100
        }
101
102
        if (null !== $this->getKernel() && $this->getKernel()->getContainer()->has($service)) {
103
            return $this->getKernel()->getContainer()->get($service);
104
        }
105
106
        throw new ServiceNotFoundException($service);
107
    }
108
109
    protected function getParameter($name)
110
    {
@@ 109-120 (lines=12) @@
106
        throw new ServiceNotFoundException($service);
107
    }
108
109
    protected function getParameter($name)
110
    {
111
        if ($this->container->hasParameter($name)) {
112
            return $this->container->getParameter($name);
113
        }
114
115
        if (null !== $this->getKernel() && $this->getKernel()->getContainer()->hasParameter($name)) {
116
            return $this->getKernel()->getContainer()->getParameter($name);
117
        }
118
119
        throw new ParameterNotFoundException($name);
120
    }
121
122
    protected function getKernel()
123
    {