Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions build/gen_stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -725,11 +725,7 @@ public function getTypeForDoc(DOMDocument $doc): DOMElement {
}
} else {
$type = $this->types[0];
if ($type->isBuiltin && strtolower($type->name) === "true") {
$name = "bool";
} else {
$name = $type->name;
}
$name = $type->name;

$typeElement = $doc->createElement('type', $name);
}
Expand Down
14 changes: 7 additions & 7 deletions ext/intl/calendar/calendar.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public function after(IntlCalendar $other): bool {}
public function before(IntlCalendar $other): bool {}

/**
* @return bool
* @return true
* @alias intlcal_clear
*/
public function clear(?int $field = null) {} // TODO make return type void
Expand Down Expand Up @@ -341,7 +341,7 @@ public function getMaximum(int $field): int|false {}
public function getMinimalDaysInFirstWeek(): int|false {}

/**
* @return bool
* @return true
* @alias intlcal_set_minimal_days_in_first_week
*/
public function setMinimalDaysInFirstWeek(int $days) {} // TODO make return void
Expand Down Expand Up @@ -432,31 +432,31 @@ public function roll(int $field, $value): bool {}
public function isSet(int $field): bool {}

/**
* @return bool
* @return true
* @alias intlcal_set
*/
public function set(int $year, int $month, int $dayOfMonth = UNKNOWN, int $hour = UNKNOWN, int $minute = UNKNOWN, int $second = UNKNOWN) {} // TODO make return type void

/**
* @return bool
* @return true
* @alias intlcal_set_first_day_of_week
*/
public function setFirstDayOfWeek(int $dayOfWeek) {} // TODO make return type void

/**
* @return bool
* @return true
* @alias intlcal_set_lenient
*/
public function setLenient(bool $lenient) {} // TODO make return type void

/**
* @return bool
* @return true
* @alias intlcal_set_repeated_wall_time_option
*/
public function setRepeatedWallTimeOption(int $option) {} // TODO make return type void

/**
* @return bool
* @return true
* @alias intlcal_set_skipped_wall_time_option
*/
public function setSkippedWallTimeOption(int $option) {} // TODO make return type void
Expand Down
2 changes: 1 addition & 1 deletion ext/intl/calendar/calendar_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions ext/intl/php_intl.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,12 @@ function intlcal_after(IntlCalendar $calendar, IntlCalendar $other): bool {}

function intlcal_before(IntlCalendar $calendar, IntlCalendar $other): bool {}

function intlcal_set(IntlCalendar $calendar, int $year, int $month, int $dayOfMonth = UNKNOWN, int $hour = UNKNOWN, int $minute = UNKNOWN, int $second = UNKNOWN): bool {}
function intlcal_set(IntlCalendar $calendar, int $year, int $month, int $dayOfMonth = UNKNOWN, int $hour = UNKNOWN, int $minute = UNKNOWN, int $second = UNKNOWN): true {}

/** @param int|bool $value */
function intlcal_roll(IntlCalendar $calendar, int $field, $value): bool {}

