Skip to content

Commit 8a25ff3

Browse files
committed
Remove parameter attributes
1 parent 5389907 commit 8a25ff3

File tree

2 files changed

+37
-33
lines changed

2 files changed

+37
-33
lines changed

Diff for: src/Visitor.php

+4
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ public function enterNode(Node $node)
6969

7070
parent::enterNode($node);
7171

72+
if ($node instanceof Node\Param && property_exists($node, 'attrGroups')) {
73+
$node->attrGroups = [];
74+
}
75+
7276
if (! ($node instanceof Function_) && ! ($node instanceof ClassMethod) && ! ($node instanceof Property) && ! ($node instanceof Class_)) {
7377
return null;
7478
}

Diff for: wordpress-stubs.php

+33-33
Original file line numberDiff line numberDiff line change
@@ -7338,7 +7338,7 @@ public function cmpr_strlen($a, $b)
73387338
* @param bool $head
73397339
* @return array
73407340
*/
7341-
public function get_page($url, $username = '', #[\SensitiveParameter] $password = '', $head = \false)
7341+
public function get_page($url, $username = '', $password = '', $head = \false)
73427342
{
73437343
}
73447344
/**
@@ -30023,7 +30023,7 @@ protected static function set_user_application_passwords($user_id, $passwords)
3002330023
* @param string $raw_password The raw application password.
3002430024
* @return string The chunked password.
3002530025
*/
30026-
public static function chunk_password(#[\SensitiveParameter] $raw_password)
30026+
public static function chunk_password($raw_password)
3002730027
{
3002830028
}
3002930029
/**
@@ -30034,7 +30034,7 @@ public static function chunk_password(#[\SensitiveParameter] $raw_password)
3003430034
* @param string $password Plaintext password.
3003530035
* @return string Hashed password.
3003630036
*/
30037-
public static function hash_password(#[\SensitiveParameter] string $password) : string
30037+
public static function hash_password(string $password) : string
3003830038
{
3003930039
}
3004030040
/**
@@ -30046,7 +30046,7 @@ public static function hash_password(#[\SensitiveParameter] string $password) :
3004630046
* @param string $hash Hash of the password to check against.
3004730047
* @return bool Whether the password matches the hashed password.
3004830048
*/
30049-
public static function check_password(#[\SensitiveParameter] string $password, string $hash) : bool
30049+
public static function check_password(string $password, string $hash) : bool
3005030050
{
3005130051
}
3005230052
}
@@ -55576,7 +55576,7 @@ public function addTwoNumbers($args)
5557655576
* @param string $password User's password.
5557755577
* @return WP_User|false WP_User object if authentication passed, false otherwise.
5557855578
*/
55579-
public function login($username, #[\SensitiveParameter] $password)
55579+
public function login($username, $password)
5558055580
{
5558155581
}
5558255582
/**
@@ -55590,7 +55590,7 @@ public function login($username, #[\SensitiveParameter] $password)
5559055590
* @param string $password User's password.
5559155591
* @return bool Whether authentication passed.
5559255592
*/
55593-
public function login_pass_ok($username, #[\SensitiveParameter] $password)
55593+
public function login_pass_ok($username, $password)
5559455594
{
5559555595
}
5559655596
/**
@@ -58602,7 +58602,7 @@ class wpdb
5860258602
* @param string $dbhost Database host.
5860358603
* @phpstan-return void
5860458604
*/
58605-
public function __construct($dbuser, #[\SensitiveParameter] $dbpassword, $dbname, $dbhost)
58605+
public function __construct($dbuser, $dbpassword, $dbname, $dbhost)
5860658606
{
5860758607
}
5860858608
/**
@@ -77307,7 +77307,7 @@ public function check_username($value, $request, $param)
7730777307
* @param string $param The parameter name.
7730877308
* @return string|WP_Error The sanitized password, if valid, otherwise an error.
7730977309
*/
77310-
public function check_user_password(#[\SensitiveParameter] $value, $request, $param)
77310+
public function check_user_password($value, $request, $param)
7731177311
{
7731277312
}
7731377313
/**
@@ -91380,7 +91380,7 @@ function wp_get_auto_update_message()
9138091380
* password_message: string,
9138191381
* }
9138291382
*/
91383-
function wp_install($blog_title, $user_name, $user_email, $is_public, $deprecated = '', #[\SensitiveParameter] $user_password = '', $language = '')
91383+
function wp_install($blog_title, $user_name, $user_email, $is_public, $deprecated = '', $user_password = '', $language = '')
9138491384
{
9138591385
}
9138691386
/**
@@ -91428,7 +91428,7 @@ function wp_install_maybe_enable_pretty_permalinks()
9142891428
* @param string $password Administrator's password. Note that a placeholder message is
9142991429
* usually passed instead of the actual password.
9143091430
*/
91431-
function wp_new_blog_notification($blog_title, $blog_url, $user_id, #[\SensitiveParameter] $password)
91431+
function wp_new_blog_notification($blog_title, $blog_url, $user_id, $password)
9143291432
{
9143391433
}
9143491434
/**
@@ -114231,7 +114231,7 @@ function wp_is_heic_image_mime_type($mime_type)
114231114231
* @param string $message The message to hash.
114232114232
* @return string The hash of the message.
114233114233
*/
114234-
function wp_fast_hash(#[\SensitiveParameter] string $message) : string
114234+
function wp_fast_hash(string $message) : string
114235114235
{
114236114236
}
114237114237
/**
@@ -114249,7 +114249,7 @@ function wp_fast_hash(#[\SensitiveParameter] string $message) : string
114249114249
* @param string $hash Hash of the message to check against.
114250114250
* @return bool Whether the message matches the hashed message.
114251114251
*/
114252-
function wp_verify_fast_hash(#[\SensitiveParameter] string $message, string $hash) : bool
114252+
function wp_verify_fast_hash(string $message, string $hash) : bool
114253114253
{
114254114254
}
114255114255
/**
@@ -125323,7 +125323,7 @@ function wpmu_signup_user($user, $user_email, $meta = array())
125323125323
* @param array $meta Optional. Signup meta data. By default, contains the requested privacy setting and lang_id.
125324125324
* @return bool
125325125325
*/
125326-
function wpmu_signup_blog_notification($domain, $path, $title, $user_login, $user_email, #[\SensitiveParameter] $key, $meta = array())
125326+
function wpmu_signup_blog_notification($domain, $path, $title, $user_login, $user_email, $key, $meta = array())
125327125327
{
125328125328
}
125329125329
/**
@@ -125348,7 +125348,7 @@ function wpmu_signup_blog_notification($domain, $path, $title, $user_login, $use
125348125348
* @param array $meta Optional. Signup meta data. Default empty array.
125349125349
* @return bool
125350125350
*/
125351-
function wpmu_signup_user_notification($user_login, $user_email, #[\SensitiveParameter] $key, $meta = array())
125351+
function wpmu_signup_user_notification($user_login, $user_email, $key, $meta = array())
125352125352
{
125353125353
}
125354125354
/**
@@ -125366,7 +125366,7 @@ function wpmu_signup_user_notification($user_login, $user_email, #[\SensitivePar
125366125366
* @param string $key The activation key provided to the user.
125367125367
* @return array|WP_Error An array containing information about the activated user and/or blog.
125368125368
*/
125369-
function wpmu_activate_signup(#[\SensitiveParameter] $key)
125369+
function wpmu_activate_signup($key)
125370125370
{
125371125371
}
125372125372
/**
@@ -125398,7 +125398,7 @@ function wp_delete_signup_on_user_delete($id, $reassign, $user)
125398125398
* @param string $email The new user's email address.
125399125399
* @return int|false Returns false on failure, or int $user_id on success.
125400125400
*/
125401-
function wpmu_create_user($user_name, #[\SensitiveParameter] $password, $email)
125401+
function wpmu_create_user($user_name, $password, $email)
125402125402
{
125403125403
}
125404125404
/**
@@ -125498,7 +125498,7 @@ function domain_exists($domain, $path, $network_id = 1)
125498125498
* @param array $meta Optional. Signup meta data. By default, contains the requested privacy setting and lang_id.
125499125499
* @return bool Whether the email notification was sent.
125500125500
*/
125501-
function wpmu_welcome_notification($blog_id, $user_id, #[\SensitiveParameter] $password, $title, $meta = array())
125501+
function wpmu_welcome_notification($blog_id, $user_id, $password, $title, $meta = array())
125502125502
{
125503125503
}
125504125504
/**
@@ -125532,7 +125532,7 @@ function wpmu_new_site_admin_notification($site_id, $user_id)
125532125532
* @param array $meta Optional. Signup meta data. Default empty array.
125533125533
* @return bool
125534125534
*/
125535-
function wpmu_welcome_user_notification($user_id, #[\SensitiveParameter] $password, $meta = array())
125535+
function wpmu_welcome_user_notification($user_id, $password, $meta = array())
125536125536
{
125537125537
}
125538125538
/**
@@ -125721,7 +125721,7 @@ function add_existing_user_to_blog($details = \false)
125721125721
* @param string $password User password. Ignored.
125722125722
* @param array $meta Signup meta data.
125723125723
*/
125724-
function add_new_user_to_blog($user_id, #[\SensitiveParameter] $password, $meta)
125724+
function add_new_user_to_blog($user_id, $password, $meta)
125725125725
{
125726125726
}
125727125727
/**
@@ -128214,7 +128214,7 @@ function get_user_by_email($email)
128214128214
* @param string $siteurl Optional. Will be used instead of SITECOOKIEPATH if set
128215128215
* @param bool $remember Optional. Remember that the user is logged in
128216128216
*/
128217-
function wp_setcookie($username, #[\SensitiveParameter] $password = '', $already_md5 = \false, $home = '', $siteurl = '', $remember = \false)
128217+
function wp_setcookie($username, $password = '', $already_md5 = \false, $home = '', $siteurl = '', $remember = \false)
128218128218
{
128219128219
}
128220128220
/**
@@ -128262,7 +128262,7 @@ function wp_get_cookie_login()
128262128262
* @param string $deprecated Not used
128263128263
* @return bool True on successful check, false on login failure.
128264128264
*/
128265-
function wp_login($username, #[\SensitiveParameter] $password, $deprecated = '')
128265+
function wp_login($username, $password, $deprecated = '')
128266128266
{
128267128267
}
128268128268
/**
@@ -128383,7 +128383,7 @@ function wp_mail($to, $subject, $message, $headers = '', $attachments = array())
128383128383
* @return WP_User|WP_Error WP_User object if the credentials are valid,
128384128384
* otherwise WP_Error.
128385128385
*/
128386-
function wp_authenticate($username, #[\SensitiveParameter] $password)
128386+
function wp_authenticate($username, $password)
128387128387
{
128388128388
}
128389128389
/**
@@ -128847,7 +128847,7 @@ function wp_hash($data, $scheme = 'auth', $algo = 'md5')
128847128847
* @param string $password Plain text user password to hash.
128848128848
* @return string The hash string of the password.
128849128849
*/
128850-
function wp_hash_password(#[\SensitiveParameter] $password)
128850+
function wp_hash_password($password)
128851128851
{
128852128852
}
128853128853
/**
@@ -128872,7 +128872,7 @@ function wp_hash_password(#[\SensitiveParameter] $password)
128872128872
* @param string|int $user_id Optional. ID of a user associated with the password.
128873128873
* @return bool False, if the $password does not match the hashed password.
128874128874
*/
128875-
function wp_check_password(#[\SensitiveParameter] $password, $hash, $user_id = '')
128875+
function wp_check_password($password, $hash, $user_id = '')
128876128876
{
128877128877
}
128878128878
/**
@@ -128952,7 +128952,7 @@ function wp_rand($min = \null, $max = \null)
128952128952
* @param string $password The plaintext new user password.
128953128953
* @param int $user_id User ID.
128954128954
*/
128955-
function wp_set_password(#[\SensitiveParameter] $password, $user_id)
128955+
function wp_set_password($password, $user_id)
128956128956
{
128957128957
}
128958128958
/**
@@ -141870,7 +141870,7 @@ function wp_signon($credentials = array(), $secure_cookie = '')
141870141870
* @param string $password Password for authentication.
141871141871
* @return WP_User|WP_Error WP_User on success, WP_Error on failure.
141872141872
*/
141873-
function wp_authenticate_username_password($user, $username, #[\SensitiveParameter] $password)
141873+
function wp_authenticate_username_password($user, $username, $password)
141874141874
{
141875141875
}
141876141876
/**
@@ -141884,7 +141884,7 @@ function wp_authenticate_username_password($user, $username, #[\SensitiveParamet
141884141884
* @param string $password Password for authentication.
141885141885
* @return WP_User|WP_Error WP_User on success, WP_Error on failure.
141886141886
*/
141887-
function wp_authenticate_email_password($user, $email, #[\SensitiveParameter] $password)
141887+
function wp_authenticate_email_password($user, $email, $password)
141888141888
{
141889141889
}
141890141890
/**
@@ -141899,7 +141899,7 @@ function wp_authenticate_email_password($user, $email, #[\SensitiveParameter] $p
141899141899
* @param string $password Password. If not empty, cancels the cookie authentication.
141900141900
* @return WP_User|WP_Error WP_User on success, WP_Error on failure.
141901141901
*/
141902-
function wp_authenticate_cookie($user, $username, #[\SensitiveParameter] $password)
141902+
function wp_authenticate_cookie($user, $username, $password)
141903141903
{
141904141904
}
141905141905
/**
@@ -141914,7 +141914,7 @@ function wp_authenticate_cookie($user, $username, #[\SensitiveParameter] $passwo
141914141914
* @return WP_User|WP_Error|null WP_User on success, WP_Error on failure, null if
141915141915
* null is passed in and this isn't an API request.
141916141916
*/
141917-
function wp_authenticate_application_password($input_user, $username, #[\SensitiveParameter] $password)
141917+
function wp_authenticate_application_password($input_user, $username, $password)
141918141918
{
141919141919
}
141920141920
/**
@@ -142770,7 +142770,7 @@ function wp_update_user($userdata)
142770142770
* @return int|WP_Error The newly created user's ID or a WP_Error object if the user could not
142771142771
* be created.
142772142772
*/
142773-
function wp_create_user($username, #[\SensitiveParameter] $password, $email = '')
142773+
function wp_create_user($username, $password, $email = '')
142774142774
{
142775142775
}
142776142776
/**
@@ -142850,7 +142850,7 @@ function get_password_reset_key($user)
142850142850
* @param string $login The user login.
142851142851
* @return WP_User|WP_Error WP_User object on success, WP_Error object for invalid or expired keys.
142852142852
*/
142853-
function check_password_reset_key(#[\SensitiveParameter] $key, $login)
142853+
function check_password_reset_key($key, $login)
142854142854
{
142855142855
}
142856142856
/**
@@ -142876,7 +142876,7 @@ function retrieve_password($user_login = '')
142876142876
* @param WP_User $user The user
142877142877
* @param string $new_pass New password for the user in plaintext
142878142878
*/
142879-
function reset_password($user, #[\SensitiveParameter] $new_pass)
142879+
function reset_password($user, $new_pass)
142880142880
{
142881142881
}
142882142882
/**
@@ -143171,7 +143171,7 @@ function wp_generate_user_request_key($request_id)
143171143171
* @param string $key Provided key to validate.
143172143172
* @return true|WP_Error True on success, WP_Error on failure.
143173143173
*/
143174-
function wp_validate_user_request_key($request_id, #[\SensitiveParameter] $key)
143174+
function wp_validate_user_request_key($request_id, $key)
143175143175
{
143176143176
}
143177143177
/**

0 commit comments

Comments
 (0)