@@ -311,8 +311,8 @@ discard block |
||
311 | 311 | * write log function |
312 | 312 | * |
313 | 313 | * @access public |
314 | - * @param mixed $command |
|
315 | - * @param mixed $details (default: NULL) |
|
314 | + * @param string $command |
|
315 | + * @param string $details (default: NULL) |
|
316 | 316 | * @param int $severity (default: 0) |
317 | 317 | * @param mixed $username (default: NULL) |
318 | 318 | * @return void |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | * Writes changelog to syslog |
453 | 453 | * |
454 | 454 | * @access private |
455 | - * @param mixed $changelog |
|
455 | + * @param string[] $changelog |
|
456 | 456 | * @return void |
457 | 457 | */ |
458 | 458 | private function syslog_write_changelog ($changelog) { |
@@ -691,8 +691,8 @@ discard block |
||
691 | 691 | * Writes changelog to database |
692 | 692 | * |
693 | 693 | * @access private |
694 | - * @param mixed $changelog |
|
695 | - * @return void |
|
694 | + * @param string[] $changelog |
|
695 | + * @return boolean |
|
696 | 696 | */ |
697 | 697 | private function changelog_write_to_db ($changelog) { |
698 | 698 | # log to array |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | * Sets default values for database connection and othern parameters |
208 | 208 | * |
209 | 209 | * @access private |
210 | - * @return void |
|
210 | + * @return string |
|
211 | 211 | */ |
212 | 212 | private function db_set_db_settings () { |
213 | 213 | // init |
@@ -349,7 +349,7 @@ discard block |
||
349 | 349 | * set_query_values function. |
350 | 350 | * |
351 | 351 | * @access public |
352 | - * @param int|string $limit (default: 1000000) |
|
352 | + * @param integer $limit (default: 1000000) |
|
353 | 353 | * @param string $orderby (default: "id") |
354 | 354 | * @param string $orderdir (default: "asc") |
355 | 355 | */ |
@@ -584,7 +584,7 @@ discard block |
||
584 | 584 | * Fetches domain details by name |
585 | 585 | * |
586 | 586 | * @access public |
587 | - * @param mixed $name |
|
587 | + * @param string $name |
|
588 | 588 | * @return void |
589 | 589 | */ |
590 | 590 | public function fetch_domain_by_name ($name) { |
@@ -675,7 +675,7 @@ discard block |
||
675 | 675 | * |
676 | 676 | * @access public |
677 | 677 | * @param mixed $domain_id |
678 | - * @param mixed $type |
|
678 | + * @param string $type |
|
679 | 679 | * @return void |
680 | 680 | */ |
681 | 681 | public function fetch_domain_records_by_type ($domain_id, $type) { |
@@ -941,7 +941,7 @@ discard block |
||
941 | 941 | * @access public |
942 | 942 | * @param mixed $hostname |
943 | 943 | * @param mixed $ip |
944 | - * @return void |
|
944 | + * @return boolean |
|
945 | 945 | */ |
946 | 946 | public function pdns_remove_ip_and_hostname_records ($hostname, $ip) { |
947 | 947 | // set query |
@@ -984,7 +984,7 @@ discard block |
||
984 | 984 | * @access private |
985 | 985 | * @param int|string $domain_id |
986 | 986 | * @param mixed $serial |
987 | - * @return void |
|
987 | + * @return false|null |
|
988 | 988 | */ |
989 | 989 | private function update_soa_serial ($domain_id, $serial = false) { |
990 | 990 | // fetch record |
@@ -1014,7 +1014,7 @@ discard block |
||
1014 | 1014 | * Updates all SOA serials if it changes from autoserial false to true |
1015 | 1015 | * |
1016 | 1016 | * @access public |
1017 | - * @param bool $autoserial (Default : No) |
|
1017 | + * @param string|boolean $autoserial (Default : No) |
|
1018 | 1018 | * @return void |
1019 | 1019 | */ |
1020 | 1020 | public function update_all_soa_serials ($autoserial = "No") { |
@@ -1085,11 +1085,11 @@ discard block |
||
1085 | 1085 | * @access public |
1086 | 1086 | * @param mixed $domain_id |
1087 | 1087 | * @param mixed $name (default: null) |
1088 | - * @param mixed $type |
|
1088 | + * @param string $type |
|
1089 | 1089 | * @param mixed $content |
1090 | 1090 | * @param mixed $ttl |
1091 | 1091 | * @param mixed $prio (default: null) |
1092 | - * @param int|string $disabled (default: 0) |
|
1092 | + * @param integer $disabled (default: 0) |
|
1093 | 1093 | * @return array |
1094 | 1094 | */ |
1095 | 1095 | public function formulate_new_record ($domain_id, $name=null, $type, $content, $ttl, $prio=null, $disabled = 0) { |
@@ -1281,7 +1281,7 @@ discard block |
||
1281 | 1281 | * - 2015032701 |
1282 | 1282 | * |
1283 | 1283 | * @access private |
1284 | - * @return void |
|
1284 | + * @return string |
|
1285 | 1285 | */ |
1286 | 1286 | private function set_default_change_date () { |
1287 | 1287 | return date("Ymd")."00"; |
@@ -1313,7 +1313,7 @@ discard block |
||
1313 | 1313 | * @param mixed $domain_id |
1314 | 1314 | * @param mixed $old_name |
1315 | 1315 | * @param mixed $name |
1316 | - * @return void |
|
1316 | + * @return boolean |
|
1317 | 1317 | */ |
1318 | 1318 | public function update_all_records ($domain_id, $old_name, $name) { |
1319 | 1319 | // execute |
@@ -1367,7 +1367,7 @@ discard block |
||
1367 | 1367 | * |
1368 | 1368 | * @access public |
1369 | 1369 | * @param mixed $ip |
1370 | - * @return void |
|
1370 | + * @return string |
|
1371 | 1371 | */ |
1372 | 1372 | public function get_ptr_zone_name ($ip, $mask) { |
1373 | 1373 | return $this->identify_address ($ip)=="IPv4" ? $this->get_ptr_zone_name_v4 ($ip, $mask) : $this->get_ptr_zone_name_v6 ($ip, $mask); |
@@ -1378,7 +1378,7 @@ discard block |
||
1378 | 1378 | * |
1379 | 1379 | * @access public |
1380 | 1380 | * @param mixed $ip |
1381 | - * @return void |
|
1381 | + * @return string |
|
1382 | 1382 | */ |
1383 | 1383 | public function get_ptr_zone_name_v4 ($ip, $mask) { |
1384 | 1384 | // check mask to see how many IP bits to remove |
@@ -1397,7 +1397,7 @@ discard block |
||
1397 | 1397 | * |
1398 | 1398 | * @access public |
1399 | 1399 | * @param mixed $ip |
1400 | - * @return void |
|
1400 | + * @return string |
|
1401 | 1401 | */ |
1402 | 1402 | public function get_ptr_zone_name_v6 ($ip, $mask) { |
1403 | 1403 | // PEAR for IPv6 |
@@ -1426,7 +1426,7 @@ discard block |
||
1426 | 1426 | * |
1427 | 1427 | * @access public |
1428 | 1428 | * @param mixed $ip |
1429 | - * @return void |
|
1429 | + * @return string |
|
1430 | 1430 | */ |
1431 | 1431 | public function get_ip_ptr_name ($ip) { |
1432 | 1432 | // set zone prefix and reverse content |
@@ -1482,7 +1482,7 @@ discard block |
||
1482 | 1482 | * Checks if record exists by id |
1483 | 1483 | * |
1484 | 1484 | * @access private |
1485 | - * @param mixed $ptr_id (default: 0) |
|
1485 | + * @param integer $ptr_id (default: 0) |
|
1486 | 1486 | * @return bool |
1487 | 1487 | */ |
1488 | 1488 | public function record_id_exists ($ptr_id = 0) { |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | * Initializes new Object. |
98 | 98 | * |
99 | 99 | * @access protected |
100 | - * @param mixed $Object_name // object name |
|
100 | + * @param string $Object_name // object name |
|
101 | 101 | * @param mixed $Database // Database object |
102 | 102 | */ |
103 | 103 | protected function init_object ($Object_name, $Database) { |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | * Defines links for controller |
341 | 341 | * |
342 | 342 | * @access private |
343 | - * @param mixed $controller |
|
343 | + * @param string $controller |
|
344 | 344 | * @return void |
345 | 345 | */ |
346 | 346 | private function define_links ($controller) { |
@@ -185,7 +185,6 @@ discard block |
||
185 | 185 | * |
186 | 186 | * @param string $table |
187 | 187 | * @param string $action |
188 | - * @param string $id |
|
189 | 188 | * @param mixed $values |
190 | 189 | * @return void |
191 | 190 | */ |
@@ -207,7 +206,7 @@ discard block |
||
207 | 206 | * $values are all values that should be passed to create object |
208 | 207 | * |
209 | 208 | * @access private |
210 | - * @param mixed $table |
|
209 | + * @param string $table |
|
211 | 210 | * @param mixed $values |
212 | 211 | * @return boolean |
213 | 212 | */ |
@@ -236,7 +235,7 @@ discard block |
||
236 | 235 | * id will be used to match field to update. |
237 | 236 | * |
238 | 237 | * @access private |
239 | - * @param mixed $table //name of table to update |
|
238 | + * @param string $table //name of table to update |
|
240 | 239 | * @param array $values //update variables |
241 | 240 | * @return boolean |
242 | 241 | */ |
@@ -265,7 +264,7 @@ discard block |
||
265 | 264 | * ids will be used to match fields to update. |
266 | 265 | * |
267 | 266 | * @access private |
268 | - * @param mixed $table //name of table to update |
|
267 | + * @param string $table //name of table to update |
|
269 | 268 | * @param array $values //update variables |
270 | 269 | * @param string $ids |
271 | 270 | * @return boolean |
@@ -292,7 +291,7 @@ discard block |
||
292 | 291 | * Delete object in table by specified object id |
293 | 292 | * |
294 | 293 | * @access private |
295 | - * @param mixed $table //table to update |
|
294 | + * @param string $table //table to update |
|
296 | 295 | * @param string $field //field selection (where $field = $id) |
297 | 296 | * @param mixed $id //field identifier |
298 | 297 | * @return boolean |
@@ -70,8 +70,8 @@ |
||
70 | 70 | * Sets array of nameservers to use |
71 | 71 | * |
72 | 72 | * @access private |
73 | - * @param mixed $nsid (default: null) |
|
74 | - * @return void |
|
73 | + * @param integer $nsid (default: null) |
|
74 | + * @return false|null |
|
75 | 75 | */ |
76 | 76 | private function set_nameservers ($nsid = null) { |
77 | 77 | // null ? |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | * |
118 | 118 | * @access private |
119 | 119 | * @param mixed $values |
120 | - * @return void |
|
120 | + * @return boolean |
|
121 | 121 | */ |
122 | 122 | private function section_add ($values) { |
123 | 123 | # null empty values |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | * |
150 | 150 | * @access private |
151 | 151 | * @param mixed $values |
152 | - * @return void |
|
152 | + * @return boolean |
|
153 | 153 | */ |
154 | 154 | private function section_edit ($values) { |
155 | 155 | # null empty values |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | * |
189 | 189 | * @access private |
190 | 190 | * @param mixed $values |
191 | - * @return void |
|
191 | + * @return boolean |
|
192 | 192 | */ |
193 | 193 | private function section_delete ($values) { |
194 | 194 | # subnets class |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | * |
231 | 231 | * @access private |
232 | 232 | * @param mixed $order |
233 | - * @return void |
|
233 | + * @return boolean |
|
234 | 234 | */ |
235 | 235 | private function section_reorder ($order) { |
236 | 236 | # update each section |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | * Fetch subsections for specified sectionid |
328 | 328 | * |
329 | 329 | * @access public |
330 | - * @param mixed $sectionId |
|
330 | + * @param integer $sectionId |
|
331 | 331 | * @return void |
332 | 332 | */ |
333 | 333 | public function fetch_subsections ($sectionId) { |
@@ -584,7 +584,7 @@ discard block |
||
584 | 584 | * @access private |
585 | 585 | * @param mixed $sectionId |
586 | 586 | * @param mixed $permissions |
587 | - * @return void |
|
587 | + * @return boolean |
|
588 | 588 | */ |
589 | 589 | private function delegate_section_permissions ($sectionId, $permissions) { |
590 | 590 | try { $this->Database->updateObject("subnets", array("permissions"=>$permissions, "sectionId"=>$sectionId), "sectionId"); } |
@@ -271,7 +271,6 @@ discard block |
||
271 | 271 | * Search inside subnets if host address is provided! |
272 | 272 | * |
273 | 273 | * @access private |
274 | - * @param mixed $search_term |
|
275 | 274 | * @param number $high |
276 | 275 | * @param number $low |
277 | 276 | * @return array |
@@ -322,7 +321,7 @@ discard block |
||
322 | 321 | * Search inside subnets if host address is provided! ipv6 |
323 | 322 | * |
324 | 323 | * @access private |
325 | - * @param mixed $search_term |
|
324 | + * @param mixed $search_req |
|
326 | 325 | * @param number $high |
327 | 326 | * @param number $low |
328 | 327 | * @return array |
@@ -672,7 +671,7 @@ discard block |
||
672 | 671 | * Fetches standard tables from SCHEMA.sql file |
673 | 672 | * |
674 | 673 | * @access private |
675 | - * @return void |
|
674 | + * @return string[] |
|
676 | 675 | */ |
677 | 676 | private function fetch_standard_tables () { |
678 | 677 | # get SCHEMA.SQL file |
@@ -760,7 +759,7 @@ discard block |
||
760 | 759 | * Verify that widget file exists |
761 | 760 | * |
762 | 761 | * @access public |
763 | - * @return void |
|
762 | + * @return boolean |
|
764 | 763 | */ |
765 | 764 | public function verify_widget ($file) { |
766 | 765 | return file_exists("app/dashboard/widgets/$file.php")==false ? false : true; |
@@ -832,7 +831,7 @@ discard block |
||
832 | 831 | * @access public |
833 | 832 | * @param string $action (default: "new") |
834 | 833 | * @param mixed $values |
835 | - * @return void |
|
834 | + * @return boolean |
|
836 | 835 | */ |
837 | 836 | public function ip_request_send_mail ($action="new", $values) { |
838 | 837 | |
@@ -923,7 +922,7 @@ discard block |
||
923 | 922 | * Returns list of recipients to get new |
924 | 923 | * |
925 | 924 | * @access private |
926 | - * @return void |
|
925 | + * @return false|null |
|
927 | 926 | */ |
928 | 927 | private function ip_request_get_mail_recipients () { |
929 | 928 | // get all admins and check who to end mail to |
@@ -1107,7 +1106,7 @@ discard block |
||
1107 | 1106 | * false = doesnt exist |
1108 | 1107 | * |
1109 | 1108 | * @access public |
1110 | - * @param mixed $tablename |
|
1109 | + * @param string $tablename |
|
1111 | 1110 | * @param bool $quit |
1112 | 1111 | * @return bool |
1113 | 1112 | */ |
@@ -1128,6 +1127,7 @@ discard block |
||
1128 | 1127 | * |
1129 | 1128 | * @access public |
1130 | 1129 | * @param mixed $fieldname |
1130 | + * @param string $tablename |
|
1131 | 1131 | * @return bool |
1132 | 1132 | */ |
1133 | 1133 | public function field_exists ($tablename, $fieldname) { |
@@ -1160,7 +1160,7 @@ discard block |
||
1160 | 1160 | * |
1161 | 1161 | * @access public |
1162 | 1162 | * @param mixed $table |
1163 | - * @return void |
|
1163 | + * @return false|string |
|
1164 | 1164 | */ |
1165 | 1165 | public function get_table_fix ($table) { |
1166 | 1166 | $res = fopen(dirname(__FILE__) . "/../../db/SCHEMA.sql", "r"); |
@@ -1181,7 +1181,7 @@ discard block |
||
1181 | 1181 | * @access public |
1182 | 1182 | * @param mixed $table |
1183 | 1183 | * @param mixed $field |
1184 | - * @return void |
|
1184 | + * @return string|false |
|
1185 | 1185 | */ |
1186 | 1186 | public function get_field_fix ($table, $field) { |
1187 | 1187 | $res = fopen(dirname(__FILE__) . "/../../db/SCHEMA.sql", "r"); |
@@ -1214,7 +1214,7 @@ discard block |
||
1214 | 1214 | * |
1215 | 1215 | * @access public |
1216 | 1216 | * @param mixed $table |
1217 | - * @return void |
|
1217 | + * @return boolean |
|
1218 | 1218 | */ |
1219 | 1219 | public function fix_table ($table) { |
1220 | 1220 | # first fetch fix query |
@@ -1234,7 +1234,7 @@ discard block |
||
1234 | 1234 | * @access public |
1235 | 1235 | * @param mixed $table |
1236 | 1236 | * @param mixed $field |
1237 | - * @return void |
|
1237 | + * @return boolean |
|
1238 | 1238 | */ |
1239 | 1239 | public function fix_field ($table, $field) { |
1240 | 1240 | |
@@ -1271,7 +1271,7 @@ discard block |
||
1271 | 1271 | * Check for latest version |
1272 | 1272 | * |
1273 | 1273 | * @access public |
1274 | - * @return void |
|
1274 | + * @return string|false |
|
1275 | 1275 | */ |
1276 | 1276 | public function check_latest_phpipam_version () { |
1277 | 1277 | # fetch settings |
@@ -1284,7 +1284,7 @@ discard block |
||
1284 | 1284 | * Checks for latest phpipam version from phpipam webpage |
1285 | 1285 | * |
1286 | 1286 | * @access public |
1287 | - * @return void |
|
1287 | + * @return string|false |
|
1288 | 1288 | */ |
1289 | 1289 | public function check_latest_phpipam_version_phpipamnet () { |
1290 | 1290 | # fetch webpage |
@@ -1434,7 +1434,7 @@ discard block |
||
1434 | 1434 | * @access private |
1435 | 1435 | * @param $network |
1436 | 1436 | * @param $broadcast |
1437 | - * @return void |
|
1437 | + * @return string|false |
|
1438 | 1438 | */ |
1439 | 1439 | private function get_ipv4_address_type ($network, $broadcast) { |
1440 | 1440 | # get all possible classes |
@@ -1537,7 +1537,7 @@ discard block |
||
1537 | 1537 | * @access public |
1538 | 1538 | * @param mixed $addresses |
1539 | 1539 | * @param int $pflen (default: 128) |
1540 | - * @return void |
|
1540 | + * @return string |
|
1541 | 1541 | */ |
1542 | 1542 | public function reverse_IPv6 ($addresses, $pflen=128) { |
1543 | 1543 | # Initialize PEAR NET object |
@@ -1562,7 +1562,7 @@ discard block |
||
1562 | 1562 | * |
1563 | 1563 | * @access private |
1564 | 1564 | * @param CIDR $cidr |
1565 | - * @return void |
|
1565 | + * @return string|false |
|
1566 | 1566 | */ |
1567 | 1567 | private function get_ipv6_address_type ($cidr) { |
1568 | 1568 | # Initialize PEAR NET object |
@@ -1579,7 +1579,7 @@ discard block |
||
1579 | 1579 | * Defines all IPv6 address types |
1580 | 1580 | * |
1581 | 1581 | * @access private |
1582 | - * @return array |
|
1582 | + * @return string[] |
|
1583 | 1583 | */ |
1584 | 1584 | private function define_ipv6_address_types () { |
1585 | 1585 | $all_types[10] = "NET_IPV6_NO_NETMASK"; |
@@ -1695,7 +1695,7 @@ discard block |
||
1695 | 1695 | * @access private |
1696 | 1696 | * @param object $subnet |
1697 | 1697 | * @param array $custom_address_fields |
1698 | - * @return void |
|
1698 | + * @return string[] |
|
1699 | 1699 | */ |
1700 | 1700 | private function parse_import_file_xls ($subnet, $custom_address_fields) { |
1701 | 1701 | # get excel object |
@@ -1916,7 +1916,7 @@ discard block |
||
1916 | 1916 | * Sets valid actions |
1917 | 1917 | * |
1918 | 1918 | * @access private |
1919 | - * @return void |
|
1919 | + * @return string[] |
|
1920 | 1920 | */ |
1921 | 1921 | private function get_valid_actions () { |
1922 | 1922 | return array("add", "all-add", "edit", "all-edit", "delete", "truncate", "split", "resize", "move"); |
@@ -1941,7 +1941,7 @@ discard block |
||
1941 | 1941 | * |
1942 | 1942 | * @access public |
1943 | 1943 | * @param mixed $code //lang code |
1944 | - * @return void |
|
1944 | + * @return boolean |
|
1945 | 1945 | */ |
1946 | 1946 | public function verify_translation ($code) { |
1947 | 1947 | //verify that proper files exist |
@@ -1953,7 +1953,7 @@ discard block |
||
1953 | 1953 | * |
1954 | 1954 | * @access public |
1955 | 1955 | * @param mixed $code //lang code |
1956 | - * @return void |
|
1956 | + * @return string |
|
1957 | 1957 | */ |
1958 | 1958 | public function get_translation_version ($code) { |
1959 | 1959 | //check for version |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | * |
163 | 163 | * @access public |
164 | 164 | * @param int $state |
165 | - * @return mixed tag |
|
165 | + * @return string|null tag |
|
166 | 166 | */ |
167 | 167 | public function address_type_format_tag ($state) { |
168 | 168 | # fetch address states |
@@ -516,7 +516,7 @@ discard block |
||
516 | 516 | * |
517 | 517 | * @access private |
518 | 518 | * @param mixed $address |
519 | - * @return void |
|
519 | + * @return null|boolean |
|
520 | 520 | */ |
521 | 521 | private function threshold_check ($address) { |
522 | 522 | $address = (object) $address; |
@@ -614,7 +614,7 @@ discard block |
||
614 | 614 | * |
615 | 615 | * @access public |
616 | 616 | * @param mixed $subnetId |
617 | - * @return void |
|
617 | + * @return null|false |
|
618 | 618 | */ |
619 | 619 | public function remove_gateway ($subnetId) { |
620 | 620 | try { $this->Database->updateObject("ipaddresses", array("subnetId"=>$subnetId, "is_gateway"=>0), "subnetId"); } |
@@ -671,7 +671,7 @@ discard block |
||
671 | 671 | * @access public |
672 | 672 | * @param int $ip1 |
673 | 673 | * @param int $ip2 |
674 | - * @return void |
|
674 | + * @return string |
|
675 | 675 | */ |
676 | 676 | public function calculate_address_diff ($ip1, $ip2) { |
677 | 677 | return gmp_strval(gmp_sub($ip2, $ip1)); |
@@ -753,7 +753,7 @@ discard block |
||
753 | 753 | * Modifes powerDNS PTR record |
754 | 754 | * |
755 | 755 | * @access public |
756 | - * @param mixed $action |
|
756 | + * @param string $action |
|
757 | 757 | * @param mixed $address |
758 | 758 | * @param bool $print_error (default: true) |
759 | 759 | * @return void |
@@ -858,9 +858,9 @@ discard block |
||
858 | 858 | * |
859 | 859 | * @access public |
860 | 860 | * @param mixed $address |
861 | - * @param mixed $print_error (default: true) |
|
861 | + * @param boolean $print_error (default: true) |
|
862 | 862 | * @param mixed $id (default: NULL) |
863 | - * @return void |
|
863 | + * @return boolean |
|
864 | 864 | */ |
865 | 865 | public function ptr_add ($address, $print_error = true, $id = null) { |
866 | 866 | // decode values |
@@ -896,8 +896,8 @@ discard block |
||
896 | 896 | * |
897 | 897 | * @access public |
898 | 898 | * @param mixed $address |
899 | - * @param mixed $print_error (default: true) |
|
900 | - * @return void |
|
899 | + * @param boolean $print_error (default: true) |
|
900 | + * @return false|null |
|
901 | 901 | */ |
902 | 902 | public function ptr_edit ($address, $print_error = true) { |
903 | 903 | // validate hostname |
@@ -966,7 +966,7 @@ discard block |
||
966 | 966 | * @access public |
967 | 967 | * @param mixed $address_id |
968 | 968 | * @param mixed $ptr_id |
969 | - * @return void |
|
969 | + * @return null|false |
|
970 | 970 | */ |
971 | 971 | public function ptr_link ($address_id, $ptr_id) { |
972 | 972 | # execute |
@@ -982,7 +982,7 @@ discard block |
||
982 | 982 | * |
983 | 983 | * @access private |
984 | 984 | * @param mixed $address_id |
985 | - * @return void |
|
985 | + * @return null|false |
|
986 | 986 | */ |
987 | 987 | private function ptr_unlink ($address_id) { |
988 | 988 | # execute |
@@ -998,7 +998,7 @@ discard block |
||
998 | 998 | * |
999 | 999 | * @access public |
1000 | 1000 | * @param mixed $subnet_id |
1001 | - * @return void |
|
1001 | + * @return boolean |
|
1002 | 1002 | */ |
1003 | 1003 | public function ptr_unlink_subnet_addresses ($subnet_id) { |
1004 | 1004 | try { $this->Database->runQuery("update `ipaddresses` set `PTR` = 0 where `subnetId` = ?;", array($subnet_id)); } |
@@ -1014,7 +1014,7 @@ discard block |
||
1014 | 1014 | * Checks if PTR record exists |
1015 | 1015 | * |
1016 | 1016 | * @access private |
1017 | - * @param mixed $ptr_id (default: 0) |
|
1017 | + * @param integer $ptr_id (default: 0) |
|
1018 | 1018 | * @return void |
1019 | 1019 | */ |
1020 | 1020 | private function ptr_exists ($ptr_id = 0) { |
@@ -1072,7 +1072,7 @@ discard block |
||
1072 | 1072 | * @access public |
1073 | 1073 | * @param array $address |
1074 | 1074 | * @param int $subnetId |
1075 | - * @return void |
|
1075 | + * @return string|boolean |
|
1076 | 1076 | */ |
1077 | 1077 | public function import_address_from_csv ($address, $subnetId) { |
1078 | 1078 | # Subnets object |
@@ -1146,8 +1146,8 @@ discard block |
||
1146 | 1146 | * |
1147 | 1147 | * @access public |
1148 | 1148 | * @param int $subnetId |
1149 | - * @param mixed $order |
|
1150 | - * @param mixed $order_direction |
|
1149 | + * @param string $order |
|
1150 | + * @param string $order_direction |
|
1151 | 1151 | * @return objects addresses |
1152 | 1152 | */ |
1153 | 1153 | public function fetch_subnet_addresses ($subnetId, $order=null, $order_direction=null) { |
@@ -1428,7 +1428,7 @@ discard block |
||
1428 | 1428 | * |
1429 | 1429 | * @access public |
1430 | 1430 | * @param int $address |
1431 | - * @param mixed $subnet (CIDR) |
|
1431 | + * @param string $subnet (CIDR) |
|
1432 | 1432 | * @param bool $no_strict (default: false) |
1433 | 1433 | * @param bool $die (default: false) |
1434 | 1434 | * @return boolean |
@@ -1501,7 +1501,7 @@ discard block |
||
1501 | 1501 | * |
1502 | 1502 | * @access public |
1503 | 1503 | * @param mixed $address |
1504 | - * @return void |
|
1504 | + * @return boolean |
|
1505 | 1505 | */ |
1506 | 1506 | public function validate_address ($address) { |
1507 | 1507 | # Initialize PEAR NET object |
@@ -1524,7 +1524,7 @@ discard block |
||
1524 | 1524 | * Checks if address is subnet for IPv4 addresses |
1525 | 1525 | * |
1526 | 1526 | * @access public |
1527 | - * @param mixed $address |
|
1527 | + * @param integer $address |
|
1528 | 1528 | * @param int $netmask |
1529 | 1529 | * @return boolean |
1530 | 1530 | */ |
@@ -1538,7 +1538,7 @@ discard block |
||
1538 | 1538 | * Checks if address is broadcast for IPv4 addresses |
1539 | 1539 | * |
1540 | 1540 | * @access public |
1541 | - * @param mixed $address |
|
1541 | + * @param integer $address |
|
1542 | 1542 | * @param int $netmask |
1543 | 1543 | * @return boolean |
1544 | 1544 | */ |
@@ -1815,7 +1815,7 @@ discard block |
||
1815 | 1815 | * Present numbers in pow 10, only for IPv6 |
1816 | 1816 | * |
1817 | 1817 | * @access public |
1818 | - * @param mixed $number |
|
1818 | + * @param string $number |
|
1819 | 1819 | * @return void |
1820 | 1820 | */ |
1821 | 1821 | public function reformat_number ($number) { |
@@ -121,8 +121,8 @@ discard block |
||
121 | 121 | * Fetch all objects from specified table in database |
122 | 122 | * |
123 | 123 | * @access public |
124 | - * @param mixed $table |
|
125 | - * @param mixed $sortField (default:id) |
|
124 | + * @param string $table |
|
125 | + * @param string $sortField (default:id) |
|
126 | 126 | * @param mixed bool (default:true) |
127 | 127 | * @return void |
128 | 128 | */ |
@@ -149,8 +149,8 @@ discard block |
||
149 | 149 | * Fetches specified object specified table in database |
150 | 150 | * |
151 | 151 | * @access public |
152 | - * @param mixed $table |
|
153 | - * @param mixed $method (default: null) |
|
152 | + * @param string $table |
|
153 | + * @param string $method (default: null) |
|
154 | 154 | * @param mixed $value |
155 | 155 | * @return void |
156 | 156 | */ |
@@ -199,8 +199,8 @@ discard block |
||
199 | 199 | * doesnt cache |
200 | 200 | * |
201 | 201 | * @access public |
202 | - * @param mixed $table |
|
203 | - * @param mixed $field |
|
202 | + * @param string $table |
|
203 | + * @param string $field |
|
204 | 204 | * @param mixed $value |
205 | 205 | * @param string $sortField (default: 'id') |
206 | 206 | * @param bool $sortAsc (default: true) |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | * Count objects in database. |
232 | 232 | * |
233 | 233 | * @access public |
234 | - * @param mixed $table |
|
234 | + * @param string $table |
|
235 | 235 | * @param mixed $field |
236 | 236 | * @param mixed $val (default: null) |
237 | 237 | * @param bool $like (default: false) |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | * |
318 | 318 | * @access protected |
319 | 319 | * @param mixed $table |
320 | - * @return void |
|
320 | + * @return boolean |
|
321 | 321 | */ |
322 | 322 | protected function cache_check_exceptions ($table) { |
323 | 323 | // define |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | * |
332 | 332 | * @access protected |
333 | 333 | * @param mixed $table |
334 | - * @return void |
|
334 | + * @return string|false |
|
335 | 335 | */ |
336 | 336 | protected function cache_check_add_ip ($table) { |
337 | 337 | // define |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | * |
346 | 346 | * @access protected |
347 | 347 | * @param mixed $table |
348 | - * @return void |
|
348 | + * @return string |
|
349 | 349 | */ |
350 | 350 | protected function cache_set_identifier ($table) { |
351 | 351 | // vlan and subnets have different identifiers |
@@ -510,7 +510,7 @@ discard block |
||
510 | 510 | * |
511 | 511 | * @access public |
512 | 512 | * @param mixed $address |
513 | - * @return mixed IP version |
|
513 | + * @return string IP version |
|
514 | 514 | */ |
515 | 515 | public function identify_address ($address) { |
516 | 516 | # dotted representation |
@@ -530,7 +530,7 @@ discard block |
||
530 | 530 | * |
531 | 531 | * @access public |
532 | 532 | * @param mixed $address |
533 | - * @return void |
|
533 | + * @return string |
|
534 | 534 | */ |
535 | 535 | public function get_ip_version ($address) { |
536 | 536 | return $this->identify_address ($address); |
@@ -542,7 +542,7 @@ discard block |
||
542 | 542 | * @access public |
543 | 543 | * @param mixed $logs |
544 | 544 | * @param bool $changelog |
545 | - * @return void |
|
545 | + * @return string |
|
546 | 546 | */ |
547 | 547 | public function array_to_log ($logs, $changelog = false) { |
548 | 548 | $result = ""; |
@@ -574,7 +574,7 @@ discard block |
||
574 | 574 | * @access public |
575 | 575 | * @param mixed $sec |
576 | 576 | * @param bool $padHours (default: false) |
577 | - * @return void |
|
577 | + * @return string |
|
578 | 578 | */ |
579 | 579 | public function sec2hms($sec, $padHours = false) { |
580 | 580 | // holds formatted string |
@@ -610,7 +610,7 @@ discard block |
||
610 | 610 | * @access public |
611 | 611 | * @param mixed $text |
612 | 612 | * @param int $chars (default: 25) |
613 | - * @return void |
|
613 | + * @return string |
|
614 | 614 | */ |
615 | 615 | public function shorten_text($text, $chars = 25) { |
616 | 616 | //count input text size |
@@ -633,12 +633,12 @@ discard block |
||
633 | 633 | * |
634 | 634 | * @access public |
635 | 635 | * @param mixed $mac |
636 | - * @param string $format (default: 1) |
|
636 | + * @param integer $format (default: 1) |
|
637 | 637 | * 1 : 00:66:23:33:55:66 |
638 | 638 | * 2 : 00-66-23-33-55-66 |
639 | 639 | * 3 : 0066.2333.5566 |
640 | 640 | * 4 : 006623335566 |
641 | - * @return void |
|
641 | + * @return string |
|
642 | 642 | */ |
643 | 643 | public function reformat_mac_address ($mac, $format = 1) { |
644 | 644 | // strip al tags first |
@@ -718,7 +718,7 @@ discard block |
||
718 | 718 | * |
719 | 719 | * @access public |
720 | 720 | * @param mixed $email |
721 | - * @return void |
|
721 | + * @return boolean |
|
722 | 722 | */ |
723 | 723 | public function validate_email($email) { |
724 | 724 | return preg_match("/([\w\-]+\@[\w\-]+\.[\w\-]+)/",$email) ? true : false; |
@@ -730,7 +730,7 @@ discard block |
||
730 | 730 | * @access public |
731 | 731 | * @param mixed $hostname |
732 | 732 | * @param bool $permit_root_domain |
733 | - * @return void |
|
733 | + * @return boolean |
|
734 | 734 | */ |
735 | 735 | public function validate_hostname($hostname, $permit_root_domain=true) { |
736 | 736 | // first validate hostname |
@@ -756,7 +756,7 @@ discard block |
||
756 | 756 | * |
757 | 757 | * @access public |
758 | 758 | * @param mixed $ip |
759 | - * @return void |
|
759 | + * @return boolean |
|
760 | 760 | */ |
761 | 761 | public function validate_ip ($ip) { |
762 | 762 | if(filter_var($ip, FILTER_VALIDATE_IP)===false) { return false; } |
@@ -768,7 +768,7 @@ discard block |
||
768 | 768 | * |
769 | 769 | * @access public |
770 | 770 | * @param mixed $mac |
771 | - * @return void |
|
771 | + * @return boolean |
|
772 | 772 | */ |
773 | 773 | public function validate_mac ($mac) { |
774 | 774 | // first put it to common format (1) |
@@ -784,7 +784,7 @@ discard block |
||
784 | 784 | * |
785 | 785 | * @access public |
786 | 786 | * @param mixed $ipv6 |
787 | - * @return void |
|
787 | + * @return false|string |
|
788 | 788 | */ |
789 | 789 | public function ip2long6 ($ipv6) { |
790 | 790 | if($ipv6 == ".255.255.255") { |
@@ -808,7 +808,7 @@ discard block |
||
808 | 808 | * |
809 | 809 | * @access public |
810 | 810 | * @param mixed $ipv6long |
811 | - * @return void |
|
811 | + * @return string |
|
812 | 812 | */ |
813 | 813 | public function long2ip6($ipv6long) { |
814 | 814 | $bin = gmp_strval(gmp_init($ipv6long,10),2); |
@@ -840,7 +840,7 @@ discard block |
||
840 | 840 | * |
841 | 841 | * @access public |
842 | 842 | * @param mixed $address |
843 | - * @return mixed decimal or dotted |
|
843 | + * @return string decimal or dotted |
|
844 | 844 | */ |
845 | 845 | public function identify_address_format ($address) { |
846 | 846 | return is_numeric($address) ? "decimal" : "dotted"; |
@@ -870,7 +870,7 @@ discard block |
||
870 | 870 | * |
871 | 871 | * @access public |
872 | 872 | * @param mixed $address |
873 | - * @return mixed dotted format |
|
873 | + * @return string dotted format |
|
874 | 874 | */ |
875 | 875 | public function transform_to_dotted ($address) { |
876 | 876 | if ($this->identify_address ($address) == "IPv4" ) { return(long2ip($address)); } |
@@ -882,7 +882,7 @@ discard block |
||
882 | 882 | * |
883 | 883 | * @access public |
884 | 884 | * @param mixed $address |
885 | - * @return int IP address |
|
885 | + * @return string|false IP address |
|
886 | 886 | */ |
887 | 887 | public function transform_to_decimal ($address) { |
888 | 888 | if ($this->identify_address ($address) == "IPv4" ) { return( sprintf("%u", ip2long($address)) ); } |
@@ -894,7 +894,7 @@ discard block |
||
894 | 894 | * |
895 | 895 | * @access public |
896 | 896 | * @param mixed $error_int |
897 | - * @return void |
|
897 | + * @return string |
|
898 | 898 | */ |
899 | 899 | public function json_error_decode ($error_int) { |
900 | 900 | // init |
@@ -917,7 +917,7 @@ discard block |
||
917 | 917 | * @access public |
918 | 918 | * @param bool $rackId (default: false) |
919 | 919 | * @param bool $deviceId (default: false) |
920 | - * @return void |
|
920 | + * @return false|string |
|
921 | 921 | */ |
922 | 922 | public function create_rack_link ($rackId = false, $deviceId = false) { |
923 | 923 | if($rackId===false) { |