Skip to content

Commit a6e479c

Browse files
committed
Fix phpcs issues
1 parent 50a15ff commit a6e479c

File tree

7 files changed

+46
-65
lines changed

7 files changed

+46
-65
lines changed

plugins/osi-features/inc/classes/taxonomies/class-base.php

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
namespace Osi\Features\Inc\Taxonomies;
99

10-
use \Osi\Features\Inc\Traits\Singleton;
10+
use Osi\Features\Inc\Traits\Singleton;
1111

1212
/**
1313
* Class Base
@@ -22,7 +22,6 @@ abstract class Base {
2222
protected function __construct() {
2323

2424
$this->setup_hooks();
25-
2625
}
2726

2827
/**
@@ -32,8 +31,7 @@ protected function __construct() {
3231
*/
3332
protected function setup_hooks() {
3433

35-
add_action( 'init', [ $this, 'register_taxonomy' ] );
36-
34+
add_action( 'init', array( $this, 'register_taxonomy' ) );
3735
}
3836

3937
/**
@@ -54,17 +52,16 @@ public function register_taxonomy() {
5452
}
5553

5654
$args = $this->get_args();
57-
$args = ( ! empty( $args ) && is_array( $args ) ) ? $args : [];
55+
$args = ( ! empty( $args ) && is_array( $args ) ) ? $args : array();
5856

5957
$labels = $this->get_labels();
60-
$labels = ( ! empty( $labels ) && is_array( $labels ) ) ? $labels : [];
58+
$labels = ( ! empty( $labels ) && is_array( $labels ) ) ? $labels : array();
6159

6260
if ( ! empty( $labels ) && is_array( $labels ) ) {
6361
$args['labels'] = $labels;
6462
}
6563

6664
register_taxonomy( static::SLUG, $post_types, $args );
67-
6865
}
6966

7067
/**
@@ -74,14 +71,13 @@ public function register_taxonomy() {
7471
*/
7572
public function get_args() {
7673

77-
return [
74+
return array(
7875
'hierarchical' => true,
7976
'show_ui' => true,
8077
'show_admin_column' => true,
8178
'query_var' => true,
8279
'show_in_rest' => true,
83-
];
84-
80+
);
8581
}
8682

8783
/**
@@ -97,5 +93,4 @@ abstract public function get_labels();
9793
* @return array
9894
*/
9995
abstract public function get_post_types();
100-
10196
}

