Code Duplication    Length = 7-7 lines in 2 locations

src/MockWithExpectationsTrait.php 2 locations

@@ 237-243 (lines=7) @@
234
    {
235
        $reflection = new ReflectionClass($className);
236
237
        if ($reflection->isInterface()) {
238
            $publicMethods = array_map(function (ReflectionMethod $method) {
239
                return $method->name;
240
            }, $reflection->getMethods(ReflectionMethod::IS_PUBLIC));
241
242
            return array_diff($publicMethods, $methods);
243
        }
244
245
        if ($reflection->isAbstract()) {
246
            $abstractMethods = array_map(function(ReflectionMethod $method) {
@@ 245-251 (lines=7) @@
242
            return array_diff($publicMethods, $methods);
243
        }
244
245
        if ($reflection->isAbstract()) {
246
            $abstractMethods = array_map(function(ReflectionMethod $method) {
247
                return $method->name;
248
            }, $reflection->getMethods(ReflectionMethod::IS_ABSTRACT));
249
250
            return array_diff($abstractMethods, $methods);
251
        }
252
253
        return [];
254
    }