Skip to content

Commit 4e237ca

Browse files
authored
phpstan fixes (#120)
1 parent 42a0695 commit 4e237ca

File tree

3 files changed

+3
-21
lines changed

3 files changed

+3
-21
lines changed

bin/baseline.neon

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -90,18 +90,6 @@ parameters:
9090
count: 1
9191
path: ../includes/admin/views/upgrade/notice.php
9292

93-
-
94-
message: '#^Function remove_filter invoked with 4 parameters, 2\-3 required\.$#'
95-
identifier: arguments.count
96-
count: 1
97-
path: ../includes/api/api-helpers.php
98-
99-
-
100-
message: '#^One or more @param tags has an invalid name or invalid syntax\.$#'
101-
identifier: phpDoc.parseError
102-
count: 1
103-
path: ../includes/api/api-helpers.php
104-
10593
-
10694
message: '#^Path in include_once\(\) "\./wp\-admin/includes/plugin\.php" is not a file or it does not exist\.$#'
10795
identifier: includeOnce.fileNotFound
@@ -126,12 +114,6 @@ parameters:
126114
count: 1
127115
path: ../includes/api/api-helpers.php
128116

129-
-
130-
message: '#^Function remove_filter invoked with 4 parameters, 2\-3 required\.$#'
131-
identifier: arguments.count
132-
count: 1
133-
path: ../includes/api/api-term.php
134-
135117
-
136118
message: '#^Action callback returns string but should not return anything\.$#'
137119
identifier: return.void

includes/api/api-helpers.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,7 +1289,7 @@ function acf_get_grouped_posts( $args ) {
12891289

12901290
// remove this filter (only once)
12911291
if ( ! $is_single_post_type ) {
1292-
remove_filter( 'posts_orderby', '_acf_orderby_post_type', 10, 2 );
1292+
remove_filter( 'posts_orderby', '_acf_orderby_post_type', 10 );
12931293
}
12941294

12951295
// loop
@@ -2605,7 +2605,7 @@ function acf_get_attachment( $attachment ) {
26052605
*
26062606
* @since ACF 6.2.2
26072607
*
2608-
* @param int|null The default filesize.
2608+
* @param int|null $shortcut_filesize The default filesize.
26092609
* @param WP_Post $attachment The attachment post object we're looking for the filesize for.
26102610
*/
26112611
$shortcut_filesize = apply_filters( 'acf/filesize', null, $attachment );

includes/api/api-term.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ function acf_get_grouped_terms( $args ) {
192192

193193
// remove this filter (only once)
194194
if ( ! $is_single ) {
195-
remove_filter( 'terms_clauses', '_acf_terms_clauses', 10, 3 );
195+
remove_filter( 'terms_clauses', '_acf_terms_clauses', 10 );
196196
}
197197

198198
// loop

0 commit comments

Comments
 (0)