Completed
Push — master ( 28e149...cc2c18 )
by Davis
03:19
created
src/Davispeixoto/ForceDotComToolkitForPhp/QueryOptions.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php namespace Davispeixoto\ForceDotComToolkitForPhp;
2 2
 
3
-    /*
3
+	/*
4 4
      * Copyright (c) 2007, salesforce.com, inc.
5 5
      * All rights reserved.
6 6
      *
@@ -33,18 +33,18 @@  discard block
 block discarded – undo
33 33
  */
34 34
 class QueryOptions
35 35
 {
36
-    // int - Batch size for the number of records returned in a query or queryMore call. The default is 500; the minimum is 200, and the maximum is 2,000.
37
-    public $batchSize;
36
+	// int - Batch size for the number of records returned in a query or queryMore call. The default is 500; the minimum is 200, and the maximum is 2,000.
37
+	public $batchSize;
38 38
 
39
-    /**
40
-     * Constructor
41
-     *
42
-     * @param int $limit Batch size
43
-     */
44
-    public function __construct($limit)
45
-    {
46
-        $this->batchSize = $limit;
47
-    }
39
+	/**
40
+	 * Constructor
41
+	 *
42
+	 * @param int $limit Batch size
43
+	 */
44
+	public function __construct($limit)
45
+	{
46
+		$this->batchSize = $limit;
47
+	}
48 48
 }
49 49
 
50 50
 ?>
Please login to merge, or discard this patch.
src/Davispeixoto/ForceDotComToolkitForPhp/LoginScopeHeader.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php namespace Davispeixoto\ForceDotComToolkitForPhp;
2 2
 
3
-    /*
3
+	/*
4 4
      * Copyright (c) 2007, salesforce.com, inc.
5 5
      * All rights reserved.
6 6
      *
@@ -33,15 +33,15 @@  discard block
 block discarded – undo
33 33
  */
34 34
 class LoginScopeHeader
35 35
 {
36
-    // boolean that Indicates whether to update the list of most recently used items (True) or not (False).
37
-    public $organizationId;
38
-    public $portalId;
36
+	// boolean that Indicates whether to update the list of most recently used items (True) or not (False).
37
+	public $organizationId;
38
+	public $portalId;
39 39
 
40
-    public function __construct($orgId = null, $portalId = null)
41
-    {
42
-        $this->organizationId = $orgId;
43
-        $this->portalId = $portalId;
44
-    }
40
+	public function __construct($orgId = null, $portalId = null)
41
+	{
42
+		$this->organizationId = $orgId;
43
+		$this->portalId = $portalId;
44
+	}
45 45
 }
46 46
 
47 47
 ?>
Please login to merge, or discard this patch.
src/Davispeixoto/ForceDotComToolkitForPhp/CallOptions.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -28,14 +28,14 @@
 block discarded – undo
28 28
 
29 29
 class CallOptions
30 30
 {
31
-    public $client;
32
-    public $defaultNamespace;
31
+	public $client;
32
+	public $defaultNamespace;
33 33
 
34
-    public function __construct($client, $defaultNamespace = null)
35
-    {
36
-        $this->client = $client;
37
-        $this->defaultNamespace = $defaultNamespace;
38
-    }
34
+	public function __construct($client, $defaultNamespace = null)
35
+	{
36
+		$this->client = $client;
37
+		$this->defaultNamespace = $defaultNamespace;
38
+	}
39 39
 }
40 40
 
41 41
 ?>
Please login to merge, or discard this patch.
src/Davispeixoto/ForceDotComToolkitForPhp/AssignmentRuleHeader.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php namespace Davispeixoto\ForceDotComToolkitForPhp;
2 2
 
3
-    /*
3
+	/*
4 4
      * Copyright (c) 2007, salesforce.com, inc.
5 5
      * All rights reserved.
6 6
      *
@@ -34,27 +34,27 @@  discard block
 block discarded – undo
34 34
  */
35 35
 class AssignmentRuleHeader
