@@ -60,6 +60,9 @@ discard block |
||
60 | 60 | protected $localeOptions; |
61 | 61 | protected $packageVersionHeader; |
62 | 62 | |
63 | + /** |
|
64 | + * @param string $wsdl |
|
65 | + */ |
|
63 | 66 | protected function getSoapClient($wsdl, $options) { |
64 | 67 | return new SoapClient($wsdl, $options); |
65 | 68 | } |
@@ -135,6 +138,9 @@ discard block |
||
135 | 138 | return $this->sforce; |
136 | 139 | } |
137 | 140 | |
141 | + /** |
|
142 | + * @param CallOptions $header |
|
143 | + */ |
|
138 | 144 | public function setCallOptions($header) { |
139 | 145 | if ($header != NULL) { |
140 | 146 | $this->callOptions = new SoapHeader($this->namespace, 'CallOptions', array ( |
@@ -216,6 +222,9 @@ discard block |
||
216 | 222 | $this->sforce->__setLocation($location); |
217 | 223 | } |
218 | 224 | |
225 | + /** |
|
226 | + * @param string $call |
|
227 | + */ |
|
219 | 228 | private function setHeaders($call=NULL) { |
220 | 229 | $this->sforce->__setSoapHeaders(NULL); |
221 | 230 | |
@@ -326,6 +335,9 @@ discard block |
||
326 | 335 | $this->sforce->__setSoapHeaders($header_array); |
327 | 336 | } |
328 | 337 | |
338 | + /** |
|
339 | + * @param AssignmentRuleHeader $header |
|
340 | + */ |
|
329 | 341 | public function setAssignmentRuleHeader($header) { |
330 | 342 | if ($header != NULL) { |
331 | 343 | $this->assignmentRuleHeader = new SoapHeader($this->namespace, 'AssignmentRuleHeader', array ( |
@@ -337,6 +349,9 @@ discard block |
||
337 | 349 | } |
338 | 350 | } |
339 | 351 | |
352 | + /** |
|
353 | + * @param EmailHeader $header |
|
354 | + */ |
|
340 | 355 | public function setEmailHeader($header) { |
341 | 356 | if ($header != NULL) { |
342 | 357 | $this->emailHeader = new SoapHeader($this->namespace, 'EmailHeader', array ( |
@@ -349,6 +364,9 @@ discard block |
||
349 | 364 | } |
350 | 365 | } |
351 | 366 | |
367 | + /** |
|
368 | + * @param LoginScopeHeader $header |
|
369 | + */ |
|
352 | 370 | public function setLoginScopeHeader($header) { |
353 | 371 | if ($header != NULL) { |
354 | 372 | $this->loginScopeHeader = new SoapHeader($this->namespace, 'LoginScopeHeader', array ( |
@@ -393,6 +411,9 @@ discard block |
||
393 | 411 | } |
394 | 412 | } |
395 | 413 | |
414 | + /** |
|
415 | + * @param QueryOptions $header |
|
416 | + */ |
|
396 | 417 | public function setQueryOptions($header) { |
397 | 418 | if ($header != NULL) { |
398 | 419 | $this->queryHeader = new SoapHeader($this->namespace, 'QueryOptions', array ( |
@@ -403,6 +424,9 @@ discard block |
||
403 | 424 | } |
404 | 425 | } |
405 | 426 | |
427 | + /** |
|
428 | + * @param AllowFieldTruncationHeader $header |
|
429 | + */ |
|
406 | 430 | public function setAllowFieldTruncationHeader($header) { |
407 | 431 | if ($header != NULL) { |
408 | 432 | $this->allowFieldTruncationHeader = new SoapHeader($this->namespace, 'AllowFieldTruncationHeader', array ( |
@@ -414,6 +438,9 @@ discard block |
||
414 | 438 | } |
415 | 439 | } |
416 | 440 | |
441 | + /** |
|
442 | + * @param LocaleOptions $header |
|
443 | + */ |
|
417 | 444 | public function setLocaleOptions($header) { |
418 | 445 | if ($header != NULL) { |
419 | 446 | $this->localeOptions = new SoapHeader($this->namespace, 'LocaleOptions', |
@@ -427,7 +454,7 @@ discard block |
||
427 | 454 | } |
428 | 455 | |
429 | 456 | /** |
430 | - * @param $header |
|
457 | + * @param PackageVersionHeader $header |
|
431 | 458 | */ |
432 | 459 | public function setPackageVersionHeader($header) { |
433 | 460 | if ($header != NULL) { |
@@ -504,21 +531,33 @@ discard block |
||
504 | 531 | return $this->sforce->merge($arg)->result; |
505 | 532 | } |
506 | 533 | |
534 | + /** |
|
535 | + * @param stdClass $arg |
|
536 | + */ |
|
507 | 537 | protected function _process($arg) { |
508 | 538 | $this->setHeaders(); |
509 | 539 | return $this->sforce->process($arg)->result; |
510 | 540 | } |
511 | 541 | |
542 | + /** |
|
543 | + * @param stdClass $arg |
|
544 | + */ |
|
512 | 545 | protected function _update($arg) { |
513 | 546 | $this->setHeaders("update"); |
514 | 547 | return $this->sforce->update($arg)->result; |
515 | 548 | } |
516 | 549 | |
550 | + /** |
|
551 | + * @param stdClass $arg |
|
552 | + */ |
|
517 | 553 | protected function _upsert($arg) { |
518 | 554 | $this->setHeaders("upsert"); |
519 | 555 | return $this->sforce->upsert($arg)->result; |
520 | 556 | } |
521 | 557 | |
558 | + /** |
|
559 | + * @param SingleEmailMessage[] $request |
|
560 | + */ |
|
522 | 561 | public function sendSingleEmail($request) { |
523 | 562 | if (is_array($request)) { |
524 | 563 | $messages = array(); |
@@ -559,7 +598,7 @@ discard block |
||
559 | 598 | /** |
560 | 599 | * Converts a Lead into an Account, Contact, or (optionally) an Opportunity. |
561 | 600 | * |
562 | - * @param array $leadConverts Array of LeadConvert |
|
601 | + * @param stdClass[] $leadConverts Array of LeadConvert |
|
563 | 602 | * |
564 | 603 | * @return LeadConvertResult |
565 | 604 | */ |
@@ -623,7 +662,7 @@ discard block |
||
623 | 662 | /** |
624 | 663 | * Process Submit Request for Approval |
625 | 664 | * |
626 | - * @param array $processRequestArray |
|
665 | + * @param ProcessSubmitRequest[] $processRequestArray |
|
627 | 666 | * @return ProcessResult |
628 | 667 | */ |
629 | 668 | public function processSubmitRequest($processRequestArray) { |
@@ -643,7 +682,7 @@ discard block |
||
643 | 682 | /** |
644 | 683 | * Process Work Item Request for Approval |
645 | 684 | * |
646 | - * @param array $processRequestArray |
|
685 | + * @param ProcessWorkitemRequest[] $processRequestArray |
|
647 | 686 | * @return ProcessResult |
648 | 687 | */ |
649 | 688 | public function processWorkitemRequest($processRequestArray) { |
@@ -678,6 +717,7 @@ discard block |
||
678 | 717 | * and layout editability affects which fields appear in a layout. |
679 | 718 | * |
680 | 719 | * @param string Type Object Type |
720 | + * @param string $type |
|
681 | 721 | * @return DescribeLayoutResult |
682 | 722 | */ |
683 | 723 | public function describeLayout($type, array $recordTypeIds=null) { |
@@ -707,7 +747,7 @@ discard block |
||
707 | 747 | * An array-based version of describeSObject; describes metadata (field list |
708 | 748 | * and object properties) for the specified object or array of objects. |
709 | 749 | * |
710 | - * @param array $arrayOfTypes Array of object types. |
|
750 | + * @param string[] $arrayOfTypes Array of object types. |
|
711 | 751 | * @return DescribsSObjectResult |
712 | 752 | */ |
713 | 753 | public function describeSObjects($arrayOfTypes) { |
@@ -744,7 +784,7 @@ discard block |
||
744 | 784 | /** |
745 | 785 | * Retrieves available category groups along with their data category structure for objects specified in the request. |
746 | 786 | * |
747 | - * @param DataCategoryGroupSobjectTypePair $pairs |
|
787 | + * @param SoapVar[] $pairs |
|
748 | 788 | * @param bool $topCategoriesOnly Object Type |
749 | 789 | * @return DescribeLayoutResult |
750 | 790 | */ |
@@ -762,8 +802,8 @@ discard block |
||
762 | 802 | * given timespan for the specified object. |
763 | 803 | * |
764 | 804 | * @param string $type Ojbect type |
765 | - * @param date $startDate Start date |
|
766 | - * @param date $endDate End Date |
|
805 | + * @param integer $startDate Start date |
|
806 | + * @param integer $endDate End Date |
|
767 | 807 | * @return GetDeletedResult |
768 | 808 | */ |
769 | 809 | public function getDeleted($type, $startDate, $endDate) { |
@@ -780,8 +820,8 @@ discard block |
||
780 | 820 | * changed) within the given timespan for the specified object. |
781 | 821 | * |
782 | 822 | * @param string $type Ojbect type |
783 | - * @param date $startDate Start date |
|
784 | - * @param date $endDate End Date |
|
823 | + * @param integer $startDate Start date |
|
824 | + * @param integer $endDate End Date |
|
785 | 825 | * @return GetUpdatedResult |
786 | 826 | */ |
787 | 827 | public function getUpdated($type, $startDate, $endDate) { |
@@ -798,7 +838,6 @@ discard block |
||
798 | 838 | * the specified criteria. |
799 | 839 | * |
800 | 840 | * @param String $query Query String |
801 | - * @param QueryOptions $queryOptions Batch size limit. OPTIONAL |
|
802 | 841 | * @return QueryResult |
803 | 842 | */ |
804 | 843 | public function query($query) { |
@@ -815,7 +854,6 @@ discard block |
||
815 | 854 | * Retrieves the next batch of objects from a query. |
816 | 855 | * |
817 | 856 | * @param QueryLocator $queryLocator Represents the server-side cursor that tracks the current processing location in the query result set. |
818 | - * @param QueryOptions $queryOptions Batch size limit. OPTIONAL |
|
819 | 857 | * @return QueryResult |
820 | 858 | */ |
821 | 859 | public function queryMore($queryLocator) { |
@@ -867,7 +905,7 @@ discard block |
||
867 | 905 | * Executes a text search in your organization's data. |
868 | 906 | * |
869 | 907 | * @param string $searchString Search string that specifies the text expression to search for. |
870 | - * @return SearchResult |
|
908 | + * @return SforceSearchResult |
|
871 | 909 | */ |
872 | 910 | public function search($searchString) { |
873 | 911 | $this->setHeaders("search"); |
@@ -1277,6 +1315,10 @@ discard block |
||
1277 | 1315 | /* |
1278 | 1316 | * If the stdClass has a type, we know it is an SObject |
1279 | 1317 | */ |
1318 | + |
|
1319 | + /** |
|
1320 | + * @param stdClass $param |
|
1321 | + */ |
|
1280 | 1322 | function isSObject($param) { |
1281 | 1323 | return isset($param->type); |
1282 | 1324 | } |
@@ -41,9 +41,8 @@ discard block |
||
41 | 41 | } |
42 | 42 | /** |
43 | 43 | * Adds one or more new individual objects to your organization's data. |
44 | - * @param array $sObjects Array of one or more sObjects (up to 200) to create. |
|
45 | - * @param AssignmentRuleHeader $assignment_header is optional. Defaults to NULL |
|
46 | - * @param MruHeader $mru_header is optional. Defaults to NULL |
|
44 | + * @param array $sObjects Array of one or more sObjects (up to 200) to create. |
|
45 | + * @param string $type |
|
47 | 46 | * @return SaveResult |
48 | 47 | */ |
49 | 48 | public function create($sObjects, $type) { |
@@ -72,7 +71,8 @@ discard block |
||
72 | 71 | * Updates one or more new individual objects to your organization's data. |
73 | 72 | * @param array sObjects Array of sObjects |
74 | 73 | * @param AssignmentRuleHeader $assignment_header is optional. Defaults to NULL |
75 | - * @param MruHeader $mru_header is optional. Defaults to NULL |
|
74 | + * @param MruHeader $mru_header is optional. Defaults to NULL |
|
75 | + * @param string $type |
|
76 | 76 | * @return UpdateResult |
77 | 77 | */ |
78 | 78 | public function update($sObjects, $type, $assignment_header = NULL, $mru_header = NULL) { |
@@ -35,6 +35,10 @@ discard block |
||
35 | 35 | public $client; |
36 | 36 | public $defaultNamespace; |
37 | 37 | |
38 | + /** |
|
39 | + * @param string $client |
|
40 | + * @param string $defaultNamespace |
|
41 | + */ |
|
38 | 42 | public function __construct($client, $defaultNamespace=NULL) { |
39 | 43 | $this->client = $client; |
40 | 44 | $this->defaultNamespace = $defaultNamespace; |
@@ -80,6 +84,9 @@ discard block |
||
80 | 84 | // boolean that Indicates whether to update the list of most recently used items (True) or not (False). |
81 | 85 | public $updateMruFlag; |
82 | 86 | |
87 | + /** |
|
88 | + * @param boolean $bool |
|
89 | + */ |
|
83 | 90 | public function __construct($bool) { |
84 | 91 | $this->updateMruFlag = $bool; |
85 | 92 | } |
@@ -143,6 +150,9 @@ discard block |
||
143 | 150 | class AllowFieldTruncationHeader { |
144 | 151 | public $allowFieldTruncation; |
145 | 152 | |
153 | + /** |
|
154 | + * @param boolean $allowFieldTruncation |
|
155 | + */ |
|
146 | 156 | public function __construct($allowFieldTruncation) { |
147 | 157 | $this->allowFieldTruncation = $allowFieldTruncation; |
148 | 158 | } |
@@ -171,7 +181,7 @@ discard block |
||
171 | 181 | /** |
172 | 182 | * Class constructor. |
173 | 183 | * |
174 | - * @param array $packageVersions |
|
184 | + * @param stdClass[] $packageVersions |
|
175 | 185 | * @return void |
176 | 186 | */ |
177 | 187 | public function __construct($packageVersions) { |
@@ -34,6 +34,9 @@ discard block |
||
34 | 34 | |
35 | 35 | protected $namespace = 'http://soap.sforce.com/2006/04/metadata'; |
36 | 36 | |
37 | + /** |
|
38 | + * @param string $wsdl |
|
39 | + */ |
|
37 | 40 | public function __construct($wsdl, $loginResult, $sforceConn) { |
38 | 41 | |
39 | 42 | $soapClientArray = null; |
@@ -117,6 +120,9 @@ discard block |
||
117 | 120 | $this->sforce->__setSoapHeaders($header_array); |
118 | 121 | } |
119 | 122 | |
123 | + /** |
|
124 | + * @return string|null |
|
125 | + */ |
|
120 | 126 | private function getObjtype($obj) { |
121 | 127 | $classArray = explode('\\', get_class($obj)); |
122 | 128 | $objtype = array_pop($classArray); |
@@ -126,6 +132,9 @@ discard block |
||
126 | 132 | return $objtype; |
127 | 133 | } |
128 | 134 | |
135 | + /** |
|
136 | + * @param SforceCustomObject $obj |
|
137 | + */ |
|
129 | 138 | public function create($obj) { |
130 | 139 | $encodedObj = new stdClass(); |
131 | 140 | $encodedObj->metadata = new SoapVar($obj, SOAP_ENC_OBJECT, $this->getObjtype($obj), $this->namespace); |
@@ -141,6 +150,9 @@ discard block |
||
141 | 150 | return $this->sforce->update($encodedObj); |
142 | 151 | } |
143 | 152 | |
153 | + /** |
|
154 | + * @param SforceCustomObject $obj |
|
155 | + */ |
|
144 | 156 | public function delete($obj) { |
145 | 157 | $encodedObj = new stdClass(); |
146 | 158 | $encodedObj->metadata = new SoapVar($obj, SOAP_ENC_OBJECT, $this->getObjtype($obj), $this->namespace); |
@@ -103,7 +103,6 @@ discard block |
||
103 | 103 | * Merge records |
104 | 104 | * |
105 | 105 | * @param stdclass $mergeRequest |
106 | - * @param String $type |
|
107 | 106 | * @return mixed |
108 | 107 | */ |
109 | 108 | public function merge($mergeRequest) { |
@@ -119,7 +118,7 @@ discard block |
||
119 | 118 | |
120 | 119 | /** |
121 | 120 | * |
122 | - * @param array $request |
|
121 | + * @param SingleEmailMessage[] $request |
|
123 | 122 | */ |
124 | 123 | public function sendSingleEmail($request) { |
125 | 124 | if (is_array($request)) { |
@@ -138,7 +137,7 @@ discard block |
||
138 | 137 | |
139 | 138 | /** |
140 | 139 | * |
141 | - * @param array $request |
|
140 | + * @param MassEmailMessage[] $request |
|
142 | 141 | */ |
143 | 142 | public function sendMassEmail($request) { |
144 | 143 | if (is_array($request)) { |
@@ -206,7 +205,7 @@ discard block |
||
206 | 205 | |
207 | 206 | /** |
208 | 207 | * |
209 | - * @param mixed $response |
|
208 | + * @param SObject[] $response |
|
210 | 209 | * @return array |
211 | 210 | */ |
212 | 211 | private function _retrieveResult($response) { |
@@ -46,6 +46,9 @@ |
||
46 | 46 | protected $mylogin = null; |
47 | 47 | protected $theId = null; |
48 | 48 | |
49 | + /** |
|
50 | + * @param QueryResult $queryResult |
|
51 | + */ |
|
49 | 52 | public function deleteAll($queryResult) { |
50 | 53 | $records = $queryResult->records; |
51 | 54 | $ids = array (); |
@@ -9,6 +9,9 @@ |
||
9 | 9 | private $_hanlder; |
10 | 10 | private $_withTimeStamps; |
11 | 11 | |
12 | + /** |
|
13 | + * @param string $filename |
|
14 | + */ |
|
12 | 15 | function __construct($filename, $mode = 'a+', $withTimeStamps = FALSE) { |
13 | 16 | $this->_filename = $filename; |
14 | 17 | $this->_hanlder = fopen($filename, $mode); |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | * @since 1.0 |
203 | 203 | * |
204 | 204 | * |
205 | - * @return array |
|
205 | + * @return boolean |
|
206 | 206 | */ |
207 | 207 | |
208 | 208 | private static function valid_type( $type ) { |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | * @uses wp_update_post() |
301 | 301 | * @uses update_post_meta() |
302 | 302 | * |
303 | - * @return bool True if successful, false otherwise |
|
303 | + * @return boolean|null True if successful, false otherwise |
|
304 | 304 | */ |
305 | 305 | public static function update_log( $log_data = array(), $log_meta = array() ) { |
306 | 306 |
@@ -119,7 +119,7 @@ |
||
119 | 119 | /** |
120 | 120 | * Get the number of seconds the process has been running. |
121 | 121 | * |
122 | - * @return int The number of seconds. |
|
122 | + * @return double The number of seconds. |
|
123 | 123 | */ |
124 | 124 | protected function get_execution_time() { |
125 | 125 | $execution_time = microtime( true ) - $this->created_time; |