Issues (4138)

classes/integrations/class-wp-user-avatar.php (13 issues)

1
<?php
0 ignored issues
show
This file is missing a doc comment.
Loading history...
2
namespace lsx_health_plan\classes;
3
4
/**
5
 * Contains the downloads functions post type
6
 *
7
 * @package lsx-health-plan
8
 */
9
class WP_User_Avatar {
10
11
	/**
12
	 * Holds class instance
13
	 *
14
	 * @since 1.0.0
15
	 *
16
	 * @var      object \lsx_health_plan\classes\Woocommerce()
17
	 */
18
	protected static $instance = null;
19
20
	/**
21
	 * Constructor
22
	 */
23
	public function __construct() {
0 ignored issues
show
Expected 2 blank lines before function; 1 found
Loading history...
24
		add_filter( 'wpua_profile_title', array( $this, 'profile_title' ), 10, 1 );
25
	}
0 ignored issues
show
Expected 1 blank line before closing function brace; 0 found
Loading history...
Expected 2 blank lines after function; 1 found
Loading history...
26
27
	/**
28
	 * Return an instance of this class.
29
	 *
30
	 * @since 1.0.0
31
	 *
32
	 * @return    object \lsx_health_plan\classes\Woocommerce()    A single instance of this class.
33
	 */
34
	public static function get_instance() {
35
		// If the single instance hasn't been set, set it now.
36
		if ( null === self::$instance ) {
0 ignored issues
show
Expected 0 spaces after opening bracket; 1 found
Loading history...
Expected 0 spaces before closing bracket; 1 found
Loading history...
37
			self::$instance = new self();
38
		}
0 ignored issues
show
No blank line found after control structure
Loading history...
39
		return self::$instance;
40
	}
0 ignored issues
show
Expected 1 blank line before closing function brace; 0 found
Loading history...
Expected 2 blank lines after function; 1 found
Loading history...
41
42
	/**
43
	 * Changes the profile title
44
	 *
45
	 * @param  string $title
0 ignored issues
show
Coding Style Documentation introduced by
Missing parameter comment
Loading history...
46
	 * @return string
47
	 */
48
	public function profile_title( $title ) {
49
		$title = '<h3>' . __( 'My Profile', 'lsx-health-plan' ) . '</h3>';
0 ignored issues
show
Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
50
		$title .= '<p class="tagline">' . __( 'Please upload an image of yourself in .jpeg format. Images should be square, to best fit the cropping area, and files sizes kept below 500kb.', 'lsx-health-plan' ) . '</p>';
51
		return $title;
52
	}
0 ignored issues
show
Expected 1 blank line before closing function brace; 0 found
Loading history...
Expected 2 blank lines after function; 0 found
Loading history...
53
}
54