function intlcal_clear(IntlCalendar $calendar, ?int $field = null): bool {}
function intlcal_clear(IntlCalendar $calendar, ?int $field = null): true {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can see, the following functions also return only true:

  • intlcal_set()
  • intlcal_set_minimal_days_in_first_week()

Copy link
Member Author

@kocsismate kocsismate May 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I amended my first commit to include these two functions/methods as well! Nothing else changed


function intlcal_field_difference(IntlCalendar $calendar, float $timestamp, int $field): int|false {}

Expand All @@ -228,7 +228,7 @@ function intlcal_get_maximum(IntlCalendar $calendar, int $field): int|false {}

function intlcal_get_minimal_days_in_first_week(IntlCalendar $calendar): int|false {}

function intlcal_set_minimal_days_in_first_week(IntlCalendar $calendar, int $days): bool {}
function intlcal_set_minimal_days_in_first_week(IntlCalendar $calendar, int $days): true {}

function intlcal_get_minimum(IntlCalendar $calendar, int $field): int|false {}

Expand All @@ -248,19 +248,19 @@ function intlcal_is_equivalent_to(IntlCalendar $calendar, IntlCalendar $other):

function intlcal_is_weekend(IntlCalendar $calendar, ?float $timestamp = null): bool {}

function intlcal_set_first_day_of_week(IntlCalendar $calendar, int $dayOfWeek): bool {}
function intlcal_set_first_day_of_week(IntlCalendar $calendar, int $dayOfWeek): true {}

function intlcal_set_lenient(IntlCalendar $calendar, bool $lenient): bool {}
function intlcal_set_lenient(IntlCalendar $calendar, bool $lenient): true {}

function intlcal_get_repeated_wall_time_option(IntlCalendar $calendar): int {}

function intlcal_equals(IntlCalendar $calendar, IntlCalendar $other): bool {}

function intlcal_get_skipped_wall_time_option(IntlCalendar $calendar): int {}

function intlcal_set_repeated_wall_time_option(IntlCalendar $calendar, int $option): bool {}
function intlcal_set_repeated_wall_time_option(IntlCalendar $calendar, int $option): true {}

function intlcal_set_skipped_wall_time_option(IntlCalendar $calendar, int $option): bool {}
function intlcal_set_skipped_wall_time_option(IntlCalendar $calendar, int $option): true {}

function intlcal_from_date_time(DateTime|string $datetime, ?string $locale = null): ?IntlCalendar {}

Expand Down
14 changes: 7 additions & 7 deletions ext/intl/php_intl_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions ext/pgsql/pgsql.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ function pg_pconnect(string $connection_string, int $flags = 0): PgSql\Connectio

function pg_connect_poll(PgSql\Connection $connection): int {}

function pg_close(?PgSql\Connection $connection = null): bool {}
function pg_close(?PgSql\Connection $connection = null): true {}

/** @refcount 1 */
function pg_dbname(?PgSql\Connection $connection = null): string {}
Expand Down Expand Up @@ -691,7 +691,7 @@ function pg_getlastoid(PgSql\Result $result): string|int|false {}

function pg_trace(string $filename, string $mode = "w", ?PgSql\Connection $connection = null, int $trace_mode = 0): bool {}

function pg_untrace(?PgSql\Connection $connection = null): bool {}
function pg_untrace(?PgSql\Connection $connection = null): true {}

/**
* @param PgSql\Connection $connection
Expand Down
10 changes: 6 additions & 4 deletions ext/pgsql/pgsql_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions ext/snmp/snmp.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ function snmpset(string $hostname, string $community, array|string $object_id, a

function snmp_get_quick_print(): bool {}

function snmp_set_quick_print(bool $enable): bool {}
function snmp_set_quick_print(bool $enable): true {}

function snmp_set_enum_print(bool $enable): bool {}
function snmp_set_enum_print(bool $enable): true {}

function snmp_set_oid_output_format(int $format): bool {}
function snmp_set_oid_output_format(int $format): true {}

/** @alias snmp_set_oid_output_format */
function snmp_set_oid_numeric_print(int $format): bool {}
Expand Down Expand Up @@ -175,7 +175,7 @@ function snmp3_set(
array|string $object_id, array|string $type, array|string $value,
int $timeout = -1, int $retries = -1): bool {}

function snmp_set_valueretrieval(int $method): bool {}
function snmp_set_valueretrieval(int $method): true {}

function snmp_get_valueretrieval(): int {}

Expand Down
12 changes: 7 additions & 5 deletions ext/snmp/snmp_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions ext/spl/spl_array.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,22 @@ public function getFlags(): int {}
public function setFlags(int $flags): void {}

/** @tentative-return-type */
public function asort(int $flags = SORT_REGULAR): bool {}
public function asort(int $flags = SORT_REGULAR): true {}

/** @tentative-return-type */
public function ksort(int $flags = SORT_REGULAR): bool {}
public function ksort(int $flags = SORT_REGULAR): true {}

/** @tentative-return-type */
public function uasort(callable $callback): bool {}
public function uasort(callable $callback): true {}

/** @tentative-return-type */
public function uksort(callable $callback): bool {}
public function uksort(callable $callback): true {}

/** @tentative-return-type */
public function natsort(): bool {}
public function natsort(): true {}

/** @tentative-return-type */
public function natcasesort(): bool {}
public function natcasesort(): true {}

/** @tentative-return-type */
public function unserialize(string $data): void {}
Expand Down Expand Up @@ -163,37 +163,37 @@ public function setFlags(int $flags): void {}
* @tentative-return-type
* @implementation-alias ArrayObject::asort
*/
public function asort(int $flags = SORT_REGULAR): bool {}
public function asort(int $flags = SORT_REGULAR): true {}

/**
* @tentative-return-type
* @implementation-alias ArrayObject::ksort
*/
public function ksort(int $flags = SORT_REGULAR): bool {}
public function ksort(int $flags = SORT_REGULAR): true {}

/**
* @tentative-return-type
* @implementation-alias ArrayObject::uasort
*/
public function uasort(callable $callback): bool {}
public function uasort(callable $callback): true {}

/**
* @tentative-return-type
* @implementation-alias ArrayObject::uksort
*/
public function uksort(callable $callback): bool {}
public function uksort(callable $callback): true {}

/**
* @tentative-return-type
* @implementation-alias ArrayObject::natsort
*/
public function natsort(): bool {}
public function natsort(): true {}

/**
* @tentative-return-type
* @implementation-alias ArrayObject::natcasesort
*/
public function natcasesort(): bool {}
public function natcasesort(): true {}

/**
* @tentative-return-type
Expand Down
Loading