Passed
Push — master ( 02fe7f...406f6c )
by
unknown
10:53
created
gutenberg/site-insights/templates/graph/class-graph-top10countries.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@  discard block
 block discarded – undo
10 10
 
11 11
 	protected $type = 'graph';
12 12
 
13
-	public function output(){
13
+	public function output() {
14 14
 		$json_data = $this->get_json_data();
15 15
 
16
-		if (empty($json_data)) {
16
+		if ( empty( $json_data ) ) {
17 17
 			return false;
18 18
 		}
19 19
 
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 	}
24 24
 
25 25
 	protected function get_options() {
26
-		if (empty($this->data['countries'])) {
26
+		if ( empty( $this->data['countries'] ) ) {
27 27
 			return false;
28 28
 		}
29 29
 
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
 
36 36
 		$title = __( 'Top 10 countries', 'google-analytics-for-wordpress' );
37 37
 		$series = array();
38
-		$labels = array_column($data, 'name');
38
+		$labels = array_column( $data, 'name' );
39 39
 
40
-		foreach ($data as $key => $country) {
40
+		foreach ( $data as $key => $country ) {
41 41
 			$series[$key] = (int) $country['sessions'];
42 42
 		}
43 43
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
 	protected $type = 'graph';
12 12
 
13
-	public function output(){
13
+	public function output() {
14 14
 		$json_data = $this->get_json_data();
15 15
 
16 16
 		if (empty($json_data)) {
Please login to merge, or discard this patch.
gutenberg/site-insights/templates/graph/class-graph-scrolldepth.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@  discard block
 block discarded – undo
10 10
 
11 11
 	protected $type = 'graph';
12 12
 
13
-	public function output(){
13
+	public function output() {
14 14
 		$json_data = $this->get_json_data();
15 15
 
16
-		if (empty($json_data)) {
16
+		if ( empty( $json_data ) ) {
17 17
 			return false;
18 18
 		}
19 19
 
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 	}
24 24
 
25 25
 	protected function get_options() {
26
-		if (!isset($this->data['scroll']) || empty($this->data['scroll']['average'])) {
26
+		if ( ! isset( $this->data['scroll'] ) || empty( $this->data['scroll']['average'] ) ) {
27 27
 			return false;
28 28
 		}
29 29
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
 	protected $type = 'graph';
12 12
 
13
-	public function output(){
13
+	public function output() {
14 14
 		$json_data = $this->get_json_data();
15 15
 
16 16
 		if (empty($json_data)) {
Please login to merge, or discard this patch.
includes/gutenberg/site-insights/templates/graph/class-graph-pageviews.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@  discard block
 block discarded – undo
10 10
 
11 11
 	protected $type = 'graph';
12 12
 
13
-	public function output(){
13
+	public function output() {
14 14
 		$json_data = $this->get_json_data();
15 15
 
16
-		if (empty($json_data)) {
16
+		if ( empty( $json_data ) ) {
17 17
 			return false;
18 18
 		}
19 19
 
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 	}
24 24
 
25 25
 	protected function get_options() {
26
-		if (empty($this->data['overviewgraph'])) {
26
+		if ( empty( $this->data['overviewgraph'] ) ) {
27 27
 			return false;
28 28
 		}
29 29
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
 	protected $type = 'graph';
12 12
 
13
-	public function output(){
13
+	public function output() {
14 14
 		$json_data = $this->get_json_data();
15 15
 
16 16
 		if (empty($json_data)) {
Please login to merge, or discard this patch.
gutenberg/site-insights/templates/graph/class-graph-topinterests.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@  discard block
 block discarded – undo
10 10
 
11 11
 	protected $type = 'graph';
12 12
 
13
-	public function output(){
13
+	public function output() {
14 14
 		$json_data = $this->get_json_data();
15 15
 
16
-		if (empty($json_data)) {
16
+		if ( empty( $json_data ) ) {
17 17
 			return false;
18 18
 		}
19 19
 
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 	}
24 24
 
25 25
 	protected function get_options() {
26
-		if (empty($this->data['interest'])) {
26
+		if ( empty( $this->data['interest'] ) ) {
27 27
 			return false;
28 28
 		}
29 29
 
@@ -37,9 +37,9 @@  discard block
 block discarded – undo
37 37
 
38 38
 		$series = array();
39 39
 		$percentages = array();
40
-		$labels = array_column($data, 'interest');
40
+		$labels = array_column( $data, 'interest' );
41 41
 
42
-		foreach ($data as $key => $country) {
42
+		foreach ( $data as $key => $country ) {
43 43
 			$series[$key] = (int) $country['sessions'];
44 44
 			$percentages[$key] = (int) $country['percent'];
45 45
 		}
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
 	protected $type = 'graph';
12 12
 
13
-	public function output(){
13
+	public function output() {
14 14
 		$json_data = $this->get_json_data();
15 15
 
16 16
 		if (empty($json_data)) {
Please login to merge, or discard this patch.
includes/gutenberg/site-insights/templates/graph/class-graph-age.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@  discard block
 block discarded – undo
10 10
 
11 11
 	protected $type = 'graph';
12 12
 
13
-	public function output(){
13
+	public function output() {
14 14
 		$json_data = $this->get_json_data();
15 15
 
16
-		if (empty($json_data)) {
16
+		if ( empty( $json_data ) ) {
17 17
 			return false;
18 18
 		}
19 19
 
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 	}
24 24
 
25 25
 	protected function get_options() {
26
-		if (empty($this->data['age'])) {
26
+		if ( empty( $this->data['age'] ) ) {
27 27
 			return false;
28 28
 		}
29 29
 
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 		$percentages = array();
40 40
 		$labels = array();
41 41
 
42
-		foreach ($data as $key => $country) {
42
+		foreach ( $data as $key => $country ) {
43 43
 			$series[$key] = (int) $country['sessions'];
44 44
 			$labels[$key] = $country['age'];
45 45
 			$percentages[$key] = $country['percent'];
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
 	protected $type = 'graph';
12 12
 
13
-	public function output(){
13
+	public function output() {
14 14
 		$json_data = $this->get_json_data();
15 15
 
16 16
 		if (empty($json_data)) {
Please login to merge, or discard this patch.
includes/gutenberg/site-insights/templates/graph/class-graph-device.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@  discard block
 block discarded – undo
10 10
 
11 11
 	protected $type = 'graph';
12 12
 
13
-	public function output(){
13
+	public function output() {
14 14
 		$json_data = $this->get_json_data();
15 15
 
16
-		if (empty($json_data)) {
16
+		if ( empty( $json_data ) ) {
17 17
 			return false;
18 18
 		}
19 19
 
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 	}
24 24
 
25 25
 	protected function get_options() {
26
-		if (empty($this->data['devices'])) {
26
+		if ( empty( $this->data['devices'] ) ) {
27 27
 			return false;
28 28
 		}
29 29
 
@@ -32,10 +32,10 @@  discard block
 block discarded – undo
32 32
 		$textColor = $this->attributes['textColor'];
33 33
 		$data = $this->data['devices'];
34 34
 		$labels = array();
35
-		$series = array_values($data);
35
+		$series = array_values( $data );
36 36
 
37
-		foreach ($data as $key => $value){
38
-			$labels[] = ucfirst($key);
37
+		foreach ( $data as $key => $value ) {
38
+			$labels[] = ucfirst( $key );
39 39
 		}
40 40
 
41 41
 		$title = __( 'Device Breakdown', 'google-analytics-for-wordpress' );
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 				'text' => $title,
53 53
 				'align' => 'left',
54 54
 				'style' => array(
55
-					'color' => $this->get_color_value($textColor),
55
+					'color' => $this->get_color_value( $textColor ),
56 56
 					'fontSize' => '20px'
57 57
 				)
58 58
 			),
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
 	protected $type = 'graph';
12 12
 
13
-	public function output(){
13
+	public function output() {
14 14
 		$json_data = $this->get_json_data();
15 15
 
16 16
 		if (empty($json_data)) {
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 		$labels = array();
35 35
 		$series = array_values($data);
36 36
 
37
-		foreach ($data as $key => $value){
37
+		foreach ($data as $key => $value) {
38 38
 			$labels[] = ucfirst($key);
39 39
 		}
40 40
 
Please login to merge, or discard this patch.
includes/gutenberg/site-insights/templates/graph/class-graph-gender.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@  discard block
 block discarded – undo
10 10
 
11 11
 	protected $type = 'graph';
12 12
 
13
-	public function output(){
13
+	public function output() {
14 14
 		$json_data = $this->get_json_data();
15 15
 
16
-		if (empty($json_data)) {
16
+		if ( empty( $json_data ) ) {
17 17
 			return false;
18 18
 		}
19 19
 
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 	}
24 24
 
25 25
 	protected function get_options() {
26
-		if (empty($this->data['gender'])) {
26
+		if ( empty( $this->data['gender'] ) ) {
27 27
 			return false;
28 28
 		}
29 29
 
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
 		$title = __( 'Gender Breakdown', 'google-analytics-for-wordpress' );
34 34
 
35 35
 		$data = $this->data['gender'];
36
-		$series = array_column($data, 'percent');
37
-		$labels = array_column($data, 'gender');
36
+		$series = array_column( $data, 'percent' );
37
+		$labels = array_column( $data, 'gender' );
38 38
 
39 39
 		$options = array(
40 40
 			'series' => $series,
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
 	protected $type = 'graph';
12 12
 
13
-	public function output(){
13
+	public function output() {
14 14
 		$json_data = $this->get_json_data();
15 15
 
16 16
 		if (empty($json_data)) {
Please login to merge, or discard this patch.
gutenberg/site-insights/templates/graph/class-graph-newvsreturning.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@  discard block
 block discarded – undo
10 10
 
11 11
 	protected $type = 'graph';
12 12
 
13
-	public function output(){
13
+	public function output() {
14 14
 		$json_data = $this->get_json_data();
15 15
 
16
-		if (empty($json_data)) {
16
+		if ( empty( $json_data ) ) {
17 17
 			return false;
18 18
 		}
19 19
 
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 	}
24 24
 
25 25
 	protected function get_options() {
26
-		if (empty($this->data['newvsreturn'])) {
26
+		if ( empty( $this->data['newvsreturn'] ) ) {
27 27
 			return false;
28 28
 		}
29 29
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 				'text' => $title,
51 51
 				'align' => 'left',
52 52
 				'style' => array(
53
-					'color' => $this->get_color_value($textColor),
53
+					'color' => $this->get_color_value( $textColor ),
54 54
 					'fontSize' => '20px'
55 55
 				)
56 56
 			),
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
 	protected $type = 'graph';
12 12
 
13
-	public function output(){
13
+	public function output() {
14 14
 		$json_data = $this->get_json_data();
15 15
 
16 16
 		if (empty($json_data)) {
Please login to merge, or discard this patch.
gutenberg/site-insights/templates/class-site-insights-metric-template.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 	 */
52 52
 	abstract public function output();
53 53
 
54
-	public function __construct( $attributes, $data ){
54
+	public function __construct( $attributes, $data ) {
55 55
 		$this->attributes = $attributes;
56 56
 		$this->data = $data;
57 57
 	}
@@ -64,11 +64,11 @@  discard block
 block discarded – undo
64 64
 	public function get_json_data() {
65 65
 		$data = $this->get_options();
66 66
 
67
-		if (empty($data)){
67
+		if ( empty( $data ) ) {
68 68
 			return false;
69 69
 		}
70 70
 
71
-		return json_encode($data);
71
+		return json_encode( $data );
72 72
 	}
73 73
 
74 74
 	/**
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 	 */
52 52
 	abstract public function output();
53 53
 
54
-	public function __construct( $attributes, $data ){
54
+	public function __construct( $attributes, $data ) {
55 55
 		$this->attributes = $attributes;
56 56
 		$this->data = $data;
57 57
 	}
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	public function get_json_data() {
65 65
 		$data = $this->get_options();
66 66
 
67
-		if (empty($data)){
67
+		if (empty($data)) {
68 68
 			return false;
69 69
 		}
70 70
 
Please login to merge, or discard this patch.