plugins/osi-features/inc/classes/taxonomies/class-taxonomy-example.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Taxonomy_Example extends Base {
2626
*/
2727
public function get_labels() {
2828

29-
return [
29+
return array(
3030
'name' => _x( 'Taxonomy_Example', 'taxonomy general name', 'osi-features' ),
3131
'singular_name' => _x( 'Taxonomy_Example', 'taxonomy singular name', 'osi-features' ),
3232
'search_items' => __( 'Search Taxonomy_Example', 'osi-features' ),
@@ -43,8 +43,7 @@ public function get_labels() {
4343
'choose_from_most_used' => __( 'Choose from the most used Taxonomy_Example', 'osi-features' ),
4444
'not_found' => __( 'No Taxonomy_Example found.', 'osi-features' ),
4545
'menu_name' => __( 'Taxonomy_Example', 'osi-features' ),
46-
];
47-
46+
);
4847
}
4948

5049
/**
@@ -54,10 +53,8 @@ public function get_labels() {
5453
*/
5554
public function get_post_types() {
5655

57-
return [
56+
return array(
5857
'post',
59-
];
60-
58+
);
6159
}
62-
6360
}

plugins/osi-features/inc/classes/taxonomies/class-taxonomy-license-category.php

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class Taxonomy_License_Category extends Base {
2828
*/
2929
public function get_labels() {
3030

31-
return [
31+
return array(
3232
'name' => _x( 'Category', 'taxonomy general name', 'osi-features' ),
3333
'singular_name' => _x( 'Category', 'taxonomy singular name', 'osi-features' ),
3434
'search_items' => __( 'Search Category', 'osi-features' ),
@@ -45,8 +45,7 @@ public function get_labels() {
4545
'choose_from_most_used' => __( 'Choose from the most used Categories', 'osi-features' ),
4646
'not_found' => __( 'No Category found.', 'osi-features' ),
4747
'menu_name' => __( 'Categories', 'osi-features' ),
48-
];
49-
48+
);
5049
}
5150

5251
/**
@@ -56,10 +55,9 @@ public function get_labels() {
5655
*/
5756
public function get_post_types() {
5857

59-
return [
58+
return array(
6059
Post_Type_License::get_instance()->get_slug(),
61-
];
62-
60+
);
6361
}
6462

6563
/**
@@ -70,14 +68,13 @@ public function get_post_types() {
7068
public function get_args() {
7169

7270
return wp_parse_args(
73-
[
74-
'rewrite' => [
71+
array(
72+
'rewrite' => array(
7573
'slug' => Post_Type_License::get_instance()->get_slug() . '/category',
7674
'with_front' => false,
77-
],
78-
],
75+
),
76+
),
7977
parent::get_args()
8078
);
8179
}
82-
8380
}

plugins/osi-features/inc/classes/taxonomies/class-taxonomy-publication.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ public function get_post_types() {
6868
public function get_args() {
6969

7070
return wp_parse_args(
71-
[
71+
array(
7272
'hierarchical' => true,
73-
'rewrite' => [
73+
'rewrite' => array(
7474
'slug' => Post_Type_Press_Mentions::get_instance()->get_slug() . '/publication',
7575
'with_front' => false,
76-
],
77-
],
76+
),
77+
),
7878
parent::get_args()
7979
);
8080
}

plugins/osi-features/inc/classes/taxonomies/class-taxonomy-seat-type.php

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class Taxonomy_Seat_Type extends Base {
2828
*/
2929
public function get_labels() {
3030

31-
return [
31+
return array(
3232
'name' => _x( 'Seat type', 'taxonomy general name', 'osi-features' ),
3333
'singular_name' => _x( 'Seat type', 'taxonomy singular name', 'osi-features' ),
3434
'search_items' => __( 'Search Seat type', 'osi-features' ),
@@ -45,8 +45,7 @@ public function get_labels() {
4545
'choose_from_most_used' => __( 'Choose from the most used Seat types', 'osi-features' ),
4646
'not_found' => __( 'No Seat type found.', 'osi-features' ),
4747
'menu_name' => __( 'Seat Types', 'osi-features' ),
48-
];
49-
48+
);
5049
}
5150

5251
/**
@@ -56,10 +55,9 @@ public function get_labels() {
5655
*/
5756
public function get_post_types() {
5857

59-
return [
58+
return array(
6059
Post_Type_Board_Member::get_instance()->get_slug(),
61-
];
62-
60+
);
6361
}
6462

6563
/**
@@ -70,15 +68,14 @@ public function get_post_types() {
7068
public function get_args() {
7169

7270
return wp_parse_args(
73-
[
71+
array(
7472
'hierarchical' => false,
75-
'rewrite' => [
73+
'rewrite' => array(
7674
'slug' => Post_Type_Board_Member::get_instance()->get_slug() . '/seat-type',
7775
'with_front' => false,
78-
],
79-
],
76+
),
77+
),
8078
parent::get_args()
8179
);
8280
}
83-
8481
}

plugins/osi-features/inc/classes/taxonomies/class-taxonomy-status.php

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class Taxonomy_Status extends Base {
2828
*/
2929
public function get_labels() {
3030

31-
return [
31+
return array(
3232
'name' => _x( 'Status', 'taxonomy general name', 'osi-features' ),
3333
'singular_name' => _x( 'Status', 'taxonomy singular name', 'osi-features' ),
3434
'search_items' => __( 'Search Status', 'osi-features' ),
@@ -45,8 +45,7 @@ public function get_labels() {
4545
'choose_from_most_used' => __( 'Choose from the most used Statuses', 'osi-features' ),
4646
'not_found' => __( 'No Status found.', 'osi-features' ),
4747
'menu_name' => __( 'Statuses', 'osi-features' ),
48-
];
49-
48+
);
5049
}
5150

5251
/**
@@ -56,10 +55,9 @@ public function get_labels() {
5655
*/
5756
public function get_post_types() {
5857

59-
return [
58+
return array(
6059
Post_Type_Board_Member::get_instance()->get_slug(),
61-
];
62-
60+
);
6361
}
6462

6563
/**
@@ -70,13 +68,13 @@ public function get_post_types() {
7068
public function get_args() {
7169

7270
return wp_parse_args(
73-
[
71+
array(
7472
'hierarchical' => false,
75-
'rewrite' => [
73+
'rewrite' => array(
7674
'slug' => Post_Type_Board_Member::get_instance()->get_slug() . '/status',
7775
'with_front' => false,
78-
],
79-
],
76+
),
77+
),
8078
parent::get_args()
8179
);
8280
}

plugins/osi-features/inc/classes/taxonomies/class-taxonomy-steward.php

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class Taxonomy_Steward extends Base {
2828
*/
2929
public function get_labels() {
3030

31-
return [
31+
return array(
3232
'name' => _x( 'License Steward', 'taxonomy general name', 'osi-features' ),
3333
'singular_name' => _x( 'License Steward', 'taxonomy singular name', 'osi-features' ),
3434
'search_items' => __( 'Search License Steward', 'osi-features' ),
@@ -45,8 +45,7 @@ public function get_labels() {
4545
'choose_from_most_used' => __( 'Choose from the most used License Stewards', 'osi-features' ),
4646
'not_found' => __( 'No License Steward found.', 'osi-features' ),
4747
'menu_name' => __( 'License Stewards', 'osi-features' ),
48-
];
49-
48+
);
5049
}
5150

5251
/**
@@ -56,10 +55,9 @@ public function get_labels() {
5655
*/
5756
public function get_post_types() {
5857

59-
return [
58+
return array(
6059
Post_Type_License::get_instance()->get_slug(),
61-
];
62-
60+
);
6361
}
6462

6563
/**
@@ -70,15 +68,14 @@ public function get_post_types() {
7068
public function get_args() {
7169

7270
return wp_parse_args(
73-
[
71+
array(
7472
'hierarchical' => false,
75-
'rewrite' => [
73+
'rewrite' => array(
7674
'slug' => Post_Type_License::get_instance()->get_slug() . '/steward',
7775
'with_front' => false,
78-
],
79-
],
76+
),
77+
),
8078
parent::get_args()
8179
);
8280
}
83-
8481
}

0 commit comments

Comments
 (0)