Code Duplication    Length = 7-7 lines in 2 locations

src/Context/Environment/Handler/ContextServiceEnvironmentHandler.php 2 locations

@@ 131-137 (lines=7) @@
128
    {
129
        $contexts = $suite->getSetting('contexts');
130
131
        if (!is_array($contexts)) {
132
            throw new SuiteConfigurationException(sprintf(
133
                '"contexts" setting of the "%s" suite is expected to be an array, %s given.',
134
                $suite->getName(),
135
                gettype($contexts)
136
            ), $suite->getName());
137
        }
138
139
        return array_map([$this, 'normalizeContext'], $contexts);
140
    }
@@ 146-152 (lines=7) @@
143
    {
144
        $contexts = $suite->getSetting('contexts');
145
146
        if (!is_array($contexts)) {
147
            throw new SuiteConfigurationException(sprintf(
148
                '"contexts" setting of the "%s" suite is expected to be an array, %s given.',
149
                $suite->getName(),
150
                gettype($contexts)
151
            ), $suite->getName());
152
        }
153
154
        $contexts = array_filter($contexts, function ($context) use ($contextsToRemove): bool {
155
            return !in_array($this->normalizeContext($context), $contextsToRemove, true);