36 36
 {
37
-    // int
38
-    public $assignmentRuleId;
39
-    // boolean
40
-    public $useDefaultRuleFlag;
37
+	// int
38
+	public $assignmentRuleId;
39
+	// boolean
40
+	public $useDefaultRuleFlag;
41 41
 
42
-    /**
43
-     * Constructor.  Only one param can be set.
44
-     *
45
-     * @param int $id AssignmentRuleId
46
-     * @param boolean $flag UseDefaultRule flag
47
-     */
48
-    public function __construct($id = null, $flag = null)
49
-    {
50
-        if ($id != null) {
51
-            $this->assignmentRuleId = $id;
52
-        }
42
+	/**
43
+	 * Constructor.  Only one param can be set.
44
+	 *
45
+	 * @param int $id AssignmentRuleId
46
+	 * @param boolean $flag UseDefaultRule flag
47
+	 */
48
+	public function __construct($id = null, $flag = null)
49
+	{
50
+		if ($id != null) {
51
+			$this->assignmentRuleId = $id;
52
+		}
53 53
 
54
-        if ($flag != null) {
55
-            $this->useDefaultRuleFlag = $flag;
56
-        }
57
-    }
54
+		if ($flag != null) {
55
+			$this->useDefaultRuleFlag = $flag;
56
+		}
57
+	}
58 58
 }
59 59
 
60 60
 ?>
Please login to merge, or discard this patch.
src/Davispeixoto/ForceDotComToolkitForPhp/ProcessRequest.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@
 block discarded – undo
28 28
 
29 29
 abstract class ProcessRequest
30 30
 {
31
-    public $comments;
32
-    public $nextApproverIds;
31
+	public $comments;
32
+	public $nextApproverIds;
33 33
 }
34 34
 
35 35
 ?>
Please login to merge, or discard this patch.
src/Davispeixoto/ForceDotComToolkitForPhp/PackageVersion.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php namespace Davispeixoto\ForceDotComToolkitForPhp;
2 2
 
3
-    /*
3
+	/*
4 4
      * Copyright (c) 2007, salesforce.com, inc.
5 5
      * All rights reserved.
6 6
      *
@@ -32,24 +32,24 @@  discard block
 block discarded – undo
32 32
  */
33 33
 class PackageVersion
34 34
 {
35
-    public $majorNumber;
36
-    public $minorNumber;
37
-    public $namespace;
35
+	public $majorNumber;
36
+	public $minorNumber;
37
+	public $namespace;
38 38
 
39
-    /**
40
-     * Class constructor.
41
-     *
42
-     * @param int $majorNumber
43
-     * @param int $minorNumber
44
-     * @param string $namespace
45
-     * @return void
46
-     */
47
-    public function __construct($majorNumber, $minorNumber, $namespace)
48
-    {
49
-        $this->majorNumber = $majorNumber;
50
-        $this->minorNumber = $minorNumber;
51
-        $this->namespace = $namespace;
52
-    }
39
+	/**
40
+	 * Class constructor.
41
+	 *
42
+	 * @param int $majorNumber
43
+	 * @param int $minorNumber
44
+	 * @param string $namespace
45
+	 * @return void
46
+	 */
47
+	public function __construct($majorNumber, $minorNumber, $namespace)
48
+	{
49
+		$this->majorNumber = $majorNumber;
50
+		$this->minorNumber = $minorNumber;
51
+		$this->namespace = $namespace;
52
+	}
53 53
 }
54 54
 
55 55
 ?>
Please login to merge, or discard this patch.
src/Davispeixoto/ForceDotComToolkitForPhp/SforceSoapClient.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php namespace Davispeixoto\ForceDotComToolkitForPhp;
2 2
 
3
-    /*
3
+	/*
4 4
      * Copyright (c) 2007, salesforce.com, inc.
5 5
      * All rights reserved.
6 6
      *
@@ -26,40 +26,40 @@  discard block
 block discarded – undo
26 26
      * POSSIBILITY OF SUCH DAMAGE.
27 27
      */
