object references corrections

This commit is contained in:
RainLoop Team 2013-11-19 18:10:11 +04:00
parent 44241b859c
commit 8dbf099934
2 changed files with 13 additions and 13 deletions

View file

@ -23,17 +23,17 @@ class FetchResponse
*
* @param \MailSo\Imap\Response $oImapResponse
*/
private function __construct(&$oImapResponse)
private function __construct($oImapResponse)
{
$this->oImapResponse =& $oImapResponse;
$this->oImapResponse = $oImapResponse;
$this->aEnvelopeCache = null;
}
/**
* @param \MailSo\Imap\Response &$oImapResponse
* @param \MailSo\Imap\Response $oImapResponse
* @return \MailSo\Imap\FetchResponse
*/
public static function NewInstance(&$oImapResponse)
public static function NewInstance($oImapResponse)
{
return new self($oImapResponse);
}
@ -133,22 +133,22 @@ class FetchResponse
*
* @return mixed
*/
public function &GetFetchValue($sFetchItemName)
public function GetFetchValue($sFetchItemName)
{
$mReturn = null;
$bNextIsValue = false;
if (Enumerations\FetchType::INDEX === $sFetchItemName)
{
$mReturn =& $this->oImapResponse->ResponseList[1];
$mReturn = $this->oImapResponse->ResponseList[1];
}
else
{
foreach ($this->oImapResponse->ResponseList[3] as &$mItem)
foreach ($this->oImapResponse->ResponseList[3] as $mItem)
{
if ($bNextIsValue)
{
$mReturn =& $mItem;
$mReturn = $mItem;
break;
}
@ -176,7 +176,7 @@ class FetchResponse
if (isset($this->oImapResponse->ResponseList[3]) && \is_array($this->oImapResponse->ResponseList[3]))
{
foreach ($this->oImapResponse->ResponseList[3] as &$mItem)
foreach ($this->oImapResponse->ResponseList[3] as $mItem)
{
if ($bNextIsValue)
{

View file

@ -898,7 +898,7 @@ class ImapClient extends \MailSo\Net\NetClient
$aReturn = array();
$oImapResponse = null;
foreach ($aResult as &$oImapResponse)
foreach ($aResult as $oImapResponse)
{
if (FetchResponse::IsValidFetchImapResponse($oImapResponse))
{
@ -1089,13 +1089,13 @@ class ImapClient extends \MailSo\Net\NetClient
private function validateThreadItem($aValue)
{
$mResult = false;
if (is_numeric($aValue))
if (\is_numeric($aValue))
{
$mResult = (int) $aValue;
}
else if (is_array($aValue))
else if (\is_array($aValue))
{
if (1 === count($aValue) && is_numeric($aValue[0]))
if (1 === count($aValue) && \is_numeric($aValue[0]))
{
$mResult = (int) $aValue[0];
}