Code Duplication    Length = 13-13 lines in 2 locations

src/Scope.php 2 locations

@@ 154-166 (lines=13) @@
151
     *
152
     * @return bool Returns the new number of elements in the array.
153
     */
154
    public function isRequested($checkScopeSegment)
155
    {
156
        if ($this->parentScopes) {
157
            $scopeArray = array_slice($this->parentScopes, 1);
158
            array_push($scopeArray, $this->scopeIdentifier, $checkScopeSegment);
159
        } else {
160
            $scopeArray = [$checkScopeSegment];
161
        }
162
163
        $scopeString = implode('.', (array) $scopeArray);
164
165
        return in_array($scopeString, $this->manager->getRequestedIncludes());
166
    }
167
168
    /**
169
     * Is Excluded.
@@ 182-194 (lines=13) @@
179
     *
180
     * @return bool
181
     */
182
    public function isExcluded($checkScopeSegment)
183
    {
184
        if ($this->parentScopes) {
185
            $scopeArray = array_slice($this->parentScopes, 1);
186
            array_push($scopeArray, $this->scopeIdentifier, $checkScopeSegment);
187
        } else {
188
            $scopeArray = [$checkScopeSegment];
189
        }
190
191
        $scopeString = implode('.', (array) $scopeArray);
192
193
        return in_array($scopeString, $this->manager->getRequestedExcludes());
194
    }
195
196
    /**
197
     * Push Parent Scope.