Code Duplication    Length = 9-9 lines in 2 locations

src/definition/parameter/ParameterBuilder.php 2 locations

@@ 45-53 (lines=9) @@
42
     * @return ParameterBuilder
43
     * @throws ParameterNotFoundException
44
     */
45
    public function changeParameter(string $name, ReferenceInterface $reference): ParameterBuilder
46
    {
47
        if (!$this->has($name)) {
48
            throw new ParameterNotFoundException(sprintf('Parameter with name "%s" not found', $name));
49
        }
50
        $this->parameterCollection[$name] = $reference;
51
52
        return $this;
53
    }
54
55
    /**
56
     * Add parameter to collection
@@ 63-71 (lines=9) @@
60
     * @return ParameterBuilder
61
     * @throws ParameterAlreadyExistsException
62
     */
63
    public function add(string $name, ReferenceInterface $reference): ParameterBuilder
64
    {
65
        if ($this->has($name)) {
66
            throw new ParameterAlreadyExistsException(sprintf('Parameter with name "%s" already defined', $name));
67
        }
68
        $this->parameterCollection[$name] = $reference;
69
70
        return $this;
71
    }
72
73
    /**
74
     * Has parameter in collection