diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..072705c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+.idea/
+vendor/
+composer.lock
diff --git a/VERSION.md b/VERSION.md
new file mode 100644
index 0000000..57a4638
--- /dev/null
+++ b/VERSION.md
@@ -0,0 +1,18 @@
+# Versions
+
+## v0.0.0
+
+### Comments
+
+* Initial pre-release tag for composer so people don't have to track master in their packages.
+* Additionally this allows aliasing in composer.json, allowing people to point at this repository and automatically
+track the main repository again when it releases anything higher than 0.0.0
+
+### Updates
+
+ * Added Quality Assurance Tools to composers require-dev, as well as configuration files for each
+
+### Bug Fixes
+
+ * Merged dkorrel/soap-client bd635e84a62067b0013f89324b797b88de0d6939 to fix update/upsert
+ * Altered this to make it PSR-2 compliant
\ No newline at end of file
diff --git a/composer.json b/composer.json
index 1792380..5e7e20f 100644
--- a/composer.json
+++ b/composer.json
@@ -17,6 +17,11 @@
"psr/log": "*"
},
"require-dev": {
+ "phpunit/phpunit": "^4.5",
+ "squizlabs/php_codesniffer": "^2.2",
+ "phploc/phploc": "^2.0",
+ "phpmd/phpmd": "^2.2",
+ "sebastian/phpcpd": "^2.0",
"doctrine/common": ">=2.3"
},
"suggest": {
@@ -27,5 +32,10 @@
"psr-0": {
"Phpforce\\SoapClient": "src"
}
+ },
+ "autoload-dev": {
+ "psr-0": {
+ "Phpforce\\SoapClient\\Test": "tests"
+ }
}
}
diff --git a/phpcs.xml b/phpcs.xml
new file mode 100644
index 0000000..50c7329
--- /dev/null
+++ b/phpcs.xml
@@ -0,0 +1,10 @@
+
+
+ Used for maintaining standards in phpforce
+
+ ./src
+ ./tests
+
+
+
+
\ No newline at end of file
diff --git a/phpmd.xml b/phpmd.xml
new file mode 100644
index 0000000..56efaf3
--- /dev/null
+++ b/phpmd.xml
@@ -0,0 +1,20 @@
+
+
+
+ Rulesets to check phpforce against
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index ccc64b0..6566535 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -1,6 +1,6 @@
-
+
./tests/
diff --git a/src/Phpforce/SoapClient/BulkSaver.php b/src/Phpforce/SoapClient/BulkSaver.php
index b34a198..e0ec055 100644
--- a/src/Phpforce/SoapClient/BulkSaver.php
+++ b/src/Phpforce/SoapClient/BulkSaver.php
@@ -285,9 +285,10 @@ private function flushUpserts($objectType)
$result = $this->client->upsert(
$this->bulkUpsertMatchFields[$objectType],
$this->bulkUpsertRecords[$objectType],
- $objectType);
+ $objectType
+ );
$this->bulkUpsertRecords[$objectType] = array();
return $result;
}
-}
\ No newline at end of file
+}
diff --git a/src/Phpforce/SoapClient/BulkSaverInterface.php b/src/Phpforce/SoapClient/BulkSaverInterface.php
index 85a08f9..8256c0b 100644
--- a/src/Phpforce/SoapClient/BulkSaverInterface.php
+++ b/src/Phpforce/SoapClient/BulkSaverInterface.php
@@ -2,19 +2,19 @@
namespace Phpforce\SoapClient;
-use Phpforce\SoapClient\Response\SaveResult;
+use Phpforce\SoapClient\Result\SaveResult;
interface BulkSaverInterface
{
/**
* Save a record in bulk
*
- * @param object $record
+ * @param object $object The record data as an object
* @param string $objectType The record type, e.g., Account
* @param string $matchField Optional match field for upserts
* @return BulkSaver
*/
- function save($object, $objectType, $matchField = null);
+ public function save($object, $objectType, $matchField = null);
/**
* Delete a record in bulk
@@ -23,12 +23,12 @@ function save($object, $objectType, $matchField = null);
* property with non-empty value
* @return BulkSaver
*/
- function delete($record);
+ public function delete($record);
/**
* Flush all creates, updates and upserts
*
* @return SaveResult[]
*/
- function flush();
-}
\ No newline at end of file
+ public function flush();
+}
diff --git a/src/Phpforce/SoapClient/Client.php b/src/Phpforce/SoapClient/Client.php
index c9c7276..aab0674 100644
--- a/src/Phpforce/SoapClient/Client.php
+++ b/src/Phpforce/SoapClient/Client.php
@@ -461,7 +461,6 @@ protected function createSoapVars(array $objects, $type)
$soapVars = array();
foreach ($objects as $object) {
-
$sObject = $this->createSObject($object, $type);
$xml = '';
@@ -490,8 +489,7 @@ protected function fixFieldsToNullXml(\SoapVar $object)
{
if (isset($object->enc_value->fieldsToNull)
&& is_array($object->enc_value->fieldsToNull)
- && count($object->enc_value->fieldsToNull) > 0)
- {
+ && count($object->enc_value->fieldsToNull) > 0) {
$xml = '';
foreach ($object->enc_value->fieldsToNull as $fieldToNull) {
$xml .= '' . $fieldToNull . '';
@@ -516,7 +514,6 @@ protected function checkResult(array $results, array $params)
$exceptions = new Exception\SaveException();
for ($i = 0; $i < count($results); $i++) {
-
// If the param was an (s)object, set it’s Id field
if (is_object($params[$i])
&& (!isset($params[$i]->Id) || null === $params[$i]->Id)
@@ -698,4 +695,3 @@ protected function createSObject($object, $objectType)
return $sObject;
}
}
-
diff --git a/src/Phpforce/SoapClient/ClientBuilder.php b/src/Phpforce/SoapClient/ClientBuilder.php
index cd7982f..89acde3 100644
--- a/src/Phpforce/SoapClient/ClientBuilder.php
+++ b/src/Phpforce/SoapClient/ClientBuilder.php
@@ -64,4 +64,3 @@ public function build()
return $client;
}
}
-
diff --git a/src/Phpforce/SoapClient/ClientInterface.php b/src/Phpforce/SoapClient/ClientInterface.php
index ea7d472..fed09b9 100644
--- a/src/Phpforce/SoapClient/ClientInterface.php
+++ b/src/Phpforce/SoapClient/ClientInterface.php
@@ -279,4 +279,3 @@ public function sendEmail(array $emails);
*/
public function setPassword($userId, $password);
}
-
diff --git a/src/Phpforce/SoapClient/Event/FaultEvent.php b/src/Phpforce/SoapClient/Event/FaultEvent.php
index 50f9681..ff783e5 100644
--- a/src/Phpforce/SoapClient/Event/FaultEvent.php
+++ b/src/Phpforce/SoapClient/Event/FaultEvent.php
@@ -34,4 +34,4 @@ public function setRequestEvent(RequestEvent $requestEvent)
{
$this->requestEvent = $requestEvent;
}
-}
\ No newline at end of file
+}
diff --git a/src/Phpforce/SoapClient/Event/RequestEvent.php b/src/Phpforce/SoapClient/Event/RequestEvent.php
index b993087..6ca823e 100644
--- a/src/Phpforce/SoapClient/Event/RequestEvent.php
+++ b/src/Phpforce/SoapClient/Event/RequestEvent.php
@@ -45,4 +45,3 @@ public function setResponse($response)
$this->response = $response;
}
}
-
diff --git a/src/Phpforce/SoapClient/Event/ResponseEvent.php b/src/Phpforce/SoapClient/Event/ResponseEvent.php
index 68e3039..859d682 100644
--- a/src/Phpforce/SoapClient/Event/ResponseEvent.php
+++ b/src/Phpforce/SoapClient/Event/ResponseEvent.php
@@ -29,4 +29,3 @@ public function getResponse()
return $this->response;
}
}
-
diff --git a/src/Phpforce/SoapClient/EventListener/LogTransactionListener.php b/src/Phpforce/SoapClient/EventListener/LogTransactionListener.php
index 7a633b8..0a3592a 100644
--- a/src/Phpforce/SoapClient/EventListener/LogTransactionListener.php
+++ b/src/Phpforce/SoapClient/EventListener/LogTransactionListener.php
@@ -54,4 +54,4 @@ public function getLogging()
{
return $this->logging;
}
-}
\ No newline at end of file
+}
diff --git a/src/Phpforce/SoapClient/Events.php b/src/Phpforce/SoapClient/Events.php
index 6bce079..87026d4 100644
--- a/src/Phpforce/SoapClient/Events.php
+++ b/src/Phpforce/SoapClient/Events.php
@@ -7,4 +7,3 @@ final class Events
const RESPONSE = 'phpforce.soap_client.response';
const FAULT = 'phpforce.soap_client.fault';
}
-
diff --git a/src/Phpforce/SoapClient/Exception/DeleteException.php b/src/Phpforce/SoapClient/Exception/DeleteException.php
index c1840ed..275f7ea 100644
--- a/src/Phpforce/SoapClient/Exception/DeleteException.php
+++ b/src/Phpforce/SoapClient/Exception/DeleteException.php
@@ -26,4 +26,4 @@ public function setErrors($errors)
{
$this->errors = $errors;
}
-}
\ No newline at end of file
+}
diff --git a/src/Phpforce/SoapClient/Exception/SaveException.php b/src/Phpforce/SoapClient/Exception/SaveException.php
index eb4289a..8954b2d 100644
--- a/src/Phpforce/SoapClient/Exception/SaveException.php
+++ b/src/Phpforce/SoapClient/Exception/SaveException.php
@@ -19,8 +19,7 @@ public function add($result)
if (count($errors) > 0) {
return $errors[0]->getMessage();
}
- }, $this->results
- )
+ }, $this->results)
);
}
@@ -33,4 +32,4 @@ public function count()
{
return count($this->results);
}
-}
\ No newline at end of file
+}
diff --git a/src/Phpforce/SoapClient/Plugin/LogPlugin.php b/src/Phpforce/SoapClient/Plugin/LogPlugin.php
index 54af354..85d7bd7 100644
--- a/src/Phpforce/SoapClient/Plugin/LogPlugin.php
+++ b/src/Phpforce/SoapClient/Plugin/LogPlugin.php
@@ -61,4 +61,4 @@ public static function getSubscribedEvents()
'phpforce.soap_client.fault' => 'onClientFault'
);
}
-}
\ No newline at end of file
+}
diff --git a/src/Phpforce/SoapClient/Request/BaseEmail.php b/src/Phpforce/SoapClient/Request/BaseEmail.php
index 1c29061..3680a62 100644
--- a/src/Phpforce/SoapClient/Request/BaseEmail.php
+++ b/src/Phpforce/SoapClient/Request/BaseEmail.php
@@ -5,4 +5,4 @@
class BaseEmail
{
public $subject;
-}
\ No newline at end of file
+}
diff --git a/src/Phpforce/SoapClient/Request/EmailFileAttachment.php b/src/Phpforce/SoapClient/Request/EmailFileAttachment.php
index 2fc03b6..18dd61d 100644
--- a/src/Phpforce/SoapClient/Request/EmailFileAttachment.php
+++ b/src/Phpforce/SoapClient/Request/EmailFileAttachment.php
@@ -8,4 +8,4 @@ class EmailFileAttachment
public $contentType;
public $fileName;
public $inline;
-}
\ No newline at end of file
+}
diff --git a/src/Phpforce/SoapClient/Request/LeadConvert.php b/src/Phpforce/SoapClient/Request/LeadConvert.php
index 04f7441..d46a535 100644
--- a/src/Phpforce/SoapClient/Request/LeadConvert.php
+++ b/src/Phpforce/SoapClient/Request/LeadConvert.php
@@ -12,4 +12,4 @@ class LeadConvert
public $overwriteLeadSource = false;
public $ownerId;
public $sendNotificationEmail = false;
-}
\ No newline at end of file
+}
diff --git a/src/Phpforce/SoapClient/Request/MergeRequest.php b/src/Phpforce/SoapClient/Request/MergeRequest.php
index 8764b84..5ce30c1 100644
--- a/src/Phpforce/SoapClient/Request/MergeRequest.php
+++ b/src/Phpforce/SoapClient/Request/MergeRequest.php
@@ -6,4 +6,4 @@ class MergeRequest
{
public $masterRecord;
public $recordToMergeIds = array();
-}
\ No newline at end of file
+}
diff --git a/src/Phpforce/SoapClient/Request/SingleEmailMessage.php b/src/Phpforce/SoapClient/Request/SingleEmailMessage.php
index 5e615df..b0c3da0 100644
--- a/src/Phpforce/SoapClient/Request/SingleEmailMessage.php
+++ b/src/Phpforce/SoapClient/Request/SingleEmailMessage.php
@@ -13,4 +13,4 @@ class SingleEmailMessage extends BaseEmail
public $toAddresses;
public $whatId;
public $orgWideEmailAddressId;
-}
\ No newline at end of file
+}
diff --git a/src/Phpforce/SoapClient/Result/ChildRelationship.php b/src/Phpforce/SoapClient/Result/ChildRelationship.php
index 2147cc4..29c6f01 100644
--- a/src/Phpforce/SoapClient/Result/ChildRelationship.php
+++ b/src/Phpforce/SoapClient/Result/ChildRelationship.php
@@ -34,4 +34,4 @@ public function getRelationshipName()
{
return $this->relationshipName;
}
-}
\ No newline at end of file
+}
diff --git a/src/Phpforce/SoapClient/Result/DeleteResult.php b/src/Phpforce/SoapClient/Result/DeleteResult.php
index ed3187c..2cc0d46 100644
--- a/src/Phpforce/SoapClient/Result/DeleteResult.php
+++ b/src/Phpforce/SoapClient/Result/DeleteResult.php
@@ -3,4 +3,4 @@
class DeleteResult extends SaveResult
{
-}
\ No newline at end of file
+}
diff --git a/src/Phpforce/SoapClient/Result/DeletedRecord.php b/src/Phpforce/SoapClient/Result/DeletedRecord.php
index 2b60a1a..10407c1 100644
--- a/src/Phpforce/SoapClient/Result/DeletedRecord.php
+++ b/src/Phpforce/SoapClient/Result/DeletedRecord.php
@@ -36,4 +36,4 @@ public function getId()
{
return $this->id;
}
-}
\ No newline at end of file
+}
diff --git a/src/Phpforce/SoapClient/Result/DescribeGlobalResult.php b/src/Phpforce/SoapClient/Result/DescribeGlobalResult.php
index bf67fbd..07b643e 100644
--- a/src/Phpforce/SoapClient/Result/DescribeGlobalResult.php
+++ b/src/Phpforce/SoapClient/Result/DescribeGlobalResult.php
@@ -8,4 +8,4 @@ class DescribeGlobalResult
public $maxBatchSize;
/** @var DescribeGlobalSObjectResult[] */
public $sobjects = array();
-}
\ No newline at end of file
+}
diff --git a/src/Phpforce/SoapClient/Result/DescribeGlobalSObjectResult.php b/src/Phpforce/SoapClient/Result/DescribeGlobalSObjectResult.php
index 4ebf3d8..72e7353 100644
--- a/src/Phpforce/SoapClient/Result/DescribeGlobalSObjectResult.php
+++ b/src/Phpforce/SoapClient/Result/DescribeGlobalSObjectResult.php
@@ -24,4 +24,4 @@ class DescribeGlobalSObjectResult
public $triggerable;
public $undeletable;
public $updateable;
-}
\ No newline at end of file
+}
diff --git a/src/Phpforce/SoapClient/Result/DescribeSObjectResult.php b/src/Phpforce/SoapClient/Result/DescribeSObjectResult.php
index cc030df..c5abbdb 100644
--- a/src/Phpforce/SoapClient/Result/DescribeSObjectResult.php
+++ b/src/Phpforce/SoapClient/Result/DescribeSObjectResult.php
@@ -263,4 +263,4 @@ public function getRelationshipField($name)
return $name === $field->getName();
})->first();
}
-}
\ No newline at end of file
+}
diff --git a/src/Phpforce/SoapClient/Result/DescribeSObjectResult/Field.php b/src/Phpforce/SoapClient/Result/DescribeSObjectResult/Field.php
index a27ba49..a022049 100644
--- a/src/Phpforce/SoapClient/Result/DescribeSObjectResult/Field.php
+++ b/src/Phpforce/SoapClient/Result/DescribeSObjectResult/Field.php
@@ -238,4 +238,4 @@ public function references($object)
return false;
}
-}
\ No newline at end of file
+}
diff --git a/src/Phpforce/SoapClient/Result/DescribeTabSetResult.php b/src/Phpforce/SoapClient/Result/DescribeTabSetResult.php
deleted file mode 100644
index 421a80f..0000000
--- a/src/Phpforce/SoapClient/Result/DescribeTabSetResult.php
+++ /dev/null
@@ -1,18 +0,0 @@
-"
- */
-class DescribeTabsResult
-{
- //put your code here
-}
-
-?>
diff --git a/src/Phpforce/SoapClient/Result/EmptyRecycleBinResult.php b/src/Phpforce/SoapClient/Result/EmptyRecycleBinResult.php
index b276dab..4ef40ee 100644
--- a/src/Phpforce/SoapClient/Result/EmptyRecycleBinResult.php
+++ b/src/Phpforce/SoapClient/Result/EmptyRecycleBinResult.php
@@ -5,4 +5,4 @@
class EmptyRecycleBinResult extends SaveResult
{
-}
\ No newline at end of file
+}
diff --git a/src/Phpforce/SoapClient/Result/Error.php b/src/Phpforce/SoapClient/Result/Error.php
index 32296d9..5fd067d 100644
--- a/src/Phpforce/SoapClient/Result/Error.php
+++ b/src/Phpforce/SoapClient/Result/Error.php
@@ -34,4 +34,4 @@ public function getStatusCode()
{
return $this->statusCode;
}
-}
\ No newline at end of file
+}
diff --git a/src/Phpforce/SoapClient/Result/GetDeletedResult.php b/src/Phpforce/SoapClient/Result/GetDeletedResult.php
index 1911d35..3808493 100644
--- a/src/Phpforce/SoapClient/Result/GetDeletedResult.php
+++ b/src/Phpforce/SoapClient/Result/GetDeletedResult.php
@@ -33,4 +33,4 @@ public function getDeletedRecords()
{
return $this->deletedRecords;
}
-}
\ No newline at end of file
+}
diff --git a/src/Phpforce/SoapClient/Result/GetServerTimestampResult.php b/src/Phpforce/SoapClient/Result/GetServerTimestampResult.php
index 1120a09..2315382 100644
--- a/src/Phpforce/SoapClient/Result/GetServerTimestampResult.php
+++ b/src/Phpforce/SoapClient/Result/GetServerTimestampResult.php
@@ -13,4 +13,4 @@ public function getTimestamp()
{
return $this->timestamp;
}
-}
\ No newline at end of file
+}
diff --git a/src/Phpforce/SoapClient/Result/GetUpdatedResult.php b/src/Phpforce/SoapClient/Result/GetUpdatedResult.php
index ad3991f..fc910a7 100644
--- a/src/Phpforce/SoapClient/Result/GetUpdatedResult.php
+++ b/src/Phpforce/SoapClient/Result/GetUpdatedResult.php
@@ -23,4 +23,4 @@ public function getLatestDateCovered()
{
return $this->latestDateCovered;
}
-}
\ No newline at end of file
+}
diff --git a/src/Phpforce/SoapClient/Result/GetUserInfoResult.php b/src/Phpforce/SoapClient/Result/GetUserInfoResult.php
index c29bec4..91c5025 100644
--- a/src/Phpforce/SoapClient/Result/GetUserInfoResult.php
+++ b/src/Phpforce/SoapClient/Result/GetUserInfoResult.php
@@ -226,4 +226,4 @@ public function getOrgDefaultCurrencyIsoCode()
{
return $this->orgDefaultCurrencyIsoCode;
}
-}
\ No newline at end of file
+}
diff --git a/src/Phpforce/SoapClient/Result/LeadConvertResult.php b/src/Phpforce/SoapClient/Result/LeadConvertResult.php
index 1cdb310..2fcb507 100644
--- a/src/Phpforce/SoapClient/Result/LeadConvertResult.php
+++ b/src/Phpforce/SoapClient/Result/LeadConvertResult.php
@@ -11,4 +11,3 @@ class LeadConvertResult
public $success;
public $errors;
}
-
diff --git a/src/Phpforce/SoapClient/Result/MergeResult.php b/src/Phpforce/SoapClient/Result/MergeResult.php
index 5dc8612..00dd409 100644
--- a/src/Phpforce/SoapClient/Result/MergeResult.php
+++ b/src/Phpforce/SoapClient/Result/MergeResult.php
@@ -57,5 +57,3 @@ public function getMergedRecordIds()
return $this->mergedRecordIds;
}
}
-
-
diff --git a/src/Phpforce/SoapClient/Result/ProcessResult.php b/src/Phpforce/SoapClient/Result/ProcessResult.php
index 728cb32..419d169 100644
--- a/src/Phpforce/SoapClient/Result/ProcessResult.php
+++ b/src/Phpforce/SoapClient/Result/ProcessResult.php
@@ -8,4 +8,4 @@
*/
class ProcessResult
{
-}
\ No newline at end of file
+}
diff --git a/src/Phpforce/SoapClient/Result/QueryResult.php b/src/Phpforce/SoapClient/Result/QueryResult.php
index 2f441e6..1b7a667 100644
--- a/src/Phpforce/SoapClient/Result/QueryResult.php
+++ b/src/Phpforce/SoapClient/Result/QueryResult.php
@@ -50,4 +50,4 @@ public function getRecord($index)
return $this->records[$index];
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Phpforce/SoapClient/Result/RecordIterator.php b/src/Phpforce/SoapClient/Result/RecordIterator.php
index 9423a9c..0d15dec 100644
--- a/src/Phpforce/SoapClient/Result/RecordIterator.php
+++ b/src/Phpforce/SoapClient/Result/RecordIterator.php
@@ -224,4 +224,4 @@ public function getQueryResult()
{
return $this->queryResult;
}
-}
\ No newline at end of file
+}
diff --git a/src/Phpforce/SoapClient/Result/SaveResult.php b/src/Phpforce/SoapClient/Result/SaveResult.php
index 93224a3..0d25673 100644
--- a/src/Phpforce/SoapClient/Result/SaveResult.php
+++ b/src/Phpforce/SoapClient/Result/SaveResult.php
@@ -75,4 +75,4 @@ public function setParam($param)
{
$this->param = $param;
}
-}
\ No newline at end of file
+}
diff --git a/src/Phpforce/SoapClient/Result/SearchResult.php b/src/Phpforce/SoapClient/Result/SearchResult.php
index 5f77b7d..c9056db 100644
--- a/src/Phpforce/SoapClient/Result/SearchResult.php
+++ b/src/Phpforce/SoapClient/Result/SearchResult.php
@@ -5,4 +5,4 @@
class SearchResult
{
public $searchRecords = array();
-}
\ No newline at end of file
+}
diff --git a/src/Phpforce/SoapClient/Result/SendEmailError.php b/src/Phpforce/SoapClient/Result/SendEmailError.php
index a4bd694..af3124a 100644
--- a/src/Phpforce/SoapClient/Result/SendEmailError.php
+++ b/src/Phpforce/SoapClient/Result/SendEmailError.php
@@ -10,4 +10,4 @@ public function getTargetObjectId()
{
return $this->targetObjectId;
}
-}
\ No newline at end of file
+}
diff --git a/src/Phpforce/SoapClient/Result/SendEmailResult.php b/src/Phpforce/SoapClient/Result/SendEmailResult.php
index b6390ec..cfc4575 100644
--- a/src/Phpforce/SoapClient/Result/SendEmailResult.php
+++ b/src/Phpforce/SoapClient/Result/SendEmailResult.php
@@ -5,7 +5,7 @@
/**
* Send email result
*/
-class SendEmailResult
+class SendEmailResult
{
protected $errors;
protected $success;
@@ -30,4 +30,4 @@ public function setParam($param)
{
$this->param = $param;
}
-}
\ No newline at end of file
+}
diff --git a/src/Phpforce/SoapClient/Result/UndeleteResult.php b/src/Phpforce/SoapClient/Result/UndeleteResult.php
index 6745530..30d3c70 100644
--- a/src/Phpforce/SoapClient/Result/UndeleteResult.php
+++ b/src/Phpforce/SoapClient/Result/UndeleteResult.php
@@ -4,4 +4,4 @@
class UndeleteResult extends SaveResult
{
-}
\ No newline at end of file
+}
diff --git a/src/Phpforce/SoapClient/Result/UpsertResult.php b/src/Phpforce/SoapClient/Result/UpsertResult.php
index 34bd359..110a31a 100644
--- a/src/Phpforce/SoapClient/Result/UpsertResult.php
+++ b/src/Phpforce/SoapClient/Result/UpsertResult.php
@@ -18,4 +18,4 @@ public function isCreated()
{
return $this->created;
}
-}
\ No newline at end of file
+}
diff --git a/src/Phpforce/SoapClient/Soap/SoapClient.php b/src/Phpforce/SoapClient/Soap/SoapClient.php
index bd90617..9fb546d 100755
--- a/src/Phpforce/SoapClient/Soap/SoapClient.php
+++ b/src/Phpforce/SoapClient/Soap/SoapClient.php
@@ -23,7 +23,6 @@ class SoapClient extends \SoapClient
public function getSoapTypes()
{
if (null === $this->types) {
-
$soapTypes = $this->__getTypes();
foreach ($soapTypes as $soapType) {
$properties = array();
@@ -65,6 +64,9 @@ public function getSoapElements($complexType)
{
$types = $this->getSoapTypes();
if (isset($types[$complexType])) {
+ if (isset($types['sObject']['Id'])) {
+ $types[$complexType]['Id'] = $types['sObject']['Id'];
+ }
return $types[$complexType];
}
}
@@ -84,4 +86,4 @@ public function getSoapElementType($complexType, $element)
return $elements[$element];
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Phpforce/SoapClient/Soap/SoapClientFactory.php b/src/Phpforce/SoapClient/Soap/SoapClientFactory.php
index 4d3bb55..4a27a46 100644
--- a/src/Phpforce/SoapClient/Soap/SoapClientFactory.php
+++ b/src/Phpforce/SoapClient/Soap/SoapClientFactory.php
@@ -110,4 +110,4 @@ public function setTypeConverters(TypeConverter\TypeConverterCollection $typeCon
return $this;
}
-}
\ No newline at end of file
+}
diff --git a/src/Phpforce/SoapClient/Soap/TypeConverter/DateTimeTypeConverter.php b/src/Phpforce/SoapClient/Soap/TypeConverter/DateTimeTypeConverter.php
index cca52e7..83c1fb4 100644
--- a/src/Phpforce/SoapClient/Soap/TypeConverter/DateTimeTypeConverter.php
+++ b/src/Phpforce/SoapClient/Soap/TypeConverter/DateTimeTypeConverter.php
@@ -48,4 +48,3 @@ public function convertPhpToXml($php)
return sprintf('<%1$s>%2$s%1$s>', $this->getTypeName(), $php->format('Y-m-d\TH:i:sP'));
}
}
-
diff --git a/src/Phpforce/SoapClient/Soap/TypeConverter/DateTypeConverter.php b/src/Phpforce/SoapClient/Soap/TypeConverter/DateTypeConverter.php
index 9e20a8e..0f07d20 100644
--- a/src/Phpforce/SoapClient/Soap/TypeConverter/DateTypeConverter.php
+++ b/src/Phpforce/SoapClient/Soap/TypeConverter/DateTypeConverter.php
@@ -47,4 +47,3 @@ public function convertPhpToXml($php)
return sprintf('<%1$s>%2$s%1$s>', $this->getTypeName(), $php->format('Y-m-d'));
}
}
-
diff --git a/src/Phpforce/SoapClient/Soap/TypeConverter/TypeConverterCollection.php b/src/Phpforce/SoapClient/Soap/TypeConverter/TypeConverterCollection.php
index 161fa9a..8df3d9a 100644
--- a/src/Phpforce/SoapClient/Soap/TypeConverter/TypeConverterCollection.php
+++ b/src/Phpforce/SoapClient/Soap/TypeConverter/TypeConverterCollection.php
@@ -43,7 +43,7 @@ public function add(TypeConverterInterface $converter)
}
/**
- * Set (overwrite) a type converter in the collection
+ * Set (overwrite) a type converter in the collection
*
* @param TypeConverterInterface $converter Type converter
*
@@ -60,7 +60,7 @@ public function set(TypeConverterInterface $converter)
/**
* Returns true if the collection contains a type converter for a certain
* namespace and name
- *
+ *
* @param string $namespace Converter namespace
* @param string $name Converter name
*
@@ -77,7 +77,7 @@ public function has($namespace, $name)
/**
* Get this collection as a typemap that can be used in PHP's \SoapClient
- *
+ *
* @return array
*/
public function getTypemap()
@@ -99,4 +99,4 @@ public function getTypemap()
return $typemap;
}
-}
\ No newline at end of file
+}
diff --git a/src/Phpforce/SoapClient/Soap/TypeConverter/TypeConverterInterface.php b/src/Phpforce/SoapClient/Soap/TypeConverter/TypeConverterInterface.php
index edc07ca..57df19d 100644
--- a/src/Phpforce/SoapClient/Soap/TypeConverter/TypeConverterInterface.php
+++ b/src/Phpforce/SoapClient/Soap/TypeConverter/TypeConverterInterface.php
@@ -12,14 +12,14 @@ interface TypeConverterInterface
*
* @return string
*/
- function getTypeNamespace();
+ public function getTypeNamespace();
/**
* Get type name.
*
* @return string
*/
- function getTypeName();
+ public function getTypeName();
/**
* Convert given XML string to PHP type.
@@ -28,7 +28,7 @@ function getTypeName();
*
* @return mixed
*/
- function convertXmlToPhp($xml);
+ public function convertXmlToPhp($xml);
/**
* Convert PHP type to XML string.
@@ -37,5 +37,5 @@ function convertXmlToPhp($xml);
*
* @return string
*/
- function convertPhpToXml($php);
-}
\ No newline at end of file
+ public function convertPhpToXml($php);
+}
diff --git a/tests/Phpforce/SoapClient/Tests/AbstractResultTest.php b/tests/Phpforce/SoapClient/Tests/AbstractResultTest.php
deleted file mode 100644
index e69de29..0000000
diff --git a/tests/Phpforce/SoapClient/Tests/ClientTest.php b/tests/Phpforce/SoapClient/Tests/ClientTest.php
index f369c39..eab8c87 100644
--- a/tests/Phpforce/SoapClient/Tests/ClientTest.php
+++ b/tests/Phpforce/SoapClient/Tests/ClientTest.php
@@ -66,7 +66,8 @@ public function testInvalidQueryThrowsSoapFault()
Select aId, Name from Account LIMIT 1
^
ERROR at Row:1:Column:8
-No such column 'aId' on entity 'Account'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.")));
+No such column 'aId' on entity 'Account'. If you are attempting to use a custom field, be sure to append the '__c'"
+ ." after the custom field name. Please reference your WSDL or the describe call for the appropriate names.")));
$client = $this->getClient($soapClient);
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
deleted file mode 100644
index 05aae3b..0000000
--- a/tests/bootstrap.php
+++ /dev/null
@@ -1,4 +0,0 @@
-add('Phpforce\\SoapClient\\Test', __DIR__);
\ No newline at end of file