28 28
 
29
-    /**
30
-     * SforceSoapClient class.
31
-     *
32
-     * @package SalesforceSoapClient
33
-     */
29
+	/**
30
+	 * SforceSoapClient class.
31
+	 *
32
+	 * @package SalesforceSoapClient
33
+	 */
34 34
 // When parsing partner WSDL, when PHP SOAP sees NewValue and OldValue, since
35 35
 // the element has a xsi:type attribute with value 'string', it drops the
36 36
 // string content into the parsed output and loses the tag name. Removing the
37 37
 // xsi:type forces PHP SOAP to just leave the tags intact
38 38
 class SforceSoapClient extends \SoapClient
39 39
 {
40
-    public function __doRequest($request, $location, $action, $version, $one_way = 0)
41
-    {
42
-        $response = parent::__doRequest($request, $location, $action, $version, $one_way);
40
+	public function __doRequest($request, $location, $action, $version, $one_way = 0)
41
+	{
42
+		$response = parent::__doRequest($request, $location, $action, $version, $one_way);
43 43
 
44
-        if (strpos($response, '<sf:OldValue') === false && strpos($response, '<sf:NewValue') === false) {
45
-            return $response;
46
-        }
44
+		if (strpos($response, '<sf:OldValue') === false && strpos($response, '<sf:NewValue') === false) {
45
+			return $response;
46
+		}
47 47
 
48
-        $dom = new \DOMDocument();
49
-        $dom->loadXML($response);
48
+		$dom = new \DOMDocument();
49
+		$dom->loadXML($response);
50 50
 
51
-        $nodeList = $dom->getElementsByTagName('NewValue');
52
-        foreach ($nodeList as $key => $node) {
53
-            $node->removeAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'type');
54
-        }
51
+		$nodeList = $dom->getElementsByTagName('NewValue');
52
+		foreach ($nodeList as $key => $node) {
53
+			$node->removeAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'type');
54
+		}
55 55
 
56
-        $nodeList = $dom->getElementsByTagName('OldValue');
57
-        foreach ($nodeList as $key => $node) {
58
-            $node->removeAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'type');
59
-        }
56
+		$nodeList = $dom->getElementsByTagName('OldValue');
57
+		foreach ($nodeList as $key => $node) {
58
+			$node->removeAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'type');
59
+		}
60 60
 
61
-        return $dom->saveXML();
62
-    }
61
+		return $dom->saveXML();
62
+	}
63 63
 }
64 64
 
65 65
 ?>
Please login to merge, or discard this patch.
src/Davispeixoto/ForceDotComToolkitForPhp/MassEmailMessage.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -27,20 +27,20 @@
 block discarded – undo
27 27
  */
28 28
 class MassEmailMessage extends Email
29 29
 {
30
-    public function setTemplateId($templateId)
31
-    {
32
-        $this->templateId = $templateId;
33
-    }
30
+	public function setTemplateId($templateId)
31
+	{
32
+		$this->templateId = $templateId;
33
+	}
34 34
 
35
-    public function setWhatIds($array)
36
-    {
37
-        $this->whatIds = $array;
38
-    }
35
+	public function setWhatIds($array)
36
+	{
37
+		$this->whatIds = $array;
38
+	}
39 39
 
40
-    public function setTargetObjectIds($array)
41
-    {
42
-        $this->targetObjectIds = $array;
43
-    }
40
+	public function setTargetObjectIds($array)
41
+	{
42
+		$this->targetObjectIds = $array;
43
+	}
44 44
 }
45 45
 
46 46
 ?>
Please login to merge, or discard this patch.
src/Davispeixoto/ForceDotComToolkitForPhp/SforceMetadataClient.php 2 patches
Indentation   +152 added lines, -152 removed lines patch added patch discarded remove patch
@@ -32,156 +32,156 @@
 block discarded – undo
32 32
 
