WordPoints_BP_Entity_Activity_User   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 30
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A get_title() 0 3 1
1
<?php
2
3
/**
4
 * Activity user entity relationship class.
5
 *
6
 * @package WordPoints_BuddyPress
7
 * @since 1.0.0
8
 */
9
10
/**
11
 * Defines the relationship between an activity item and the user it relates to.
12
 *
13
 * @since 1.0.0
14
 */
15
class WordPoints_BP_Entity_Activity_User
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
16
	extends WordPoints_Entity_Relationship_Stored_Field {
0 ignored issues
show
Coding Style introduced by
The extends keyword must be on the same line as the class name
Loading history...
17
18
	/**
19
	 * @since 1.0.0
20
	 */
21
	protected $storage_type = 'db';
22
23
	/**
24
	 * @since 1.0.0
25
	 */
26
	protected $primary_entity_slug = 'bp_activity';
27
28
	/**
29
	 * @since 1.0.0
30
	 */
31
	protected $related_entity_slug = 'user';
32
33
	/**
34
	 * @since 1.0.0
35
	 */
36
	protected $related_ids_field = 'user_id';
37
38
	/**
39
	 * @since 1.0.0
40
	 */
41
	public function get_title() {
42
		return _x( 'User', 'activity entity', 'wordpoints-bp' );
43
	}
44
}
45
46
// EOF
47