Passed
Push — master ( 6ac651...0a307d )
by
unknown
13:21
created
gutenberg/site-insights/templates/scorecard/class-scorecard-pageviews.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 = 'scorecard';
12 12
 
13
-	public function output(){
13
+	public function output() {
14 14
 		$data = $this->get_options();
15 15
 
16
-		if (empty($data)) {
16
+		if ( empty( $data ) ) {
17 17
 			return false;
18 18
 		}
19 19
 
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 
25 25
 		$left = $this->get_card_template(
26 26
 			'left',
27
-			__('Avg. Session Duration', 'google-analytics-for-wordpress'),
27
+			__( 'Avg. Session Duration', 'google-analytics-for-wordpress' ),
28 28
 			$duration,
29 29
 			$prev_duration,
30 30
 			__( 'vs. Previous 30 days', 'google-analytics-for-wordpress' ),
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 
34 34
 		$right = $this->get_card_template(
35 35
 			'right',
36
-			__('Bounce Rate', 'google-analytics-for-wordpress'),
36
+			__( 'Bounce Rate', 'google-analytics-for-wordpress' ),
37 37
 			$bounce_rate,
38 38
 			$prev_bounce_rate,
39 39
 			__( 'vs. Previous 30 days', 'google-analytics-for-wordpress' ),
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	 * @return array|false
53 53
 	 */
54 54
 	protected function get_options() {
55
-		if ( empty($this->data['infobox'])) {
55
+		if ( empty( $this->data['infobox'] ) ) {
56 56
 			return false;
57 57
 		}
58 58
 
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 = 'scorecard';
12 12
 
13
-	public function output(){
13
+	public function output() {
14 14
 		$data = $this->get_options();
15 15
 
16 16
 		if (empty($data)) {
Please login to merge, or discard this patch.
gutenberg/site-insights/templates/scorecard/class-scorecard-gender.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 = 'scorecard';
12 12
 
13
-	public function output(){
13
+	public function output() {
14 14
 		$data = $this->get_options();
15 15
 
16
-		if (empty($data)) {
16
+		if ( empty( $data ) ) {
17 17
 			return false;
18 18
 		}
19 19
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 	 * @return array|false
35 35
 	 */
36 36
 	protected function get_options() {
37
-		if (empty($this->data['gender'])) {
37
+		if ( empty( $this->data['gender'] ) ) {
38 38
 			return false;
39 39
 		}
40 40
 
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 
46 46
 		$rows = array();
47 47
 
48
-		foreach ($data as $key => $item) {
48
+		foreach ( $data as $key => $item ) {
49 49
 			$rows[$key] = array(
50 50
 				$item['gender'],
51 51
 				$item['sessions'],
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 = 'scorecard';
12 12
 
13
-	public function output(){
13
+	public function output() {
14 14
 		$data = $this->get_options();
15 15
 
16 16
 		if (empty($data)) {
Please login to merge, or discard this patch.
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.