33 33
 class SforceMetadataClient
34 34
 {
35
-    public $sforce;
36
-    protected $sessionId;
37
-    protected $location;
38
-    protected $version = '27.0';
39
-
40
-    protected $namespace = 'http://soap.sforce.com/2006/04/metadata';
41
-
42
-    public function __construct($wsdl, $loginResult, $sforceConn)
43
-    {
44
-        $soapClientArray = null;
45
-
46
-        $phpversion = substr(PHP_VERSION, 0, strpos(PHP_VERSION, '-'));
47
-        if ($phpversion > '5.1.2') {
48
-            $soapClientArray = array(
49
-                'user_agent' => 'salesforce-toolkit-php/' . $this->version,
50
-                'encoding' => 'utf-8',
51
-                'trace' => 1,
52
-                'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP,
53
-                'sessionId' => $loginResult->sessionId
54
-            );
55
-        } else {
56
-            $soapClientArray = array(
57
-                'user_agent' => 'salesforce-toolkit-php/' . $this->version,
58
-                'encoding' => 'utf-8',
59
-                'trace' => 1,
60
-                'sessionId' => $loginResult->sessionId
61
-            );
62
-        }
63
-
64
-        $this->sforce = new SoapClient($wsdl, $soapClientArray);
65
-
66
-        $sessionVar = array(
67
-            'sessionId' => new SoapVar($loginResult->sessionId, XSD_STRING)
68
-        );
69
-
70
-        $headerBody = new SoapVar($sessionVar, SOAP_ENC_OBJECT);
71
-
72
-        $session_header = new SoapHeader($this->namespace, 'SessionHeader', $headerBody, false);
73
-
74
-        $header_array = array(
75
-            $session_header
76
-        );
77
-
78
-        $this->sforce->__setSoapHeaders($header_array);
79
-        $this->sforce->__setLocation($loginResult->metadataServerUrl);
80
-
81
-        return $this->sforce;
82
-    }
83
-
84
-    /**
85
-     * Specifies the session ID returned from the login server after a successful
86
-     * login.
87
-     */
88
-    protected function _setLoginHeader($loginResult)
89
-    {
90
-        $this->sessionId = $loginResult->sessionId;
91
-        $this->setSessionHeader($this->sessionId);
92
-        $serverURL = $loginResult->serverUrl;
93
-        $this->setEndPoint($serverURL);
94
-    }
95
-
96
-    /**
97
-     * Set the endpoint.
98
-     *
99
-     * @param string $location Location
100
-     */
101
-    public function setEndpoint($location)
102
-    {
103
-        $this->location = $location;
104
-        $this->sforce->__setLocation($location);
105
-    }
106
-
107
-    /**
108
-     * Set the Session ID
109
-     *
110
-     * @param string $sessionId Session ID
111
-     */
112
-    public function setSessionHeader($sessionId)
113
-    {
114
-        $this->sforce->__setSoapHeaders(null);
115
-        $session_header = new SoapHeader($this->namespace, 'SessionHeader', array(
116
-            'sessionId' => $sessionId
117
-        ));
118
-        $this->sessionId = $sessionId;
119
-        $header_array = array(
120
-            $session_header
121
-        );
122
-        $this->_setClientId($header_array);
123
-        $this->sforce->__setSoapHeaders($header_array);
124
-    }
125
-
126
-    private function getObjtype($obj)
127
-    {
128
-        $classArray = explode('\\', get_class($obj));
129
-        $objtype = array_pop($classArray);
130
-        if (strpos($objtype, 'Sforce', 0) === 0) {
131
-            $objtype = substr($objtype, 6);
132
-        }
133
-
134
-        return $objtype;
135
-    }
136
-
137
-    public function create($obj)
138
-    {
139
-        $encodedObj = new stdClass();
140
-        $encodedObj->metadata = new SoapVar($obj, SOAP_ENC_OBJECT, $this->getObjtype($obj), $this->namespace);
141
-
142
-        return $this->sforce->create($encodedObj);
143
-    }
144
-
145
-    public function update($obj)
146
-    {
147
-        $encodedObj = new stdClass();
148
-        $encodedObj->UpdateMetadata = $obj;
149
-        $encodedObj->UpdateMetadata->metadata = new SoapVar($obj->metadata, SOAP_ENC_OBJECT,
150
-            $this->getObjtype($obj->metadata), $this->namespace);
151
-
152
-        return $this->sforce->update($encodedObj);
153
-    }
154
-
155
-    public function delete($obj)
156
-    {
157
-        $encodedObj = new stdClass();
158
-        $encodedObj->metadata = new SoapVar($obj, SOAP_ENC_OBJECT, $this->getObjtype($obj), $this->namespace);
159
-
160
-        return $this->sforce->delete($encodedObj);
161
-    }
162
-
163
-    public function checkStatus($ids)
164
-    {
165
-        return $this->sforce->checkStatus($ids);
166
-    }
167
-
168
-    public function getLastRequest()
169
-    {
170
-        return $this->sforce->__getLastRequest();
171
-    }
172
-
173
-    public function getLastRequestHeaders()
174
-    {
175
-        return $this->sforce->__getLastRequestHeaders();
176
-    }
177
-
178
-    public function getLastResponse()
179
-    {
180
-        return $this->sforce->__getLastResponse();
181
-    }
182
-
183
-    public function getLastResponseHeaders()
184
-    {
185
-        return $this->sforce->__getLastResponseHeaders();
186
-    }
35
+	public $sforce;
36
+	protected $sessionId;
37
+	protected $location;
38
+	protected $version = '27.0';
39
+
40
+	protected $namespace = 'http://soap.sforce.com/2006/04/metadata';
41
+
42
+	public function __construct($wsdl, $loginResult, $sforceConn)
43
+	{
44
+		$soapClientArray = null;
45
+
46
+		$phpversion = substr(PHP_VERSION, 0, strpos(PHP_VERSION, '-'));
47
+		if ($phpversion > '5.1.2') {
48
+			$soapClientArray = array(
49
+				'user_agent' => 'salesforce-toolkit-php/' . $this->version,
50
+				'encoding' => 'utf-8',
51
+				'trace' => 1,
52
+				'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP,
53
+				'sessionId' => $loginResult->sessionId
54
+			);
55
+		} else {
56
+			$soapClientArray = array(
57
+				'user_agent' => 'salesforce-toolkit-php/' . $this->version,
58
+				'encoding' => 'utf-8',
59
+				'trace' => 1,
60
+				'sessionId' => $loginResult->sessionId
61
+			);
62
+		}
63
+
64
+		$this->sforce = new SoapClient($wsdl, $soapClientArray);
65
+
66
+		$sessionVar = array(
67
+			'sessionId' => new SoapVar($loginResult->sessionId, XSD_STRING)
68
+		);
69
+
70
+		$headerBody = new SoapVar($sessionVar, SOAP_ENC_OBJECT);
71
+
72
+		$session_header = new SoapHeader($this->namespace, 'SessionHeader', $headerBody, false);
73
+
74
+		$header_array = array(
75
+			$session_header
76
+		);
77
+
78
+		$this->sforce->__setSoapHeaders($header_array);
79
+		$this->sforce->__setLocation($loginResult->metadataServerUrl);
80
+
81
+		return $this->sforce;
82
+	}
83
+
84
+	/**
85
+	 * Specifies the session ID returned from the login server after a successful
86
+	 * login.
87
+	 */
88
+	protected function _setLoginHeader($loginResult)
89
+	{
90
+		$this->sessionId = $loginResult->sessionId;
91
+		$this->setSessionHeader($this->sessionId);
92
+		$serverURL = $loginResult->serverUrl;
93
+		$this->setEndPoint($serverURL);
94
+	}
95
+
96
+	/**
97
+	 * Set the endpoint.
98
+	 *
99
+	 * @param string $location Location
100
+	 */
101
+	public function setEndpoint($location)
102
+	{
103
+		$this->location = $location;
104
+		$this->sforce->__setLocation($location);
105
+	}
106
+
107
+	/**
108
+	 * Set the Session ID
109
+	 *
110
+	 * @param string $sessionId Session ID
111
+	 */
112
+	public function setSessionHeader($sessionId)
113
+	{
114
+		$this->sforce->__setSoapHeaders(null);
115
+		$session_header = new SoapHeader($this->namespace, 'SessionHeader', array(
116
+			'sessionId' => $sessionId
117
+		));
118
+		$this->sessionId = $sessionId;
119
+		$header_array = array(
120
+			$session_header
121
+		);
122
+		$this->_setClientId($header_array);
123
+		$this->sforce->__setSoapHeaders($header_array);
124
+	}
125
+
126
+	private function getObjtype($obj)
127
+	{
128
+		$classArray = explode('\\', get_class($obj));
129
+		$objtype = array_pop($classArray);
130
+		if (strpos($objtype, 'Sforce', 0) === 0) {
131
+			$objtype = substr($objtype, 6);
132
+		}
133
+
134
+		return $objtype;
135
+	}
136
+
137
+	public function create($obj)
138
+	{
139
+		$encodedObj = new stdClass();
140
+		$encodedObj->metadata = new SoapVar($obj, SOAP_ENC_OBJECT, $this->getObjtype($obj), $this->namespace);
141
+
142
+		return $this->sforce->create($encodedObj);
143
+	}
144
+
145
+	public function update($obj)
146
+	{
147
+		$encodedObj = new stdClass();
148
+		$encodedObj->UpdateMetadata = $obj;
149
+		$encodedObj->UpdateMetadata->metadata = new SoapVar($obj->metadata, SOAP_ENC_OBJECT,
150
+			$this->getObjtype($obj->metadata), $this->namespace);
151
+
152
+		return $this->sforce->update($encodedObj);
153
+	}
154
+
155
+	public function delete($obj)
156
+	{
157
+		$encodedObj = new stdClass();
158
+		$encodedObj->metadata = new SoapVar($obj, SOAP_ENC_OBJECT, $this->getObjtype($obj), $this->namespace);
159
+
160
+		return $this->sforce->delete($encodedObj);
161
+	}
162
+
163
+	public function checkStatus($ids)
164
+	{
165
+		return $this->sforce->checkStatus($ids);
166
+	}
167
+
168
+	public function getLastRequest()
169
+	{
170
+		return $this->sforce->__getLastRequest();
171
+	}
172
+
173
+	public function getLastRequestHeaders()
174
+	{
175
+		return $this->sforce->__getLastRequestHeaders();
176
+	}
177
+
178
+	public function getLastResponse()
179
+	{
180
+		return $this->sforce->__getLastResponse();
181
+	}
182
+
183
+	public function getLastResponseHeaders()
184
+	{
185
+		return $this->sforce->__getLastResponseHeaders();
186
+	}
187 187
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         $phpversion = substr(PHP_VERSION, 0, strpos(PHP_VERSION, '-'));
47 47
         if ($phpversion > '5.1.2') {
48 48
             $soapClientArray = array(
49
-                'user_agent' => 'salesforce-toolkit-php/' . $this->version,
49
+                'user_agent' => 'salesforce-toolkit-php/'.$this->version,
50 50
                 'encoding' => 'utf-8',
51 51
                 'trace' => 1,
52 52
                 'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP,
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             );
55 55
         } else {
56 56
             $soapClientArray = array(
57
-                'user_agent' => 'salesforce-toolkit-php/' . $this->version,
57
+                'user_agent' => 'salesforce-toolkit-php/'.$this->version,
58 58
                 'encoding' => 'utf-8',
59 59
                 'trace' => 1,
60 60
                 'sessionId' => $loginResult->sessionId
Please login to merge, or discard this patch.