Code Duplication    Length = 11-12 lines in 2 locations

src/Entity/Descriptor.php 2 locations

@@ 75-85 (lines=11) @@
72
     * @return $this
73
     * @throws \Exception
74
     */
75
    public function addScope($scope)
76
    {
77
        $this->validateScopeValue($scope);
78
79
        if (false !== $this->getScopeKey($scope)) {
80
            return $this;
81
        }
82
83
        $this->descriptor['scopes'][] = $scope;
84
        return $this;
85
    }
86
87
    /**
88
     * @param string $scope
@@ 125-136 (lines=12) @@
122
     * @return $this
123
     * @throws \Exception
124
     */
125
    public function removeScope($scope)
126
    {
127
        $this->validateScopeValue($scope);
128
129
        $key = $this->getScopeKey($scope);
130
        if (false === $key) {
131
            return $this;
132
        }
133
134
        unset($this->descriptor['scopes'][$key]);
135
        return $this;
136
    }
137
138
    /**
139
     * @return array