Skip to content

Commit 42a0695

Browse files
authored
phpstan fixes (#119)
1 parent e23f94e commit 42a0695

File tree

4 files changed

+9
-38
lines changed

4 files changed

+9
-38
lines changed

bin/baseline.neon

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,5 @@
11
parameters:
22
ignoreErrors:
3-
-
4-
message: '#^Access to an undefined property ACF_Admin_Field_Groups\:\:\$not_found_label\.$#'
5-
identifier: property.notFound
6-
count: 1
7-
path: ../includes/admin/post-types/admin-field-groups.php
8-
9-
-
10-
message: '#^Action callback returns array but should not return anything\.$#'
11-
identifier: return.void
12-
count: 1
13-
path: ../includes/admin/post-types/admin-field-groups.php
14-
15-
-
16-
message: '#^Class ACF_Admin_Post_type referenced with incorrect case\: ACF_Admin_Post_Type\.$#'
17-
identifier: class.nameCase
18-
count: 1
19-
path: ../includes/admin/post-types/admin-post-type.php
20-
21-
-
22-
message: '#^Access to an undefined property ACF_Admin_Post_Types\:\:\$not_found_label\.$#'
23-
identifier: property.notFound
24-
count: 1
25-
path: ../includes/admin/post-types/admin-post-types.php
26-
27-
-
28-
message: '#^Access to an undefined property ACF_Admin_Taxonomies\:\:\$not_found_label\.$#'
29-
identifier: property.notFound
30-
count: 1
31-
path: ../includes/admin/post-types/admin-taxonomies.php
32-
33-
-
34-
message: '#^Access to an undefined property ACF_Admin_UI_Options_Pages\:\:\$not_found_label\.$#'
35-
identifier: property.notFound
36-
count: 1
37-
path: ../includes/admin/post-types/class-acf-admin-ui-options-pages.php
38-
393
-
404
message: '#^Variable \$field might not be defined\.$#'
415
identifier: variable.undefined

includes/admin/admin-internal-post-type-list.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,13 @@ class ACF_Admin_Internal_Post_Type_List {
6969
*/
7070
public $is_pro_feature = false;
7171

72+
/**
73+
* The label for the "not found" message.
74+
*
75+
* @var string
76+
*/
77+
public $not_found_label = '';
78+
7279
/**
7380
* Constructs the class.
7481
*/

includes/admin/post-types/admin-field-groups.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class ACF_Admin_Field_Groups extends ACF_Admin_Internal_Post_Type_List {
4040
public function __construct() {
4141
add_action( 'admin_menu', array( $this, 'admin_menu' ), 7 );
4242
add_action( 'load-edit.php', array( $this, 'handle_redirection' ) );
43-
add_action( 'post_class', array( $this, 'get_admin_table_post_classes' ), 10, 3 );
43+
add_filter( 'post_class', array( $this, 'get_admin_table_post_classes' ), 10, 3 );
4444

4545
parent::__construct();
4646
}

includes/admin/post-types/admin-post-type.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
* All the logic for editing a post type.
1717
*/
18-
class ACF_Admin_Post_type extends ACF_Admin_Internal_Post_Type {
18+
class ACF_Admin_Post_Type extends ACF_Admin_Internal_Post_Type {
1919

2020
/**
2121
* The slug for the internal post type.

0 commit comments

Comments
 (0)