Reporting::create_report()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
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