diff --git a/src/Davispeixoto/ForceDotComToolkitForPhp/SObject.php b/src/Davispeixoto/ForceDotComToolkitForPhp/SObject.php index a2c2992..6053c82 100644 --- a/src/Davispeixoto/ForceDotComToolkitForPhp/SObject.php +++ b/src/Davispeixoto/ForceDotComToolkitForPhp/SObject.php @@ -101,7 +101,7 @@ public function __construct($response = null) $this->fields = $this->convertFields($fieldsToConvert); } - if (sizeof($anArray) > 0) { + if (count($anArray) > 0) { foreach ($anArray as $key => $children_sobject) { $this->fields->$key = $children_sobject; } @@ -289,5 +289,3 @@ public function isSObject($param) return isset($param->type); } } - -?> diff --git a/src/Davispeixoto/ForceDotComToolkitForPhp/SforceBaseClient.php b/src/Davispeixoto/ForceDotComToolkitForPhp/SforceBaseClient.php index f95013a..583d9bf 100644 --- a/src/Davispeixoto/ForceDotComToolkitForPhp/SforceBaseClient.php +++ b/src/Davispeixoto/ForceDotComToolkitForPhp/SforceBaseClient.php @@ -84,7 +84,7 @@ public function getNamespace() public function printDebugInfo() { echo 'PHP Toolkit Version: ' . $this->version . PHP_EOL; - echo 'Current PHP version: ' . phpversion(); + echo 'Current PHP version: ' . PHP_VERSION; echo PHP_EOL; echo 'SOAP enabled: '; if (extension_loaded('soap')) { @@ -114,7 +114,7 @@ public function printDebugInfo() public function createConnection($wsdl, $proxy = null, $soap_options = array()) { // use correct version comparison - if (version_compare(phpversion(), '5.3', '<')) { + if (version_compare(PHP_VERSION, '5.3', '<')) { throw new Exception ('PHP versions older than 5.3 are no longer supported. Please upgrade!'); } diff --git a/src/Davispeixoto/ForceDotComToolkitForPhp/SforceEnterpriseClient.php b/src/Davispeixoto/ForceDotComToolkitForPhp/SforceEnterpriseClient.php index b1f4b68..176a5fb 100644 --- a/src/Davispeixoto/ForceDotComToolkitForPhp/SforceEnterpriseClient.php +++ b/src/Davispeixoto/ForceDotComToolkitForPhp/SforceEnterpriseClient.php @@ -166,5 +166,3 @@ public function merge($mergeRequest, $type) return parent::_merge($arg); } } - -?> diff --git a/src/Davispeixoto/ForceDotComToolkitForPhp/SforceMetadataClient.php b/src/Davispeixoto/ForceDotComToolkitForPhp/SforceMetadataClient.php index ae3c1c5..cf0b388 100644 --- a/src/Davispeixoto/ForceDotComToolkitForPhp/SforceMetadataClient.php +++ b/src/Davispeixoto/ForceDotComToolkitForPhp/SforceMetadataClient.php @@ -43,7 +43,7 @@ public function __construct($wsdl, $loginResult, $sforceConn) { $soapClientArray = null; - $phpversion = substr(phpversion(), 0, strpos(phpversion(), '-')); + $phpversion = substr(PHP_VERSION, 0, strpos(PHP_VERSION, '-')); if ($phpversion > '5.1.2') { $soapClientArray = array( 'user_agent' => 'salesforce-toolkit-php/' . $this->version, @@ -185,5 +185,3 @@ public function getLastResponseHeaders() return $this->sforce->__getLastResponseHeaders(); } } - -?> diff --git a/src/Davispeixoto/ForceDotComToolkitForPhp/SforcePartnerClient.php b/src/Davispeixoto/ForceDotComToolkitForPhp/SforcePartnerClient.php index 0ea7d2c..8043c07 100644 --- a/src/Davispeixoto/ForceDotComToolkitForPhp/SforcePartnerClient.php +++ b/src/Davispeixoto/ForceDotComToolkitForPhp/SforcePartnerClient.php @@ -36,7 +36,7 @@ class SforcePartnerClient extends SforceBaseClient { const PARTNER_NAMESPACE = 'urn:partner.soap.sforce.com'; - function SforcePartnerClient() + public function __construct() { $this->namespace = self::PARTNER_NAMESPACE; }