Skip to content

Commit 16d5b01

Browse files
devnixondrejmirtes
authored andcommitted
More concrete return types for some database functions
1 parent 49641e2 commit 16d5b01

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

resources/functionMap.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1659,8 +1659,8 @@
16591659
'db2_escape_string' => ['string', 'string_literal'=>'string'],
16601660
'db2_exec' => ['resource|false', 'connection'=>'resource', 'statement'=>'string', 'options='=>'array'],
16611661
'db2_execute' => ['bool', 'stmt'=>'resource', 'parameters='=>'array'],
1662-
'db2_fetch_array' => ['array|false', 'stmt'=>'resource', 'row_number='=>'int'],
1663-
'db2_fetch_assoc' => ['array|false', 'stmt'=>'resource', 'row_number='=>'int'],
1662+
'db2_fetch_array' => ['non-empty-list<mixed>|false', 'stmt'=>'resource', 'row_number='=>'int'],
1663+
'db2_fetch_assoc' => ['non-empty-array<string,mixed>|false', 'stmt'=>'resource', 'row_number='=>'int'],
16641664
'db2_fetch_both' => ['array|false', 'stmt'=>'resource', 'row_number='=>'int'],
16651665
'db2_fetch_object' => ['stdClass|false', 'stmt'=>'resource', 'row_number='=>'int'],
16661666
'db2_fetch_row' => ['bool', 'stmt'=>'resource', 'row_number='=>'int'],
@@ -8764,15 +8764,15 @@
87648764
'pg_escape_string\'1' => ['string', 'data'=>'string'],
87658765
'pg_execute' => ['resource|false', 'connection'=>'resource', 'stmtname'=>'string', 'params'=>'array'],
87668766
'pg_execute\'1' => ['resource|false', 'stmtname'=>'string', 'params'=>'array'],
8767-
'pg_fetch_all' => ['array|false', 'result'=>'resource', 'result_type='=>'int'],
8767+
'pg_fetch_all' => ['array<non-empty-list<string|null>>', 'result'=>'resource', 'result_type='=>'int'],
87688768
'pg_fetch_all_columns' => ['array|false', 'result'=>'resource', 'column_number='=>'int'],
87698769
'pg_fetch_array' => ['array|false', 'result'=>'resource', 'row='=>'?int', 'result_type='=>'int'],
8770-
'pg_fetch_assoc' => ['array|false', 'result'=>'resource', 'row='=>'?int'],
8770+
'pg_fetch_assoc' => ['non-empty-array<string,mixed>|false', 'result'=>'resource', 'row='=>'?int'],
87718771
'pg_fetch_object' => ['object|false', 'result'=>'', 'row='=>'?int', 'result_type='=>'int'],
87728772
'pg_fetch_object\'1' => ['object', 'result'=>'', 'row='=>'?int', 'class_name='=>'string', 'ctor_params='=>'array'],
87738773
'pg_fetch_result' => ['', 'result'=>'', 'field_name'=>'string|int'],
87748774
'pg_fetch_result\'1' => ['', 'result'=>'', 'row_number'=>'int', 'field_name'=>'string|int'],
8775-
'pg_fetch_row' => ['array|false', 'result'=>'resource', 'row='=>'?int', 'result_type='=>'int'],
8775+
'pg_fetch_row' => ['non-empty-list<mixed>|false', 'result'=>'resource', 'row='=>'?int', 'result_type='=>'int'],
87768776
'pg_field_is_null' => ['int|false', 'result'=>'', 'field_name_or_number'=>'string|int'],
87778777
'pg_field_is_null\'1' => ['int', 'result'=>'', 'row'=>'int', 'field_name_or_number'=>'string|int'],
87788778
'pg_field_name' => ['string|false', 'result'=>'resource', 'field_number'=>'int'],

0 commit comments

Comments
 (0)