Skip to content

Commit f64489f

Browse files
committed
Updated docblock and cleaned up comments in body of functions.
1 parent b438f57 commit f64489f

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

ToolkitApi/ToolkitServiceXML.php

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,12 @@ function __construct($options ='', ToolkitService $ToolkitSrvObj = null)
5353
$this->_isCw = $this->ToolkitSrvObj->getIsCw();
5454
}
5555
}
56-
56+
5757
/**
5858
* get option from toolkit object
59-
*
59+
*
6060
* @param $optionName
61+
* @return bool|void
6162
*/
6263
protected function getOption($optionName)
6364
{
@@ -74,11 +75,14 @@ protected function getIsCw()
7475
return $this->_isCw;
7576
}
7677

77-
// Do any processing on parameter properties
78-
// to prepare for hex, ccsid.
79-
// Adds these elements to array:
80-
// processedData, ccsidStr, hexStr
81-
// @todo: This works but is somewhat clumsy to use. Refactor as method of ProgramParam object with XML creator injected into it.
78+
/**
79+
* Do any processing on parameter properties to prepare for hex, ccsid.
80+
* Adds these elements to array: processedData, ccsidStr, hexStr
81+
*
82+
* @todo: This works but is somewhat clumsy to use. Refactor as method of ProgramParam object with XML creator injected into it.
83+
*
84+
* @param array $props
85+
*/
8286
protected function processParamProps(&$props = array())
8387
{
8488
$alphanumeric = true; // start with assumption
@@ -142,8 +146,6 @@ protected function encodeString($string)
142146
*/
143147
protected function getPgmTag($pgm, $lib, $function)
144148
{
145-
$pgmtag = ''; // what we'll return
146-
147149
// specify opm mode if given
148150
$opmString = ($this->getOption('v5r4')) ? " mode='opm'" : "";
149151

@@ -181,12 +183,12 @@ protected function getPgmTag($pgm, $lib, $function)
181183

182184
/**
183185
* Beginning XML tag
186+
* ensure configured encoding for proper behavior with non-ASCII languages
184187
*
185188
* @return string
186189
*/
187190
protected function xmlStart()
188191
{
189-
// ensure configured encoding for proper behavior with non-ASCII languages
190192
return "<?xml version=\"1.0\" encoding=\"$this->encoding\" ?>";
191193
}
192194

@@ -360,14 +362,14 @@ public function parseDiagnosticsXml($xml)
360362
* @param string|array $inputOutputParams
361363
* @param array $returnParams
362364
* @param $pgm
363-
* @param string $lib
365+
* @param string $lib blank library means use current/default or library list
364366
* @param null $function
365367
* @return string
366368
*/
367369
public function buildXmlIn($inputOutputParams = NULL, array $returnParams = NULL,
368370
$pgm,
369-
$lib = "", // blank library means use current/default or library list
370-
$function = NULL )
371+
$lib = "",
372+
$function = NULL)
371373
{
372374
// initialize XML to empty. Could remain blank if no parameters were passed
373375
$parametersXml = '';
@@ -585,6 +587,7 @@ protected function updateType(&$data, $xmlServiceType)
585587
{
586588
$patterns = array('/10i0/', '/5i0/', '/4f/', '/\d*p\d*/');
587589
$replacements = array('integer', 'integer', 'float', 'float');
590+
588591
// look for a match
589592
$newType = preg_replace($patterns, $replacements, $xmlServiceType);
590593

@@ -615,10 +618,10 @@ protected function updateType(&$data, $xmlServiceType)
615618
* </pgm>
616619
* </script>
617620
*
618-
* @param SimpleXMLElement $simpleXmlElement
621+
* @param \SimpleXMLElement $simpleXmlElement
619622
* @return array
620623
*/
621-
protected function getSingleParamFromXml(SimpleXMLElement $simpleXmlElement)
624+
protected function getSingleParamFromXml(\SimpleXMLElement $simpleXmlElement)
622625
{
623626
// if it's too slow to set types, change it to false.
624627
$setTypes = $this->getIsCw(); // do it if in CW mode because old toolkit did return correct types

0 commit comments

Comments
 (0)