Code Duplication    Length = 7-7 lines in 2 locations

src/Prophecy/Doubler/Doubler.php 1 location

@@ 96-102 (lines=7) @@
93
    public function double(ReflectionClass $class = null, array $interfaces, array $args = null)
94
    {
95
        foreach ($interfaces as $interface) {
96
            if (!$interface instanceof ReflectionClass) {
97
                throw new InvalidArgumentException(sprintf(
98
                    "[ReflectionClass \$interface1 [, ReflectionClass \$interface2]] array expected as\n".
99
                    "a second argument to `Doubler::double(...)`, but got %s.",
100
                    is_object($interface) ? get_class($interface).' class' : gettype($interface)
101
                ));
102
            }
103
        }
104
105
        $classname  = $this->createDoubleClass($class, $interfaces);

src/Prophecy/Doubler/Generator/ClassMirror.php 1 location

@@ 65-71 (lines=7) @@
62
        }
63
64
        foreach ($interfaces as $interface) {
65
            if (!$interface instanceof ReflectionClass) {
66
                throw new InvalidArgumentException(sprintf(
67
                    "[ReflectionClass \$interface1 [, ReflectionClass \$interface2]] array expected as\n".
68
                    "a second argument to `ClassMirror::reflect(...)`, but got %s.",
69
                    is_object($interface) ? get_class($interface).' class' : gettype($interface)
70
                ));
71
            }
72
            if (false === $interface->isInterface()) {
73
                throw new InvalidArgumentException(sprintf(
74
                    "Could not reflect %s as an interface, because it\n".