Skip to content

Commit

Permalink
Update db2_autocommit() in callmaps
Browse files Browse the repository at this point in the history
  • Loading branch information
phansys committed Feb 16, 2023
1 parent c035db5 commit e3c4145
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 2 deletions.
1 change: 1 addition & 0 deletions config.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,7 @@
<xs:enumeration value="ffi"/>
<xs:enumeration value="geos"/>
<xs:enumeration value="gmp"/>
<xs:enumeration value="ibm_db2"/>
<xs:enumeration value="mongodb"/>
<xs:enumeration value="mysqli"/>
<xs:enumeration value="pdo"/>
Expand Down
2 changes: 1 addition & 1 deletion dictionaries/CallMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -1406,7 +1406,7 @@
'DateTimeZone::getTransitions' => ['list<array{ts: int, time: string, offset: int, isdst: bool, abbr: string}>|false', 'timestamp_begin='=>'int', 'timestamp_end='=>'int'],
'DateTimeZone::listAbbreviations' => ['array<string, list<array{dst: bool, offset: int, timezone_id: string|null}>>'],
'DateTimeZone::listIdentifiers' => ['list<string>', 'timezoneGroup='=>'int', 'countryCode='=>'string|null'],
'db2_autocommit' => ['mixed', 'connection'=>'resource', 'value='=>'int'],
'db2_autocommit' => ['0|1|bool', 'connection'=>'resource', 'value='=>'0|1'],
'db2_bind_param' => ['bool', 'stmt'=>'resource', 'parameter_number'=>'int', 'variable_name'=>'string', 'parameter_type='=>'int', 'data_type='=>'int', 'precision='=>'int', 'scale='=>'int'],
'db2_client_info' => ['object|false', 'connection'=>'resource'],
'db2_close' => ['bool', 'connection'=>'resource'],
Expand Down
4 changes: 4 additions & 0 deletions dictionaries/CallMap_81_delta.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@
'old' => ['DOMDocumentFragment|false'],
'new' => ['DOMDocumentFragment'],
],
'db2_autocommit' => [
'old' => ['0|1|bool', 'connection'=>'resource', 'value='=>'bool'],
'new' => ['0|1|bool', 'connection'=>'resource', 'value='=>'0|1'],
],
'finfo_buffer' => [
'old' => ['string|false', 'finfo'=>'resource', 'string'=>'string', 'flags='=>'int', 'context='=>'resource'],
'new' => ['string|false', 'finfo'=>'finfo', 'string'=>'string', 'flags='=>'int', 'context='=>'resource'],
Expand Down
2 changes: 1 addition & 1 deletion dictionaries/CallMap_historical.php
Original file line number Diff line number Diff line change
Expand Up @@ -9853,7 +9853,7 @@
'datefmt_set_lenient' => ['void', 'formatter'=>'IntlDateFormatter', 'lenient'=>'bool'],
'datefmt_set_pattern' => ['bool', 'formatter'=>'IntlDateFormatter', 'pattern'=>'string'],
'datefmt_set_timezone' => ['false|null', 'formatter'=>'IntlDateFormatter', 'timezone'=>'IntlTimeZone|DateTimeZone|string|null'],
'db2_autocommit' => ['mixed', 'connection'=>'resource', 'value='=>'int'],
'db2_autocommit' => ['0|1|bool', 'connection'=>'resource', 'value='=>'bool'],
'db2_bind_param' => ['bool', 'stmt'=>'resource', 'parameter_number'=>'int', 'variable_name'=>'string', 'parameter_type='=>'int', 'data_type='=>'int', 'precision='=>'int', 'scale='=>'int'],
'db2_client_info' => ['object|false', 'connection'=>'resource'],
'db2_close' => ['bool', 'connection'=>'resource'],
Expand Down
2 changes: 2 additions & 0 deletions src/Psalm/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,7 @@ class Config
"ffi" => false,
"geos" => false,
"gmp" => false,
"ibm_db2" => false,
"mongodb" => false,
"mysqli" => false,
"pdo" => false,
Expand Down Expand Up @@ -645,6 +646,7 @@ class Config
'gettext',
'gmp',
'hash',
'ibm_db2',
'iconv',
'imap',
'intl',
Expand Down
9 changes: 9 additions & 0 deletions stubs/extensions/ibm_db2.phpstub
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

/**
* @param resource $connection
* @param 0|1 $value
*
* @return (func_num_args() > 1 ? bool : (0|1))
*/
function db2_autocommit($connection, int $value = null): int|bool {}

0 comments on commit e3c4145

Please sign in to comment.