Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Gina Peter Banyard <girgias@php.net>
  • Loading branch information
TimWolla and Girgias committed Jul 8, 2024
1 parent ba9e932 commit 5fe18aa
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
8 changes: 4 additions & 4 deletions ext/date/php_date.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,13 @@ function checkdate(int $month, int $day, int $year): bool {}
/**
* @refcount 1
*/
#[\Deprecated]
#[\Deprecated(since: '8.1', message: 'use the IntlDateFormatter::format() method instead')]
function strftime(string $format, ?int $timestamp = null): string|false {}

/**
* @refcount 1
*/
#[\Deprecated]
#[\Deprecated(since: '8.1', message: 'use the IntlDateFormatter::format() method instead')]
function gmstrftime(string $format, ?int $timestamp = null): string|false {}

function time(): int {}
Expand Down Expand Up @@ -261,7 +261,7 @@ function date_default_timezone_get(): string {}
/**
* @refcount 1
*/
#[\Deprecated]
#[\Deprecated(message: 'Use date_sun_info() instead', since: '8.1')]
function date_sunrise(
int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING,
?float $latitude = null, ?float $longitude = null, ?float $zenith = null,
Expand All @@ -270,7 +270,7 @@ function date_sunrise(
/**
* @refcount 1
*/
#[\Deprecated]
#[\Deprecated(message: 'Use date_sun_info() instead', since: '8.1')]
function date_sunset(
int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING,
?float $latitude = null, ?float $longitude = null, ?float $zenith = null,
Expand Down
4 changes: 2 additions & 2 deletions ext/enchant/enchant.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function enchant_dict_add(EnchantDictionary $dictionary, string $word): void {}
/**
* @alias enchant_dict_add
*/
#[\Deprecated(since: '8.1')]
#[\Deprecated(since: '8.1', message: 'use enchant_dict_add() instead')]
function enchant_dict_add_to_personal(EnchantDictionary $dictionary, string $word): void {}

function enchant_dict_add_to_session(EnchantDictionary $dictionary, string $word): void {}
Expand All @@ -100,7 +100,7 @@ function enchant_dict_is_added(EnchantDictionary $dictionary, string $word): boo
/**
* @alias enchant_dict_is_added
*/
#[\Deprecated(since: '8.1')]
#[\Deprecated(since: '8.1', message: 'use enchant_dict_is_added() instead')]
function enchant_dict_is_in_session(EnchantDictionary $dictionary, string $word): bool {}

function enchant_dict_store_replacement(EnchantDictionary $dictionary, string $misspelled, string $correct): void {}
Expand Down
4 changes: 2 additions & 2 deletions ext/intl/php_intl.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ function intlcal_after(IntlCalendar $calendar, IntlCalendar $other): bool {}

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

#[\Deprecated(since: '8.4')]
#[\Deprecated(message: 'Use IntlCalendar::set(), IntlCalendar::setDate(), or IntlCalendar::setDateTime() instead', since: '8.4')]
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 */
Expand Down Expand Up @@ -279,7 +279,7 @@ function intlcal_get_error_message(IntlCalendar $calendar): string|false {}
* @param int $minute
* @param int $second
*/
#[\Deprecated(since: '8.4')]
#[\Deprecated(message: 'Use IntlGregorianCalendar::__construct(), IntlGregorianCalendar::createFromDate(), or IntlGregorianCalendar::createFromDateTime() instead', since: '8.4')]
function intlgregcal_create_instance($timezoneOrYear = UNKNOWN, $localeOrMonth = UNKNOWN, $day = UNKNOWN, $hour = UNKNOWN, $minute = UNKNOWN, $second = UNKNOWN): ?IntlGregorianCalendar {}

function intlgregcal_set_gregorian_change(IntlGregorianCalendar $calendar, float $timestamp): bool {}
Expand Down
6 changes: 3 additions & 3 deletions ext/openssl/openssl.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ function openssl_x509_checkpurpose(OpenSSLCertificate|string $certificate, int $

function openssl_x509_read(OpenSSLCertificate|string $certificate): OpenSSLCertificate|false {}

#[\Deprecated]
#[\Deprecated(message: 'OpenSSLCertificate object is freed automatically', since: '8.0')]
function openssl_x509_free(OpenSSLCertificate $certificate): void {}

/**
Expand Down Expand Up @@ -507,13 +507,13 @@ function openssl_pkey_get_public($public_key): OpenSSLAsymmetricKey|false {}
*/
function openssl_get_publickey($public_key): OpenSSLAsymmetricKey|false {}

#[\Deprecated]
#[\Deprecated(message: 'OpenSSLAsymmetricKey object is freed automatically', since: '8.0')]
function openssl_pkey_free(OpenSSLAsymmetricKey $key): void {}

/**
* @alias openssl_pkey_free
*/
#[\Deprecated]
#[\Deprecated(message: 'OpenSSLAsymmetricKey object is freed automatically', since: '8.0')]
function openssl_free_key(OpenSSLAsymmetricKey $key): void {}

/**
Expand Down
4 changes: 2 additions & 2 deletions ext/pgsql/pgsql.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ function pg_field_prtlen(PgSql\Result $result, $row, string|int $field = UNKNOWN
/**
* @param string|int $row
*/
#[\Deprecated]
#[\Deprecated(since: '8.0', message: 'use pg_field_prtlen() instead')]
function pg_fieldprtlen(PgSql\Result $result, $row, string|int $field = UNKNOWN): int|false {}

/** @param string|int|null $row */
Expand All @@ -675,7 +675,7 @@ function pg_field_is_null(PgSql\Result $result, $row, string|int $field = UNKNOW
/**
* @param string|int $row
*/
#[\Deprecated]
#[\Deprecated(since: '8.0', message: 'use pg_field_is_null() instead')]
function pg_fieldisnull(PgSql\Result $result, $row, string|int $field = UNKNOWN): int|false {}

function pg_free_result(PgSql\Result $result): bool {}
Expand Down
2 changes: 1 addition & 1 deletion ext/shmop/shmop.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function shmop_open(int $key, string $mode, int $permissions, int $size): Shmop|

function shmop_read(Shmop $shmop, int $offset, int $size): string {}

#[\Deprecated]
#[\Deprecated(message: 'Shmop object is freed automatically', since: '8.0')]
function shmop_close(Shmop $shmop): void {}

function shmop_size(Shmop $shmop): int {}
Expand Down
6 changes: 3 additions & 3 deletions ext/standard/basic_functions.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -2138,7 +2138,7 @@ function crypt(#[\SensitiveParameter] string $string, string $salt): string {}
* @return array<string, int|string>|false
* @refcount 1
*/
#[\Deprecated]
#[\Deprecated(since: '8.2', message: 'use date_parse_from_format() (for locale-independent parsing), or IntlDateFormatter::parse() (for locale-dependent parsing) instead')]
function strptime(string $timestamp, string $format): array|false {}
#endif

Expand Down Expand Up @@ -2656,14 +2656,14 @@ function substr_compare(string $haystack, string $needle, int $offset, ?int $len
* @compile-time-eval
* @refcount 1
*/
#[\Deprecated]
#[\Deprecated(since: '8.2', message: 'visit the php.net documentation for various alternatives')]
function utf8_encode(string $string): string {}

/**
* @compile-time-eval
* @refcount 1
*/
#[\Deprecated]
#[\Deprecated(since: '8.2', message: 'visit the php.net documentation for various alternatives')]
function utf8_decode(string $string): string {}

/* dir.c */
Expand Down

0 comments on commit 5fe18aa

Please sign in to comment.