PhpSpec\Listener\CollaboratorMethodNotFoundListener::getDoubledInterface PHP Method

getDoubledInterface() private method

private getDoubledInterface ( string $classname ) : mixed
$classname string
return mixed
    private function getDoubledInterface($classname)
    {
        if (class_parents($classname) !== array('stdClass' => 'stdClass')) {
            return;
        }
        $interfaces = array_filter(class_implements($classname), function ($interface) {
            return !preg_match('/^Prophecy/', $interface);
        });
        if (count($interfaces) !== 1) {
            return;
        }
        return current($interfaces);
    }