Reporting   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 16
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A create_report() 0 6 1
A parse_data() 0 5 1
1
<?php
2
namespace DummyPress;
3
4
/**
5
 * Reporting wrapper class
6
 *
7
 * Class to standardize the reporting and status functionality of the plugin.
8
 *
9
 * @package    WordPress
10
 * @subpackage Evans
11
 * @author     Mike Selander
12
 */
13
class Reporting {
14
15
	public function create_report( $data ) {
16
17
		$cleaned = json_encode( $this->parse_data( $data ) );
18
		return $cleaned;
19
20
	}
21
22
	private function parse_data( $data ) {
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
23
24
		return $data;
25
26
	}
27
28
}
29