1
0
mirror of synced 2024-12-05 03:06:05 +03:00

#1333 - Removing useless is_string() function call, clarifying docblock parameters

This commit is contained in:
Marco Pivetta 2015-03-17 21:11:43 +00:00
parent 5d6a39d14c
commit d6687e070e

View File

@ -1566,19 +1566,17 @@ class UnitOfWork implements PropertyChangedListener
*
* @ignore
*
* @param string $idHash
* @param mixed $idHash (must be possible to cast it to string)
* @param string $rootClassName
*
* @return object|bool The found entity or FALSE.
*/
public function tryGetByIdHash($idHash, $rootClassName)
{
if (! is_string($idHash)) {
$idHash = (string) $idHash;
}
$stringIdHash = (string) $idHash;
if (isset($this->identityMap[$rootClassName][$idHash])) {
return $this->identityMap[$rootClassName][$idHash];
if (isset($this->identityMap[$rootClassName][$stringIdHash])) {
return $this->identityMap[$rootClassName][$stringIdHash];
}
return false;