function CachedDoubler::generateClassId
Parameters
ReflectionClass<object>|null $class:
ReflectionClass<object>[] $interfaces:
Return value
string
1 call to CachedDoubler::generateClassId()
- CachedDoubler::createDoubleClass in vendor/
phpspec/ prophecy/ src/ Prophecy/ Doubler/ CachedDoubler.php - Creates double class and returns its FQN.
File
-
vendor/
phpspec/ prophecy/ src/ Prophecy/ Doubler/ CachedDoubler.php, line 45
Class
- CachedDoubler
- Cached class doubler. Prevents mirroring/creation of the same structure twice.
Namespace
Prophecy\DoublerCode
private function generateClassId(?ReflectionClass $class, array $interfaces) {
$parts = array();
if (null !== $class) {
$parts[] = $class->getName();
}
foreach ($interfaces as $interface) {
$parts[] = $interface->getName();
}
foreach ($this->getClassPatches() as $patch) {
$parts[] = get_class($patch);
}
sort($parts);
return md5(implode('', $parts));
}