From 46cfd76084c3c8fab7155e8ed5dcaf555a84dbdd Mon Sep 17 00:00:00 2001 From: jonkerw85 <54948500+jonkerw85@users.noreply.github.com> Date: Sat, 23 Sep 2023 12:28:23 +0200 Subject: [PATCH 1/3] Update ToolkitService.php Added method signatures --- src/Facades/ToolkitService.php | 109 +++++++++++++++++++++++++++++++-- 1 file changed, 104 insertions(+), 5 deletions(-) diff --git a/src/Facades/ToolkitService.php b/src/Facades/ToolkitService.php index 9076fc6..65a48ff 100644 --- a/src/Facades/ToolkitService.php +++ b/src/Facades/ToolkitService.php @@ -6,13 +6,112 @@ class ToolkitService extends Facade { /** - * Get the registered name of the component. - * - * @return string - */ + * @method static bool isDebug() + * @method static void getDefaultServiceParams() + * @method static void getOptionalParams($type, array $optionalParams) + * @method static void setIsCw($isCw) + * @method static bool getIsCw() + * @method static array validPlugSizes() + * @method static string validPlugSizeList() + * @method static void plugSizeToBytes($plugSize) + * @method static void setTransport($transportObject) + * @method static mixed getTransport() + * @method static void chooseTransport($transportName = '') + * @method static void setDb($transportType = '') + * @method static void setToolkitServiceParams(array $XmlServiceOptions) + * @method static bool|void getOption($optionName) + * @method static array getOptions() + * @method static void setOptions($options = []) + * @method static bool getToolkitServiceParam($optionName) + * @method static void disconnect() + * @method static void disconnectPersistent() + * @method static void debugLog($stringToLog) + * @method static bool isDb2() + * @method static bool setDb2() + * @method static array|bool specialCall($callType) + * @method static array|bool callTransportOnly() + * @method static array|bool performanceData() + * @method static array|bool licenseXMLSERVICE() + * @method static array|bool pgmCall($pgmName, $lib, $inputParam = null, $returnParam = null, $options = null) + * @method static string getErrorMsg() + * @method static string getErrorCode() + * @method static void setErrorMsg($msg) + * @method static void setErrorCode($code) + * @method static bool getOutputParam(array $OutputArray) + * @method static string ExecuteProgram($inputXml, $disconnect = false) + * @method static string makeDbCall($internalKey, $plugSize, $controlKeyString, $inputXml, $disconnect = false) + * @method static getErrorReason($plugSize) + * @method static string sendXml($inputXml, $disconnect = false) + * @method static XMLWrapper getXmlWrapper() + * @method static bool|void getDiagnostics($info = 'joblog', $jobName = '', $jobUser = '', $jobNumber = '') + * @method static string getFrontEndVersion() + * @method static string getBackEndVersion() + * @method static string getLocalBackEndVersion($library) + * @method static array|bool CLCommand($command, $exec = '') + * @method static array|bool CLInteractiveCommand($command) + * @method static array|bool paseCommand($command) + * @method static bool qshellCommand($command) + * @method static array|bool ClCommandWithOutput($command) + * @method static array|bool ClCommandWithCpf($command) + * @method static array AddParameter($type, $io, $comment, $varName = '', $value = '', $varying = 'off', $dimension = 0) + * @method static \ToolkitApi\CharParam AddParameterChar($io, $size, $comment, $varName = '', $value = '', $varying = 'off', $dimension = 0, $by = '', $isArray = false, $ccsidBefore = '', $ccsidAfter = '', $useHex = false) + * @method static \ToolkitApi\Int32Param AddParameterInt32($io, $comment, $varName = '', $value = '', $dimension = 0) + * @method static \ToolkitApi\SizeParam AddParameterSize($comment, $varName = '', $labelFindLen = 0) + * @method static \ToolkitApi\SizePackParam AddParameterSizePack($comment, $varName = '', $labelFindLen = 0) + * @method static \ToolkitApi\Int8Param AddParameterInt8($io, $comment, $varName = '', $value = '', $dimension = 0) + * @method static \ToolkitApi\Int16Param AddParameterInt16($io, $comment, $varName = '', $value = '', $dimension = 0) + * @method static \ToolkitApi\Int64Param AddParameterInt64($io, $comment, $varName = '', $value = '', $dimension = 0) + * @method static \ToolkitApi\UInt8Param AddParameterUInt8($io, $comment, $varName = '', $value = '', $dimension = 0) + * @method static \ToolkitApi\UInt16Param AddParameterUInt16($io, $comment, $varName = '', $value = '', $dimension = 0) + * @method static \ToolkitApi\UInt32Param AddParameterUInt32($io, $comment, $varName = '', $value = '', $dimension = 0) + * @method static \ToolkitApi\UInt64Param AddParameterUInt64($io, $comment, $varName = '', $value = '', $dimension = 0) + * @method static \ToolkitApi\FloatParam AddParameterFloat($io, $comment, $varName = '', $value = '', $dimension = 0) + * @method static \ToolkitApi\RealParam AddParameterReal($io, $comment, $varName = '', $value = '', $dimension = 0) + * @method static \ToolkitApi\PackedDecParam AddParameterPackDec($io, $length, $scale, $comment, $varName = '', $value = '', $dimension = 0) + * @method static \ToolkitApi\ZonedParam AddParameterZoned($io, $length, $scale, $comment, $varName = '', $value = '', $dimension = 0) + * @method static \ToolkitApi\HoleParam AddParameterHole($size, $comment = 'hole') + * @method static \ToolkitApi\BinParam AddParameterBin($io, $size, $comment, $varName = '', $value = '', $dimension = 0) + * @method static array AddParameterArray($array) + * @method static DataStructure AddDataStruct(array $parameters, $name = 'struct_name', $dim = 0, $by = '', $isArray = false, $labelLen = null, $comment = '', $io = 'both') + * @method static DataStructure AddErrorDataStruct() + * @method static DataStructure AddErrorDataStructZeroBytes() + * @method static string getErrorDataStructXml($paramNum = 0) + * @method static string getErrorDataStructXmlWithCode($paramNum = 0) + * @method static string getListInfoApiXml($paramNum = 0) + * @method static string getNumberOfRecordsDesiredApiXml($paramNum = 0) + * @method static string getSortInformationApiXml($paramNum = 0) + * @method static string getDummyReceiverAndLengthApiXml($paramNum, $lengthOfReceiverVariable) + * @method static string getLastError() + * @method static bool isError() + * @method static bool|void getInternalKey() + * @method static bool|void isStateless() + * @method static void setInternalKey($internalKey) + * @method static string getControlKey($disconnect = false) + * @method static void VerifyPLUGName() + * @method static void verifyInternalKey() + * @method static mixed getXmlOut() + * @method static null|resource getConnection() + * @method static string generate_name() + * @method static array GenerateErrorParameter() + * @method static array GenerateErrorParameterZeroBytes() + * @method static bool verify_CPFError($retPgmArr, $functionErrMsg) + * @method static bool ParseErrorParameter(array $Error) + * @method static null|resource getSQLConnection() + * @method static mixed executeQuery($stmt) + * @method static void setIsPersistent($isPersistent = false) + * @method static bool getIsPersistent() + * @method static array|bool getJobAttributes() + * @method static string classPath() + * @method static bool extractErrorFromJoblog(array $programsToLookFor) + * @method static bool changeCurrentUser($user, $password) + * @method static bool|null getConfigValue($heading, $key, $default = null) + * @method static string getPhpOperatingSystem() + * @method static bool isPhpRunningOnIbmI() + * @method static bool getPhpCcsid() + */ protected static function getFacadeAccessor() { return 'ts'; } -} \ No newline at end of file +} From 8e0395d6363909f319d8761483de07097c9a9003 Mon Sep 17 00:00:00 2001 From: jonkerw85 <54948500+jonkerw85@users.noreply.github.com> Date: Sat, 23 Sep 2023 12:29:51 +0200 Subject: [PATCH 2/3] Update ToolkitService.php Added return type --- src/Facades/ToolkitService.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Facades/ToolkitService.php b/src/Facades/ToolkitService.php index 65a48ff..0e48249 100644 --- a/src/Facades/ToolkitService.php +++ b/src/Facades/ToolkitService.php @@ -108,6 +108,7 @@ class ToolkitService extends Facade { * @method static string getPhpOperatingSystem() * @method static bool isPhpRunningOnIbmI() * @method static bool getPhpCcsid() + * @return string */ protected static function getFacadeAccessor() { From fca64bc9a967ec46f1f508d2cade6bf189c99fcc Mon Sep 17 00:00:00 2001 From: jonkerw85 <54948500+jonkerw85@users.noreply.github.com> Date: Sat, 23 Sep 2023 18:51:35 +0200 Subject: [PATCH 3/3] Update ToolkitService.php Added value types to method signature if available in original docblock --- src/Facades/ToolkitService.php | 208 +++++++++++++++++---------------- 1 file changed, 106 insertions(+), 102 deletions(-) diff --git a/src/Facades/ToolkitService.php b/src/Facades/ToolkitService.php index 0e48249..1076bd1 100644 --- a/src/Facades/ToolkitService.php +++ b/src/Facades/ToolkitService.php @@ -3,111 +3,115 @@ use Illuminate\Support\Facades\Facade; +/** + * @method static bool isDebug() + * @method static void getDefaultServiceParams() + * @method static void getOptionalParams($type, array $optionalParams) + * @method static void setIsCw($isCw) + * @method static bool getIsCw() + * @method static array validPlugSizes() + * @method static string validPlugSizeList() + * @method static void plugSizeToBytes($plugSize) + * @method static void setTransport($transportObject) + * @method static mixed getTransport() + * @method static void chooseTransport($transportName = '') + * @method static void setDb(string $transportType = '') + * @method static void setToolkitServiceParams(array $XmlServiceOptions) + * @method static bool|void getOption($optionName) + * @method static array getOptions() + * @method static void setOptions(array $options = []) + * @method static bool getToolkitServiceParam($optionName) + * @method static void disconnect() + * @method static void disconnectPersistent() + * @method static void debugLog($stringToLog) + * @method static bool isDb2() + * @method static bool setDb2() + * @method static array|bool specialCall($callType) + * @method static array|bool callTransportOnly() + * @method static array|bool performanceData() + * @method static array|bool licenseXMLSERVICE() + * @method static array|bool pgmCall($pgmName, $lib, $inputParam = null, $returnParam = null, $options = null) + * @method static string getErrorMsg() + * @method static string getErrorCode() + * @method static void setErrorMsg($msg) + * @method static void setErrorCode($code) + * @method static bool getOutputParam(array $OutputArray) + * @method static string ExecuteProgram($inputXml, bool $disconnect = false) + * @method static string makeDbCall(string $internalKey, string $plugSize, string $controlKeyString, string $inputXml, bool $disconnect = false) + * @method static getErrorReason($plugSize) + * @method static string sendXml($inputXml, bool $disconnect = false) + * @method static XMLWrapper getXmlWrapper() + * @method static bool|void getDiagnostics($info = 'joblog', string $jobName = '', string $jobUser = '', string $jobNumber = '') + * @method static string getFrontEndVersion() + * @method static string getBackEndVersion() + * @method static string getLocalBackEndVersion($library) + * @method static array|bool CLCommand($command, $exec = '') + * @method static array|bool CLInteractiveCommand($command) + * @method static array|bool paseCommand($command) + * @method static bool qshellCommand($command) + * @method static array|bool ClCommandWithOutput($command) + * @method static array|bool ClCommandWithCpf($command) + * @method static array AddParameter($type, $io, $comment, string $varName = '', string $value = '', string $varying = 'off', int $dimension = 0) + * @method static \ToolkitApi\CharParam AddParameterChar($io, $size, $comment, string $varName = '', string $value = '', string $varying = 'off', int $dimension = 0, string $by = '', bool $isArray = false, string $ccsidBefore = '', string $ccsidAfter = '', bool $useHex = false) + * @method static \ToolkitApi\Int32Param AddParameterInt32($io, $comment, string $varName = '', string $value = '', int $dimension = 0) + * @method static \ToolkitApi\SizeParam AddParameterSize($comment, string $varName = '', $labelFindLen = 0) + * @method static \ToolkitApi\SizePackParam AddParameterSizePack($comment, string $varName = '', $labelFindLen = 0) + * @method static \ToolkitApi\Int8Param AddParameterInt8($io, $comment, string $varName = '', string $value = '', int $dimension = 0) + * @method static \ToolkitApi\Int16Param AddParameterInt16($io, $comment, string $varName = '', string $value = '', int $dimension = 0) + * @method static \ToolkitApi\Int64Param AddParameterInt64($io, $comment, string $varName = '', string $value = '', int $dimension = 0) + * @method static \ToolkitApi\UInt8Param AddParameterUInt8($io, $comment, string $varName = '', string $value = '', int $dimension = 0) + * @method static \ToolkitApi\UInt16Param AddParameterUInt16($io, $comment, string $varName = '', string $value = '', int $dimension = 0) + * @method static \ToolkitApi\UInt32Param AddParameterUInt32($io, $comment, string $varName = '', string $value = '', int $dimension = 0) + * @method static \ToolkitApi\UInt64Param AddParameterUInt64($io, $comment, string $varName = '', string $value = '', int $dimension = 0) + * @method static \ToolkitApi\FloatParam AddParameterFloat($io, $comment, string $varName = '', string $value = '', int $dimension = 0) + * @method static \ToolkitApi\RealParam AddParameterReal($io, $comment, string $varName = '', string $value = '', int $dimension = 0) + * @method static \ToolkitApi\PackedDecParam AddParameterPackDec($io, $length, $scale, $comment, string $varName = '', mixed $value = '', int $dimension = 0) + * @method static \ToolkitApi\ZonedParam AddParameterZoned($io, $length, $scale, $comment, string $varName = '', mixed $value = '', int $dimension = 0) + * @method static \ToolkitApi\HoleParam AddParameterHole($size, string $comment = 'hole') + * @method static \ToolkitApi\BinParam AddParameterBin($io, $size, $comment, string $varName = '', string $value = '', int $dimension = 0) + * @method static array AddParameterArray($array) + * @method static DataStructure AddDataStruct(array $parameters, string $name = 'struct_name', int $dim = 0, string $by = '', bool $isArray = false, null|int $labelLen = null, string $comment = '', string $io = 'both') + * @method static DataStructure AddErrorDataStruct() + * @method static DataStructure AddErrorDataStructZeroBytes() + * @method static string getErrorDataStructXml(int $paramNum = 0) + * @method static string getErrorDataStructXmlWithCode(int $paramNum = 0) + * @method static string getListInfoApiXml(int $paramNum = 0) + * @method static string getNumberOfRecordsDesiredApiXml(int $paramNum = 0) + * @method static string getSortInformationApiXml(int $paramNum = 0) + * @method static string getDummyReceiverAndLengthApiXml(int $paramNum, $lengthOfReceiverVariable) + * @method static string getLastError() + * @method static bool isError() + * @method static bool|void getInternalKey() + * @method static bool|void isStateless() + * @method static void setInternalKey($internalKey) + * @method static string getControlKey(bool $disconnect = false) + * @method static void VerifyPLUGName() + * @method static void verifyInternalKey() + * @method static mixed getXmlOut() + * @method static null|resource getConnection() + * @method static string generate_name() + * @method static array GenerateErrorParameter() + * @method static array GenerateErrorParameterZeroBytes() + * @method static bool verify_CPFError($retPgmArr, $functionErrMsg) + * @method static bool ParseErrorParameter(array $Error) + * @method static null|resource getSQLConnection() + * @method static mixed executeQuery($stmt) + * @method static void setIsPersistent(bool $isPersistent = false) + * @method static bool getIsPersistent() + * @method static array|bool getJobAttributes() + * @method static string classPath() + * @method static bool extractErrorFromJoblog(array $programsToLookFor) + * @method static bool changeCurrentUser($user, string $password) + * @method static bool|null getConfigValue($heading, $key, null|mixed $default = null) + * @method static string getPhpOperatingSystem() + * @method static bool isPhpRunningOnIbmI() + * @method static bool getPhpCcsid() + */ class ToolkitService extends Facade { /** - * @method static bool isDebug() - * @method static void getDefaultServiceParams() - * @method static void getOptionalParams($type, array $optionalParams) - * @method static void setIsCw($isCw) - * @method static bool getIsCw() - * @method static array validPlugSizes() - * @method static string validPlugSizeList() - * @method static void plugSizeToBytes($plugSize) - * @method static void setTransport($transportObject) - * @method static mixed getTransport() - * @method static void chooseTransport($transportName = '') - * @method static void setDb($transportType = '') - * @method static void setToolkitServiceParams(array $XmlServiceOptions) - * @method static bool|void getOption($optionName) - * @method static array getOptions() - * @method static void setOptions($options = []) - * @method static bool getToolkitServiceParam($optionName) - * @method static void disconnect() - * @method static void disconnectPersistent() - * @method static void debugLog($stringToLog) - * @method static bool isDb2() - * @method static bool setDb2() - * @method static array|bool specialCall($callType) - * @method static array|bool callTransportOnly() - * @method static array|bool performanceData() - * @method static array|bool licenseXMLSERVICE() - * @method static array|bool pgmCall($pgmName, $lib, $inputParam = null, $returnParam = null, $options = null) - * @method static string getErrorMsg() - * @method static string getErrorCode() - * @method static void setErrorMsg($msg) - * @method static void setErrorCode($code) - * @method static bool getOutputParam(array $OutputArray) - * @method static string ExecuteProgram($inputXml, $disconnect = false) - * @method static string makeDbCall($internalKey, $plugSize, $controlKeyString, $inputXml, $disconnect = false) - * @method static getErrorReason($plugSize) - * @method static string sendXml($inputXml, $disconnect = false) - * @method static XMLWrapper getXmlWrapper() - * @method static bool|void getDiagnostics($info = 'joblog', $jobName = '', $jobUser = '', $jobNumber = '') - * @method static string getFrontEndVersion() - * @method static string getBackEndVersion() - * @method static string getLocalBackEndVersion($library) - * @method static array|bool CLCommand($command, $exec = '') - * @method static array|bool CLInteractiveCommand($command) - * @method static array|bool paseCommand($command) - * @method static bool qshellCommand($command) - * @method static array|bool ClCommandWithOutput($command) - * @method static array|bool ClCommandWithCpf($command) - * @method static array AddParameter($type, $io, $comment, $varName = '', $value = '', $varying = 'off', $dimension = 0) - * @method static \ToolkitApi\CharParam AddParameterChar($io, $size, $comment, $varName = '', $value = '', $varying = 'off', $dimension = 0, $by = '', $isArray = false, $ccsidBefore = '', $ccsidAfter = '', $useHex = false) - * @method static \ToolkitApi\Int32Param AddParameterInt32($io, $comment, $varName = '', $value = '', $dimension = 0) - * @method static \ToolkitApi\SizeParam AddParameterSize($comment, $varName = '', $labelFindLen = 0) - * @method static \ToolkitApi\SizePackParam AddParameterSizePack($comment, $varName = '', $labelFindLen = 0) - * @method static \ToolkitApi\Int8Param AddParameterInt8($io, $comment, $varName = '', $value = '', $dimension = 0) - * @method static \ToolkitApi\Int16Param AddParameterInt16($io, $comment, $varName = '', $value = '', $dimension = 0) - * @method static \ToolkitApi\Int64Param AddParameterInt64($io, $comment, $varName = '', $value = '', $dimension = 0) - * @method static \ToolkitApi\UInt8Param AddParameterUInt8($io, $comment, $varName = '', $value = '', $dimension = 0) - * @method static \ToolkitApi\UInt16Param AddParameterUInt16($io, $comment, $varName = '', $value = '', $dimension = 0) - * @method static \ToolkitApi\UInt32Param AddParameterUInt32($io, $comment, $varName = '', $value = '', $dimension = 0) - * @method static \ToolkitApi\UInt64Param AddParameterUInt64($io, $comment, $varName = '', $value = '', $dimension = 0) - * @method static \ToolkitApi\FloatParam AddParameterFloat($io, $comment, $varName = '', $value = '', $dimension = 0) - * @method static \ToolkitApi\RealParam AddParameterReal($io, $comment, $varName = '', $value = '', $dimension = 0) - * @method static \ToolkitApi\PackedDecParam AddParameterPackDec($io, $length, $scale, $comment, $varName = '', $value = '', $dimension = 0) - * @method static \ToolkitApi\ZonedParam AddParameterZoned($io, $length, $scale, $comment, $varName = '', $value = '', $dimension = 0) - * @method static \ToolkitApi\HoleParam AddParameterHole($size, $comment = 'hole') - * @method static \ToolkitApi\BinParam AddParameterBin($io, $size, $comment, $varName = '', $value = '', $dimension = 0) - * @method static array AddParameterArray($array) - * @method static DataStructure AddDataStruct(array $parameters, $name = 'struct_name', $dim = 0, $by = '', $isArray = false, $labelLen = null, $comment = '', $io = 'both') - * @method static DataStructure AddErrorDataStruct() - * @method static DataStructure AddErrorDataStructZeroBytes() - * @method static string getErrorDataStructXml($paramNum = 0) - * @method static string getErrorDataStructXmlWithCode($paramNum = 0) - * @method static string getListInfoApiXml($paramNum = 0) - * @method static string getNumberOfRecordsDesiredApiXml($paramNum = 0) - * @method static string getSortInformationApiXml($paramNum = 0) - * @method static string getDummyReceiverAndLengthApiXml($paramNum, $lengthOfReceiverVariable) - * @method static string getLastError() - * @method static bool isError() - * @method static bool|void getInternalKey() - * @method static bool|void isStateless() - * @method static void setInternalKey($internalKey) - * @method static string getControlKey($disconnect = false) - * @method static void VerifyPLUGName() - * @method static void verifyInternalKey() - * @method static mixed getXmlOut() - * @method static null|resource getConnection() - * @method static string generate_name() - * @method static array GenerateErrorParameter() - * @method static array GenerateErrorParameterZeroBytes() - * @method static bool verify_CPFError($retPgmArr, $functionErrMsg) - * @method static bool ParseErrorParameter(array $Error) - * @method static null|resource getSQLConnection() - * @method static mixed executeQuery($stmt) - * @method static void setIsPersistent($isPersistent = false) - * @method static bool getIsPersistent() - * @method static array|bool getJobAttributes() - * @method static string classPath() - * @method static bool extractErrorFromJoblog(array $programsToLookFor) - * @method static bool changeCurrentUser($user, $password) - * @method static bool|null getConfigValue($heading, $key, $default = null) - * @method static string getPhpOperatingSystem() - * @method static bool isPhpRunningOnIbmI() - * @method static bool getPhpCcsid() + * Get the registered name of the component. + * * @return string */ protected static function getFacadeAccessor()