Code Duplication    Length = 11-12 lines in 2 locations

src/Entity/Descriptor.php 2 locations

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