Skip to content

Commit 7fc0829

Browse files
authored
Merge pull request #11 from moufmouf/fix_optional_no_default_value_issue
Fixing a problem with optional with no default value parameters
2 parents 2392b5b + bc7a983 commit 7fc0829

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+203
-203
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ script:
4646
fi
4747
4848
after_script:
49-
- travis_retry php vendor/bin/php-coveralls
49+
- cd generator && travis_retry php vendor/bin/php-coveralls -v

generated/bcompiler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ function bcompiler_read($filehandle): void
8181
* @throws Exceptions\BcompilerException
8282
*
8383
*/
84-
function bcompiler_write_class($filehandle, string $className, string $extends): void
84+
function bcompiler_write_class($filehandle, string $className, string $extends = null): void
8585
{
8686
error_clear_last();
8787
if ($extends !== null) {
@@ -200,7 +200,7 @@ function bcompiler_write_functions_from_file($filehandle, string $fileName): voi
200200
* @throws Exceptions\BcompilerException
201201
*
202202
*/
203-
function bcompiler_write_header($filehandle, string $write_ver): void
203+
function bcompiler_write_header($filehandle, string $write_ver = null): void
204204
{
205205
error_clear_last();
206206
if ($write_ver !== null) {

generated/bzip2.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ function bzread($bz, int $length = 1024): string
8282
* @throws Exceptions\Bzip2Exception
8383
*
8484
*/
85-
function bzwrite($bz, string $data, int $length): int
85+
function bzwrite($bz, string $data, int $length = null): int
8686
{
8787
error_clear_last();
8888
if ($length !== null) {

generated/com.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* @throws Exceptions\ComException
2525
*
2626
*/
27-
function com_event_sink(variant $comobject, object $sinkobject, $sinkinterface): void
27+
function com_event_sink(variant $comobject, object $sinkobject, $sinkinterface = null): void
2828
{
2929
error_clear_last();
3030
if ($sinkinterface !== null) {
@@ -115,7 +115,7 @@ function com_load_typelib(string $typelib_name, bool $case_insensitive = true):
115115
* @throws Exceptions\ComException
116116
*
117117
*/
118-
function com_print_typeinfo(object $comobject, string $dispinterface, bool $wantsink = false): void
118+
function com_print_typeinfo(object $comobject, string $dispinterface = null, bool $wantsink = false): void
119119
{
120120
error_clear_last();
121121
if ($wantsink !== false) {

generated/crack.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* @throws Exceptions\CrackException
1212
*
1313
*/
14-
function crack_closedict($dictionary): void
14+
function crack_closedict($dictionary = null): void
1515
{
1616
error_clear_last();
1717
if ($dictionary !== null) {

generated/cyrus.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function cyrus_close($connection): void
4747
* @throws Exceptions\CyrusException
4848
*
4949
*/
50-
function cyrus_connect(string $host, string $port, int $flags)
50+
function cyrus_connect(string $host = null, string $port = null, int $flags = null)
5151
{
5252
error_clear_last();
5353
if ($flags !== null) {

generated/dba.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ function dba_nextkey($handle): string
208208
* @throws Exceptions\DbaException
209209
*
210210
*/
211-
function dba_open(string $path, string $mode, string $handler, ...$params)
211+
function dba_open(string $path, string $mode, string $handler = null, ...$params)
212212
{
213213
error_clear_last();
214214
if ($params !== null) {
@@ -262,7 +262,7 @@ function dba_optimize($handle): void
262262
* @throws Exceptions\DbaException
263263
*
264264
*/
265-
function dba_popen(string $path, string $mode, string $handler, ...$params)
265+
function dba_popen(string $path, string $mode, string $handler = null, ...$params)
266266
{
267267
error_clear_last();
268268
if ($params !== null) {

generated/dbx.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
* @throws Exceptions\DbxException
109109
*
110110
*/
111-
function dbx_connect($module, string $host, string $database, string $username, string $password, int $persistent): object
111+
function dbx_connect($module, string $host, string $database, string $username, string $password, int $persistent = null): object
112112
{
113113
error_clear_last();
114114
if ($persistent !== null) {

generated/dir.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function chroot(string $directory): void
5656
* @throws Exceptions\DirException
5757
*
5858
*/
59-
function readdir($dir_handle): string
59+
function readdir($dir_handle = null): string
6060
{
6161
error_clear_last();
6262
if ($dir_handle !== null) {
@@ -83,7 +83,7 @@ function readdir($dir_handle): string
8383
* @throws Exceptions\DirException
8484
*
8585
*/
86-
function rewinddir($dir_handle): void
86+
function rewinddir($dir_handle = null): void
8787
{
8888
error_clear_last();
8989
if ($dir_handle !== null) {

generated/eio.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ function eio_fdatasync($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = NUL
497497
* @throws Exceptions\EioException
498498
*
499499
*/
500-
function eio_fstat($fd, int $pri, callable $callback, $data)
500+
function eio_fstat($fd, int $pri, callable $callback, $data = null)
501501
{
502502
error_clear_last();
503503
if ($data !== null) {
@@ -550,7 +550,7 @@ function eio_fstat($fd, int $pri, callable $callback, $data)
550550
* @throws Exceptions\EioException
551551
*
552552
*/
553-
function eio_fstatvfs($fd, int $pri, callable $callback, $data)
553+
function eio_fstatvfs($fd, int $pri, callable $callback, $data = null)
554554
{
555555
error_clear_last();
556556
if ($data !== null) {
@@ -1567,7 +1567,7 @@ function eio_seek($fd, int $offset, int $whence, int $pri = EIO_PRI_DEFAULT, cal
15671567
* @throws Exceptions\EioException
15681568
*
15691569
*/
1570-
function eio_sendfile($out_fd, $in_fd, int $offset, int $length, int $pri, callable $callback, string $data)
1570+
function eio_sendfile($out_fd, $in_fd, int $offset, int $length, int $pri = null, callable $callback = null, string $data = null)
15711571
{
15721572
error_clear_last();
15731573
if ($data !== null) {
@@ -1675,7 +1675,7 @@ function eio_stat(string $path, int $pri, callable $callback, $data = NULL)
16751675
* @throws Exceptions\EioException
16761676
*
16771677
*/
1678-
function eio_statvfs(string $path, int $pri, callable $callback, $data)
1678+
function eio_statvfs(string $path, int $pri, callable $callback, $data = null)
16791679
{
16801680
error_clear_last();
16811681
if ($data !== null) {

0 commit comments

Comments
 (0)