Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Commit

Permalink
Fixed more E_STRICT warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Pat Patterson committed Nov 8, 2011
1 parent 2f4b1f3 commit 6e65843
Showing 1 changed file with 25 additions and 21 deletions.
46 changes: 25 additions & 21 deletions soapclient/SforceBaseClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand All @@ -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();
}

Expand Down Expand Up @@ -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 {
Expand All @@ -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 {
Expand All @@ -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);
}
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand All @@ -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');

Expand All @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand All @@ -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);
}
Expand Down Expand Up @@ -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);
Expand All @@ -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;
}
Expand Down Expand Up @@ -1079,7 +1083,7 @@ function convertFields($any) {

$array = $this->xml2array('<Object xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">'.$str.'</Object>', 2);

$xml = new stdClass;
$xml = new stdClass();
if (!count($array['Object']))
return $xml;

Expand Down

0 comments on commit 6e65843

Please sign in to comment.