Completed
Push — 21x ( 0e3ed4...f4f4da )
by adam
17:20 queued 21s
created

MapDiff   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getType() 0 3 1
1
<?php
2
3
namespace Diff\DiffOp\Diff;
4
5
/**
6
 * Class representing the diff between to (associative) arrays.
7
 * Since items are identified by keys, it's possible to do meaningful
8
 * recursive diffs. So the DiffOp objects contained by this MapDiff can
9
 * be containers such as MapDiff and ListDiff themselves.
10
 *
11
 * Soft deprecated since 0.4, just use Diff
12
 *
13
 * @since 0.1
14
 * @deprecated since 0.5, just use Diff instead
15
 *
16
 * @license GPL-2.0+
17
 * @author Jeroen De Dauw < [email protected] >
18
 */
19
class MapDiff extends Diff {
20
21
	public function __construct( array $operations = array() ) {
22
		parent::__construct( $operations, true );
23
	}
24
25
	/**
26
	 * @see DiffOp::getType
27
	 *
28
	 * @since 0.1
29
	 *
30
	 * @return string
31
	 */
32
	public function getType() {
33
		return 'map';
34
	}
35
36
}
37