@@ -6,6 +6,9 @@ discard block |
||
6 | 6 | define('MYSQL_CLIENT_INTERACTIVE', MYSQLI_CLIENT_INTERACTIVE); |
7 | 7 | define('MYSQL_CLIENT_SSL', MYSQLI_CLIENT_SSL); |
8 | 8 | |
9 | + /** |
|
10 | + * @param string $hostname |
|
11 | + */ |
|
9 | 12 | function mysql_connect( |
10 | 13 | $hostname = null, |
11 | 14 | $username = null, |
@@ -239,6 +242,9 @@ discard block |
||
239 | 242 | return mysqli_fetch_array($result); |
240 | 243 | } |
241 | 244 | |
245 | + /** |
|
246 | + * @param mysqli_result $result |
|
247 | + */ |
|
242 | 248 | function mysql_fetch_assoc($result) /* : array|null */ |
243 | 249 | { |
244 | 250 | if (\Dshafik\MySQL::checkValidResult($result, __FUNCTION__)) { |
@@ -510,6 +516,9 @@ discard block |
||
510 | 516 | static public $last_connection = null; |
511 | 517 | static public $connections = []; |
512 | 518 | |
519 | + /** |
|
520 | + * @param string $func |
|
521 | + */ |
|
513 | 522 | static public function getConnection($link = null, $func = null) |
514 | 523 | { |
515 | 524 | if ($link !== null) { |
@@ -528,6 +537,9 @@ discard block |
||
528 | 537 | return static::$last_connection; |
529 | 538 | } |
530 | 539 | |
540 | + /** |
|
541 | + * @param string $what |
|
542 | + */ |
|
531 | 543 | static public function mysql_field_info(\mysqli_result $result, $field, $what) |
532 | 544 | { |
533 | 545 | if (!\mysqli_data_seek($result, $field)) { |
@@ -604,6 +616,9 @@ discard block |
||
604 | 616 | return false; |
605 | 617 | } |
606 | 618 | |
619 | + /** |
|
620 | + * @param string $function |
|
621 | + */ |
|
607 | 622 | static function checkValidResult($result, $function) |
608 | 623 | { |
609 | 624 | if (!($result instanceof \mysqli_result)) { |
@@ -615,6 +630,9 @@ discard block |
||
615 | 630 | } |
616 | 631 | } |
617 | 632 | |
633 | + /** |
|
634 | + * @param string|null $what |
|
635 | + */ |
|
618 | 636 | protected static function getFieldLength($what, $type) |
619 | 637 | { |
620 | 638 | if (is_numeric($what)) { |
@@ -657,6 +675,9 @@ discard block |
||
657 | 675 | } |
658 | 676 | } |
659 | 677 | |
678 | + /** |
|
679 | + * @param string|null $what |
|
680 | + */ |
|
660 | 681 | protected static function getFieldType($what) |
661 | 682 | { |
662 | 683 | switch (strtolower($what)) { |