Skip to content

Commit 73b5300

Browse files
Documentation comment fixes to be inline with wpcs
1 parent 1e00ce0 commit 73b5300

37 files changed

+153
-153
lines changed

bp-xprofile-custom-field-types.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public function __get( $name ) {
170170
}
171171

172172
/**
173-
* Return object of class
173+
* Returns singleton instance of BP_Xprofile_CFTR
174174
*
175175
* @return BP_Xprofile_CFTR
176176
*/

src/admin/class-admin.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@
2121
class Admin {
2222

2323
/**
24-
* Setup the bootstrapper.
24+
* Sets up the bootstrapper.
2525
*/
2626
public static function boot() {
2727
$self = new self();
2828
$self->setup();
2929
}
3030

3131
/**
32-
* Bind hooks
32+
* Binds hooks
3333
*/
3434
private function setup() {
3535
// called after pp_loaded.
@@ -38,7 +38,7 @@ private function setup() {
3838
}
3939

4040
/**
41-
* Initialize.
41+
* Initializes.
4242
*/
4343
public function init() {
4444

@@ -51,7 +51,7 @@ public function init() {
5151
}
5252

5353
/**
54-
* Show notices.
54+
* Shows notices.
5555
*/
5656
public function notices() {
5757
$notices = get_option( 'bpxcftr_notices' );

src/admin/class-field-settings-helper.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@
2626
class Field_Settings_Helper {
2727

2828
/**
29-
* Setup the bootstrapper.
29+
* Sets up the bootstrapper.
3030
*/
3131
public static function boot() {
3232
$self = new self();
3333
$self->setup();
3434
}
3535

3636
/**
37-
* Bind hooks
37+
* Binds hooks
3838
*/
3939
private function setup() {
4040
// save meta.
@@ -45,7 +45,7 @@ private function setup() {
4545
}
4646

4747
/**
48-
* Save the text when the field is saved
48+
* Saves the text when the field is saved
4949
*
5050
* @param \BP_XProfile_Field $field field object.
5151
*/
@@ -261,5 +261,4 @@ class="screen-reader-text"><?php _e( 'Select2 status for this field', 'buddypres
261261
</div>
262262
<?php
263263
}
264-
265264
}

src/bootstrap/class-assets-loader.php

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,22 @@
2121
class Assets_Loader {
2222

2323
/**
24-
* Data to be send as localized js.
24+
* Data to be sent as localized js.
2525
*
2626
* @var array
2727
*/
2828
private $data = array();
2929

3030
/**
31-
* Boot itself
31+
* Boots itself
3232
*/
3333
public static function boot() {
3434
$self = new self();
3535
$self->setup();
3636
}
3737

3838
/**
39-
* Setup
39+
* Sets up
4040
*/
4141
public function setup() {
4242
add_action( 'bp_enqueue_scripts', array( $this, 'register_front_assets' ) );
@@ -48,7 +48,7 @@ public function setup() {
4848
}
4949

5050
/**
51-
* Register front assets.
51+
* Registers front assets.
5252
*/
5353
public function register_front_assets() {
5454

@@ -60,10 +60,10 @@ public function register_front_assets() {
6060
}
6161

6262
/**
63-
* Load plugin assets
63+
* Loads plugin assets
6464
*/
6565
public function load_assets() {
66-
// css should be always loaded.
66+
// css should always be loaded.
6767
wp_enqueue_style( 'bp-xprofile-custom-field-types' );
6868

6969
if ( ! $this->should_load_front_assets() ) {
@@ -74,7 +74,7 @@ public function load_assets() {
7474
}
7575

7676
/**
77-
* Register admin assets.
77+
* Registers admin assets.
7878
*/
7979
public function register_admin_assets() {
8080

@@ -86,7 +86,7 @@ public function register_admin_assets() {
8686
}
8787

8888
/**
89-
* Load plugin assets
89+
* Loads plugin assets
9090
*/
9191
public function load_admin_assets() {
9292

@@ -99,7 +99,7 @@ public function load_admin_assets() {
9999
}
100100

101101
/**
102-
* Load plugin assets
102+
* Loads plugin assets
103103
*/
104104
public function load_user_admin_assets() {
105105

@@ -115,7 +115,7 @@ public function load_user_admin_assets() {
115115
}
116116

117117
/**
118-
* Register assets.
118+
* Registers assets.
119119
*/
120120
private function register() {
121121
$this->register_vendors();
@@ -124,7 +124,7 @@ private function register() {
124124
}
125125

126126
/**
127-
* Enqueue front end assets.
127+
* Enqueues front end assets.
128128
*/
129129
public function enqueue_front() {
130130
wp_enqueue_script( 'bp-xprofile-custom-field-types' );
@@ -133,7 +133,7 @@ public function enqueue_front() {
133133
}
134134

135135
/**
136-
* Load vendor assets.
136+
* Loads vendor assets.
137137
*/
138138
public function enqueue_vendors() {
139139
wp_enqueue_style( 'select2' );
@@ -144,7 +144,7 @@ public function enqueue_vendors() {
144144
}
145145

146146
/**
147-
* Enqueue admin assets for add/edit field screen..
147+
* Enqueues admin assets for add/edit field screen.
148148
*/
149149
public function enqueue_admin() {
150150
wp_enqueue_script( 'bp-xprofile-custom-field-types-admin' );
@@ -155,15 +155,15 @@ public function enqueue_admin() {
155155
}
156156

157157
/**
158-
* Enqueue admin assets needed for user profile edit page.
158+
* Enqueues admin assets needed for user profile edit page.
159159
*/
160160
public function enqueue_user_admin() {
161161
wp_enqueue_script( 'bp-xprofile-custom-field-types' );
162162
wp_localize_script( 'bp-xprofile-custom-field-types', 'BPXprofileCFTR', $this->data );
163163
}
164164

165165
/**
166-
* Register vendor scripts.
166+
* Registers vendor scripts.
167167
*/
168168
private function register_vendors() {
169169

@@ -188,7 +188,7 @@ private function register_vendors() {
188188
}
189189

190190
/**
191-
* Register core assets.
191+
* Registers core assets.
192192
*/
193193
private function register_core() {
194194
$url = bp_xprofile_cftr()->url;
@@ -202,7 +202,7 @@ private function register_core() {
202202
}
203203

204204
/**
205-
* Register core assets.
205+
* Registers core assets.
206206
*/
207207
private function register_admin() {
208208
$url = bp_xprofile_cftr()->url;
@@ -236,5 +236,4 @@ private function should_load_front_assets() {
236236

237237
return apply_filters( 'bpxcftr_load_front_assets', $load );
238238
}
239-
240239
}

src/bootstrap/class-autoloader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
defined( 'ABSPATH' ) || exit;
1717

1818
/**
19-
* Auto Loader for ReportAbuse.
19+
* Auto Loader for BuddyPress Xprofile Custom Field Types.
2020
*
2121
* After registering this autoload function with SPL, the following line
2222
* would cause the function to attempt to load the BPXProfileCFTR\Bar\Baz\Qux class

src/bootstrap/class-bootstrapper.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@
3434
class Bootstrapper {
3535

3636
/**
37-
* Setup the bootstrapper.
37+
* Sets up the bootstrapper.
3838
*/
3939
public static function boot() {
4040
$self = new self();
4141
$self->setup();
4242
}
4343

4444
/**
45-
* Bind hooks
45+
* Binds hooks
4646
*/
4747
private function setup() {
4848

@@ -54,7 +54,7 @@ private function setup() {
5454
}
5555

5656
/**
57-
* Load core functions/template tags.
57+
* Loads core functions/template tags.
5858
* These are non auto loadable constructs.
5959
*/
6060
public function load() {
@@ -63,14 +63,14 @@ public function load() {
6363
}
6464

6565
/**
66-
* Load translations.
66+
* Loads translations.
6767
*/
6868
public function load_translations() {
6969
load_plugin_textdomain( 'bp-xprofile-custom-field-types', false, basename( dirname( bp_xprofile_cftr()->path ) ) . '/languages' );
7070
}
7171

7272
/**
73-
* Register the field types.
73+
* Registers the field types.
7474
*
7575
* @param array $fields field types.
7676
*
@@ -82,7 +82,7 @@ public function register_field_types( $fields ) {
8282
}
8383

8484
/**
85-
* Load files common to each request type.
85+
* Loads files common to each request type.
8686
*/
8787
private function load_common() {
8888
$path = bp_xprofile_cftr()->path;
@@ -114,7 +114,7 @@ private function load_common() {
114114
}
115115

116116
/**
117-
* Load admin.
117+
* Loads admin.
118118
*/
119119
private function load_admin() {
120120

src/core/bp-xprofile-custom-field-types-functions.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
defined( 'ABSPATH' ) || exit;
1717

1818
/**
19-
* Get a mapping of field type to their implementation class.
19+
* Returns a mapping of field types to their implementation class.
2020
*
2121
* @return array Key/value pairs (field type => class name).
2222
*/
@@ -49,7 +49,7 @@ function bpxcftr_get_field_types() {
4949
}
5050

5151
/**
52-
* Get field types which support the selec2 js.
52+
* Returns field types which support the select2 js.
5353
*
5454
* @return array
5555
*/
@@ -67,7 +67,7 @@ function bpxcftr_get_selectable_field_types() {
6767
return apply_filters( 'bpxcftr_selectable_types', $types );
6868
}
6969
/**
70-
* Get an array of allowed file extensions.
70+
* Returns an array of allowed file extensions.
7171
*
7272
* @param string $type possible values 'image', 'file'.
7373
*
@@ -95,7 +95,7 @@ function bpxcftr_get_allowed_file_extensions( $type ) {
9595
}
9696

9797
/**
98-
* Get maximum allowed file size.
98+
* Returns maximum allowed file size.
9999
*
100100
* @param string $type field type.
101101
*
@@ -142,7 +142,7 @@ function bpxcftr_is_multi_valued_field( $field ) {
142142
}
143143

144144
/**
145-
* It is a work around to get the field at the time is_valid() is called on field types.
145+
* It is a workaround to get the field at the time is_valid() is called on field types.
146146
* BuddyPress does not pass the id at the moment.
147147
*
148148
* @return BP_XProfile_Field|null
@@ -152,7 +152,7 @@ function bpxcftr_get_current_field() {
152152
}
153153

154154
/**
155-
* Save the current field value.
155+
* Saves the current field value.
156156
*
157157
* @param BP_XProfile_Field|null $field field object or null.
158158
*/

src/core/class-data-store.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class Data_Store {
2828
private $data = array();
2929

3030
/**
31-
* Get the property value.
31+
* returns the property's value.
3232
*
3333
* @param string $name dynamic property name.
3434
*
@@ -39,7 +39,7 @@ public function __get( $name ) {
3939
}
4040

4141
/**
42-
* Check if a property is set.
42+
* Checks if a property is set.
4343
*
4444
* @param string $name property name.
4545
*
@@ -50,7 +50,7 @@ public function __isset( $name ) {
5050
}
5151

5252
/**
53-
* Set a property.
53+
* Sets a property.
5454
*
5555
* @param string $name property name.
5656
* @param mixed $value value.
@@ -60,7 +60,7 @@ public function __set( $name, $value ) {
6060
}
6161

6262
/**
63-
* Unset a property.
63+
* Unsets a property.
6464
*
6565
* @param string $name property name.
6666
*/

0 commit comments

Comments
 (0)