From 6e6584339fdbaac9bd72d525602ca5d3f1f9b02d Mon Sep 17 00:00:00 2001 From: Pat Patterson Date: Tue, 8 Nov 2011 10:40:49 -0800 Subject: [PATCH] Fixed more E_STRICT warnings --- soapclient/SforceBaseClient.php | 46 ++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/soapclient/SforceBaseClient.php b/soapclient/SforceBaseClient.php index 16fadca..86f2395 100644 --- a/soapclient/SforceBaseClient.php +++ b/soapclient/SforceBaseClient.php @@ -169,8 +169,8 @@ public function login($username, $password) { * @return LogoutResult */ public function logout() { - $this->setHeaders("logout"); - $arg = new stdClass; + $this->setHeaders("logout"); + $arg = new stdClass(); return $this->sforce->logout(); } @@ -180,9 +180,9 @@ public function logout() { * @return invalidateSessionsResult */ public function invalidateSessions() { - $this->setHeaders("invalidateSessions"); - $arg = new stdClass; - $this->logout(); + $this->setHeaders("invalidateSessions"); + $arg = new stdClass(); + $this->logout(); return $this->sforce->invalidateSessions(); } @@ -517,6 +517,7 @@ public function sendSingleEmail($request) { $email = new SoapVar($r, SOAP_ENC_OBJECT, 'SingleEmailMessage', $this->namespace); array_push($messages, $email); } + $arg = new stdClass(); $arg->messages = $messages; return $this->_sendEmail($arg); } else { @@ -532,6 +533,7 @@ public function sendMassEmail($request) { $email = new SoapVar($r, SOAP_ENC_OBJECT, 'MassEmailMessage', $this->namespace); array_push($messages, $email); } + $arg = new stdClass(); $arg->messages = $messages; return $this->_sendEmail($arg); } else { @@ -554,7 +556,7 @@ protected function _sendEmail($arg) { */ public function convertLead($leadConverts) { $this->setHeaders("convertLead"); - $arg = new stdClass; + $arg = new stdClass(); $arg->leadConverts = $leadConverts; return $this->sforce->convertLead($arg); } @@ -567,7 +569,7 @@ public function convertLead($leadConverts) { */ public function delete($ids) { $this->setHeaders("delete"); - $arg = new stdClass; + $arg = new stdClass(); $arg->ids = $ids; return $this->sforce->delete($arg)->result; } @@ -580,7 +582,7 @@ public function delete($ids) { */ public function undelete($ids) { $this->setHeaders("undelete"); - $arg = new stdClass; + $arg = new stdClass(); $arg->ids = $ids; return $this->sforce->undelete($arg)->result; } @@ -593,7 +595,7 @@ public function undelete($ids) { */ public function emptyRecycleBin($ids) { $this->setHeaders(); - $arg = new stdClass; + $arg = new stdClass(); $arg->ids = $ids; return $this->sforce->emptyRecycleBin($arg)->result; } @@ -609,6 +611,7 @@ public function processSubmitRequest($processRequestArray) { foreach ($processRequestArray as &$process) { $process = new SoapVar($process, SOAP_ENC_OBJECT, 'ProcessSubmitRequest', $this->namespace); } + $arg = new stdClass(); $arg->actions = $processRequestArray; return $this->_process($arg); } else { @@ -628,6 +631,7 @@ public function processWorkitemRequest($processRequestArray) { foreach ($processRequestArray as &$process) { $process = new SoapVar($process, SOAP_ENC_OBJECT, 'ProcessWorkitemRequest', $this->namespace); } + $arg = new stdClass(); $arg->actions = $processRequestArray; return $this->_process($arg); } else { @@ -658,7 +662,7 @@ public function describeGlobal() { */ public function describeLayout($type) { $this->setHeaders("describeLayout"); - $arg = new stdClass; + $arg = new stdClass(); $arg->sObjectType = new SoapVar($type, XSD_STRING, 'string', 'http://www.w3.org/2001/XMLSchema'); return $this->sforce->describeLayout($arg)->result; } @@ -672,7 +676,7 @@ public function describeLayout($type) { */ public function describeSObject($type) { $this->setHeaders("describeSObject"); - $arg = new stdClass; + $arg = new stdClass(); $arg->sObjectType = new SoapVar($type, XSD_STRING, 'string', 'http://www.w3.org/2001/XMLSchema'); return $this->sforce->describeSObject($arg)->result; } @@ -710,7 +714,7 @@ public function describeTabs() { */ public function describeDataCategoryGroups($sObjectType) { $this->setHeaders('describeDataCategoryGroups'); - $arg = new stdClass; + $arg = new stdClass(); $arg->sObjectType = new SoapVar($sObjectType, XSD_STRING, 'string', 'http://www.w3.org/2001/XMLSchema'); return $this->sforce->describeDataCategoryGroups($arg)->result; } @@ -724,7 +728,7 @@ public function describeDataCategoryGroups($sObjectType) { */ public function describeDataCategoryGroupStructures(array $pairs, $topCategoriesOnly) { $this->setHeaders('describeDataCategoryGroupStructures'); - $arg = new stdClass; + $arg = new stdClass(); $arg->pairs = $pairs; $arg->topCategoriesOnly = new SoapVar($topCategoriesOnly, XSD_BOOLEAN, 'boolean', 'http://www.w3.org/2001/XMLSchema'); @@ -742,7 +746,7 @@ public function describeDataCategoryGroupStructures(array $pairs, $topCategories */ public function getDeleted($type, $startDate, $endDate) { $this->setHeaders("getDeleted"); - $arg = new stdClass; + $arg = new stdClass(); $arg->sObjectType = new SoapVar($type, XSD_STRING, 'string', 'http://www.w3.org/2001/XMLSchema'); $arg->startDate = $startDate; $arg->endDate = $endDate; @@ -760,7 +764,7 @@ public function getDeleted($type, $startDate, $endDate) { */ public function getUpdated($type, $startDate, $endDate) { $this->setHeaders("getUpdated"); - $arg = new stdClass; + $arg = new stdClass(); $arg->sObjectType = new SoapVar($type, XSD_STRING, 'string', 'http://www.w3.org/2001/XMLSchema'); $arg->startDate = $startDate; $arg->endDate = $endDate; @@ -792,7 +796,7 @@ public function query($query) { */ public function queryMore($queryLocator) { $this->setHeaders("queryMore"); - $arg = new stdClass; + $arg = new stdClass(); $arg->queryLocator = $queryLocator; $QueryResult = $this->sforce->queryMore($arg)->result; return new QueryResult($QueryResult); @@ -824,7 +828,7 @@ public function queryAll($query, $queryOptions = NULL) { */ public function retrieve($fieldList, $sObjectType, $ids) { $this->setHeaders("retrieve"); - $arg = new stdClass; + $arg = new stdClass(); $arg->fieldList = $fieldList; $arg->sObjectType = new SoapVar($sObjectType, XSD_STRING, 'string', 'http://www.w3.org/2001/XMLSchema'); $arg->ids = $ids; @@ -839,7 +843,7 @@ public function retrieve($fieldList, $sObjectType, $ids) { */ public function search($searchString) { $this->setHeaders("search"); - $arg = new stdClass; + $arg = new stdClass(); $arg->searchString = new SoapVar($searchString, XSD_STRING, 'string', 'http://www.w3.org/2001/XMLSchema'); return new SforceSearchResult($this->sforce->search($arg)->result); } @@ -867,7 +871,7 @@ public function getUserInfo() { */ public function setPassword($userId, $password) { $this->setHeaders("setPassword"); - $arg = new stdClass; + $arg = new stdClass(); $arg->userId = new SoapVar($userId, XSD_STRING, 'string', 'http://www.w3.org/2001/XMLSchema'); $arg->password = $password; return $this->sforce->setPassword($arg); @@ -881,7 +885,7 @@ public function setPassword($userId, $password) { */ public function resetPassword($userId) { $this->setHeaders("resetPassword"); - $arg = new stdClass; + $arg = new stdClass(); $arg->userId = new SoapVar($userId, XSD_STRING, 'string', 'http://www.w3.org/2001/XMLSchema'); return $this->sforce->resetPassword($arg)->result; } @@ -1079,7 +1083,7 @@ function convertFields($any) { $array = $this->xml2array(''.$str.'', 2); - $xml = new stdClass; + $xml = new stdClass(); if (!count($array['Object'])) return $xml;