|
| 1 | +diff --git a/ToolkitApi/CW/cw.php b/ToolkitApi/CW/cw.php |
| 2 | +index 38cf73f..afd85fb 100644 |
| 3 | +--- a/ToolkitApi/CW/cw.php |
| 4 | ++++ b/ToolkitApi/CW/cw.php |
| 5 | +@@ -615,7 +615,7 @@ function i5_pclose(ToolkitServiceCw &$connection) |
| 6 | + * @param ToolkitServiceCw $connection [optional] the result of i5_connect(), or omit |
| 7 | + * @return boolean True on success, False on failure |
| 8 | + */ |
| 9 | +-function i5_adopt_authority($user, $password, ToolkitServiceCw $connection=null) |
| 10 | ++function i5_adopt_authority($user, $password, ?ToolkitServiceCw $connection=null) |
| 11 | + { |
| 12 | + // if conn not passed in, get instance of toolkit. If can't be obtained, return false. |
| 13 | + if (!$connection = verifyConnection($connection)) { |
| 14 | +@@ -801,7 +801,7 @@ function i5_errormsg() |
| 15 | + * @param ToolkitServiceCw $connection Optional connection object |
| 16 | + * @return boolean for success/failure |
| 17 | + */ |
| 18 | +-function i5_command($cmdString, $input = array(), $output = array(), ToolkitServiceCw $connection = null) |
| 19 | ++function i5_command($cmdString, $input = array(), $output = array(), ?ToolkitServiceCw $connection = null) |
| 20 | + { |
| 21 | + // if conn not passed in, get instance of toolkit. If can't be obtained, return false. |
| 22 | + if (!$connection = verifyConnection($connection)) { |
| 23 | +@@ -1464,7 +1464,7 @@ function i5_jobLog_list_close(&$list = null) |
| 24 | + * @param ToolkitServiceCw $connection |
| 25 | + * @return bool|null |
| 26 | + */ |
| 27 | +-function verifyConnection(ToolkitServiceCw $connection = null) |
| 28 | ++function verifyConnection(?ToolkitServiceCw $connection = null) |
| 29 | + { |
| 30 | + // if conn passed and non-null but it's bad |
| 31 | + if ($connection && !is_a($connection, 'ToolkitApi\CW\ToolkitServiceCw')) { |
| 32 | +@@ -2082,7 +2082,7 @@ function i5_data_area_read($name, $offsetOrConnection = null, $length = null, $c |
| 33 | + * @param ToolkitServiceCw $connection |
| 34 | + * @return boolean True on success, false on failure |
| 35 | + */ |
| 36 | +-function i5_data_area_write($name, $value, $offsetOrConnection = null, $length = null, ToolkitServiceCw $connection=null) |
| 37 | ++function i5_data_area_write($name, $value, $offsetOrConnection = null, $length = null, ?ToolkitServiceCw $connection=null) |
| 38 | + { |
| 39 | + if (isset($length)) { |
| 40 | + // assume offset and length are both provided, since they come as a pair. |
| 41 | +@@ -2851,7 +2851,7 @@ function i5_objects_list_close(&$list) |
| 42 | + * @param ToolkitServiceCw $connection |
| 43 | + * @return \ToolkitApi\CW\DataDescription |
| 44 | + */ |
| 45 | +-function i5_dtaq_prepare($name, $description, $keySizeOrConnection = 0, ToolkitServiceCw $connection = null) |
| 46 | ++function i5_dtaq_prepare($name, $description, $keySizeOrConnection = 0, ?ToolkitServiceCw $connection = null) |
| 47 | + { |
| 48 | + $keySize = 0; // init |
| 49 | + // user is allowed to omit $keySize, so there may be a variable number of parameters |
| 50 | +diff --git a/ToolkitApi/DataArea.php b/ToolkitApi/DataArea.php |
| 51 | +index fe63b5b..529dc3a 100644 |
| 52 | +--- a/ToolkitApi/DataArea.php |
| 53 | ++++ b/ToolkitApi/DataArea.php |
| 54 | +@@ -16,7 +16,7 @@ class DataArea |
| 55 | + /** |
| 56 | + * @param ToolkitInterface $ToolkitSrvObj |
| 57 | + */ |
| 58 | +- public function __construct(ToolkitInterface $ToolkitSrvObj = null) |
| 59 | ++ public function __construct(?ToolkitInterface $ToolkitSrvObj = null) |
| 60 | + { |
| 61 | + if ($ToolkitSrvObj instanceof Toolkit) { |
| 62 | + $this->ToolkitSrvObj = $ToolkitSrvObj; |
| 63 | +diff --git a/ToolkitApi/DataQueue.php b/ToolkitApi/DataQueue.php |
| 64 | +index e218877..cd7c273 100644 |
| 65 | +--- a/ToolkitApi/DataQueue.php |
| 66 | ++++ b/ToolkitApi/DataQueue.php |
| 67 | +@@ -17,7 +17,7 @@ class DataQueue |
| 68 | + /** |
| 69 | + * @param ToolkitInterface $ToolkitSrvObj |
| 70 | + */ |
| 71 | +- public function __construct(ToolkitInterface $ToolkitSrvObj = null) |
| 72 | ++ public function __construct(?ToolkitInterface $ToolkitSrvObj = null) |
| 73 | + { |
| 74 | + if ($ToolkitSrvObj instanceof Toolkit) { |
| 75 | + $this->Toolkit = $ToolkitSrvObj ; |
| 76 | +diff --git a/ToolkitApi/DateTimeApi.php b/ToolkitApi/DateTimeApi.php |
| 77 | +index 7f0c02d..7fcda74 100644 |
| 78 | +--- a/ToolkitApi/DateTimeApi.php |
| 79 | ++++ b/ToolkitApi/DateTimeApi.php |
| 80 | +@@ -13,7 +13,7 @@ class DateTimeApi |
| 81 | + /** |
| 82 | + * @param ToolkitInterface $ToolkitSrvObj |
| 83 | + */ |
| 84 | +- public function __construct(ToolkitInterface $ToolkitSrvObj = null) |
| 85 | ++ public function __construct(?ToolkitInterface $ToolkitSrvObj = null) |
| 86 | + { |
| 87 | + if ($ToolkitSrvObj instanceof Toolkit) { |
| 88 | + $this->ToolkitSrvObj = $ToolkitSrvObj ; |
| 89 | +diff --git a/ToolkitApi/JobLogs.php b/ToolkitApi/JobLogs.php |
| 90 | +index 46bc1c1..1c50e67 100644 |
| 91 | +--- a/ToolkitApi/JobLogs.php |
| 92 | ++++ b/ToolkitApi/JobLogs.php |
| 93 | +@@ -19,7 +19,7 @@ class JobLogs |
| 94 | + * @param ToolkitInterface $ToolkitSrvObj |
| 95 | + * @param string $tmpUSLib |
| 96 | + */ |
| 97 | +- public function __construct(ToolkitInterface $ToolkitSrvObj = null, $tmpUSLib = DFTLIB) |
| 98 | ++ public function __construct(?ToolkitInterface $ToolkitSrvObj = null, $tmpUSLib = DFTLIB) |
| 99 | + { |
| 100 | + if ($ToolkitSrvObj instanceof Toolkit ) { |
| 101 | + $this->ToolkitSrvObj = $ToolkitSrvObj; |
| 102 | +diff --git a/ToolkitApi/ListFromApi.php b/ToolkitApi/ListFromApi.php |
| 103 | +index cf687de..2a83860 100644 |
| 104 | +--- a/ToolkitApi/ListFromApi.php |
| 105 | ++++ b/ToolkitApi/ListFromApi.php |
| 106 | +@@ -20,7 +20,7 @@ class ListFromApi |
| 107 | + * @param $lengthOfReceiverVariable |
| 108 | + * @param ToolkitInterface $ToolkitSrvObj |
| 109 | + */ |
| 110 | +- public function __construct($requestHandle, $totalRecords, $receiverDs, $lengthOfReceiverVariable, ToolkitInterface $ToolkitSrvObj = null) |
| 111 | ++ public function __construct($requestHandle, $totalRecords, $receiverDs, $lengthOfReceiverVariable, ?ToolkitInterface $ToolkitSrvObj = null) |
| 112 | + { |
| 113 | + if ($ToolkitSrvObj instanceof Toolkit) { |
| 114 | + $this->ToolkitSrvObj = $ToolkitSrvObj; |
| 115 | +diff --git a/ToolkitApi/ObjectLists.php b/ToolkitApi/ObjectLists.php |
| 116 | +index 41085d4..6034c67 100644 |
| 117 | +--- a/ToolkitApi/ObjectLists.php |
| 118 | ++++ b/ToolkitApi/ObjectLists.php |
| 119 | +@@ -16,7 +16,7 @@ class ObjectLists |
| 120 | + /** |
| 121 | + * @param ToolkitInterface $ToolkitSrvObj |
| 122 | + */ |
| 123 | +- public function __construct(ToolkitInterface $ToolkitSrvObj = null) |
| 124 | ++ public function __construct(?ToolkitInterface $ToolkitSrvObj = null) |
| 125 | + { |
| 126 | + if ($ToolkitSrvObj instanceof Toolkit) { |
| 127 | + $this->ToolkitSrvObj = $ToolkitSrvObj; |
| 128 | +diff --git a/ToolkitApi/SpooledFiles.php b/ToolkitApi/SpooledFiles.php |
| 129 | +index 458f015..7f92368 100644 |
| 130 | +--- a/ToolkitApi/SpooledFiles.php |
| 131 | ++++ b/ToolkitApi/SpooledFiles.php |
| 132 | +@@ -19,7 +19,7 @@ class SpooledFiles |
| 133 | + * @param ToolkitInterface $ToolkitSrvObj |
| 134 | + * @param null $UserLib |
| 135 | + */ |
| 136 | +- public function __construct(ToolkitInterface $ToolkitSrvObj = NULL, $UserLib = NULL) |
| 137 | ++ public function __construct(?ToolkitInterface $ToolkitSrvObj = NULL, $UserLib = NULL) |
| 138 | + { |
| 139 | + if ($ToolkitSrvObj instanceof Toolkit) { |
| 140 | + $this->ToolkitSrvObj = $ToolkitSrvObj; |
| 141 | +diff --git a/ToolkitApi/SystemValues.php b/ToolkitApi/SystemValues.php |
| 142 | +index 7f76807..af65c12 100644 |
| 143 | +--- a/ToolkitApi/SystemValues.php |
| 144 | ++++ b/ToolkitApi/SystemValues.php |
| 145 | +@@ -14,7 +14,7 @@ class SystemValues |
| 146 | + /** |
| 147 | + * @param ToolkitInterface $ToolkitSrvObj |
| 148 | + */ |
| 149 | +- public function __construct(ToolkitInterface $ToolkitSrvObj = null){ |
| 150 | ++ public function __construct(?ToolkitInterface $ToolkitSrvObj = null){ |
| 151 | + if ($ToolkitSrvObj instanceof Toolkit) { |
| 152 | + $this->ToolkitSrvObj = $ToolkitSrvObj; |
| 153 | + return $this; |
| 154 | +diff --git a/ToolkitApi/ToolkitServiceXML.php b/ToolkitApi/ToolkitServiceXML.php |
| 155 | +index f817acf..ca70a00 100644 |
| 156 | +--- a/ToolkitApi/ToolkitServiceXML.php |
| 157 | ++++ b/ToolkitApi/ToolkitServiceXML.php |
| 158 | +@@ -369,7 +369,7 @@ class XMLWrapper |
| 159 | + * @param null $function |
| 160 | + * @return string |
| 161 | + */ |
| 162 | +- public function buildXmlIn($inputOutputParams = NULL, array $returnParams = NULL, |
| 163 | ++ public function buildXmlIn($inputOutputParams = NULL, ?array $returnParams = NULL, |
| 164 | + $pgm = "", |
| 165 | + $lib = "", |
| 166 | + $function = NULL) |
| 167 | +diff --git a/ToolkitApi/UserSpace.php b/ToolkitApi/UserSpace.php |
| 168 | +index e0649c7..ae8e4f6 100644 |
| 169 | +--- a/ToolkitApi/UserSpace.php |
| 170 | ++++ b/ToolkitApi/UserSpace.php |
| 171 | +@@ -13,7 +13,7 @@ class UserSpace |
| 172 | + /** |
| 173 | + * @param ToolkitInterface $ToolkitSrvObj |
| 174 | + */ |
| 175 | +- public function __construct(ToolkitInterface $ToolkitSrvObj = null) |
| 176 | ++ public function __construct(?ToolkitInterface $ToolkitSrvObj = null) |
| 177 | + { |
| 178 | + if ($ToolkitSrvObj instanceof Toolkit) { |
| 179 | + $this->ToolkitSrvObj = $ToolkitSrvObj ; |
0 commit comments