| @@ 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); |
|
| @@ 55-61 (lines=7) @@ | ||
| 52 | } |
|
| 53 | ||
| 54 | foreach ($interfaces as $interface) { |
|
| 55 | if (!$interface instanceof ReflectionClass) { |
|
| 56 | throw new InvalidArgumentException(sprintf( |
|
| 57 | "[ReflectionClass \$interface1 [, ReflectionClass \$interface2]] array expected as\n". |
|
| 58 | "a second argument to `ClassMirror::reflect(...)`, but got %s.", |
|
| 59 | is_object($interface) ? get_class($interface).' class' : gettype($interface) |
|
| 60 | )); |
|
| 61 | } |
|
| 62 | if (false === $interface->isInterface()) { |
|
| 63 | throw new InvalidArgumentException(sprintf( |
|
| 64 | "Could not reflect %s as an interface, because it\n". |
|