#1333 - Removing useless is_string()
function call, clarifying docblock parameters
This commit is contained in:
parent
5d6a39d14c
commit
d6687e070e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user