Code Duplication    Length = 11-11 lines in 2 locations

src/Common/NetteContainerWrapper.php 2 locations

@@ 48-58 (lines=11) @@
45
	/**
46
	 * {@inheritdoc}
47
	 */
48
	public function has($key)
49
	{
50
		if ($this->isKeyConfig($key)) {
51
			return (bool) $this->config;
52
		}
53
		if ($this->isServiceId($key)) {
54
			return $this->container->hasService($this->extractServiceId($key));
55
		}
56
57
		return (bool) $this->container->getByType($key);
58
	}
59
60
	private function tryToGetByKey($key)
61
	{
@@ 60-70 (lines=11) @@
57
		return (bool) $this->container->getByType($key);
58
	}
59
60
	private function tryToGetByKey($key)
61
	{
62
		if ($this->isKeyConfig($key)) {
63
			return $this->config;
64
		}
65
		if ($this->isServiceId($key)) {
66
			return $this->container->getService($this->extractServiceId($key));
67
		}
68
69
		return $this->container->getByType($key);
70
	}
71
72
	private function isKeyConfig(string $key): bool
73
	{