@@ -82,7 +82,7 @@ public function test_register_ability_category_no_init_action(): void {
8282 global $ wp_actions ;
8383
8484 // Store the original action count.
85- $ original_count = isset ( $ wp_actions ['init ' ] ) ? $ wp_actions [ ' init ' ] : 0 ;
85+ $ original_count = $ wp_actions ['init ' ] ?? 0 ;
8686
8787 // Reset the action count to simulate it not being fired.
8888 unset( $ wp_actions ['init ' ] );
@@ -132,7 +132,7 @@ public function test_unregister_ability_category_no_init_action(): void {
132132 global $ wp_actions ;
133133
134134 // Store the original action count.
135- $ original_count = isset ( $ wp_actions ['init ' ] ) ? $ wp_actions [ ' init ' ] : 0 ;
135+ $ original_count = $ wp_actions ['init ' ] ?? 0 ;
136136
137137 // Reset the action count to simulate it not being fired.
138138 unset( $ wp_actions ['init ' ] );
@@ -194,7 +194,7 @@ public function test_has_ability_category_no_init_action(): void {
194194 global $ wp_actions ;
195195
196196 // Store the original action count.
197- $ original_count = isset ( $ wp_actions ['init ' ] ) ? $ wp_actions [ ' init ' ] : 0 ;
197+ $ original_count = $ wp_actions ['init ' ] ?? 0 ;
198198
199199 // Reset the action count to simulate it not being fired.
200200 unset( $ wp_actions ['init ' ] );
@@ -255,7 +255,7 @@ public function test_get_ability_category_no_init_action(): void {
255255 global $ wp_actions ;
256256
257257 // Store the original action count.
258- $ original_count = isset ( $ wp_actions ['init ' ] ) ? $ wp_actions [ ' init ' ] : 0 ;
258+ $ original_count = $ wp_actions ['init ' ] ?? 0 ;
259259
260260 // Reset the action count to simulate it not being fired.
261261 unset( $ wp_actions ['init ' ] );
@@ -328,7 +328,7 @@ public function test_get_ability_categories_no_init_action(): void {
328328 global $ wp_actions ;
329329
330330 // Store the original action count.
331- $ original_count = isset ( $ wp_actions ['init ' ] ) ? $ wp_actions [ ' init ' ] : 0 ;
331+ $ original_count = $ wp_actions ['init ' ] ?? 0 ;
332332
333333 // Reset the action count to simulate it not being fired.
334334 unset( $ wp_actions ['init ' ] );
0 commit comments