Completed
Push — try/code-signature-diff ( 313026...01fa4f )
by
unknown
08:13
created

Declaration::partial_match()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Automattic\Jetpack\Analyzer\Declarations;
4
5
use Automattic\Jetpack\Analyzer\PersistentList\Item as PersistentListItem;
6
7
abstract class Declaration extends PersistentListItem {
8
	public $path;
9
	public $line;
10
11
	function __construct( $path, $line ) {
12
		$this->path = $path;
13
		$this->line = $line;
14
	}
15
16
	function match( $other ) {
17
		return get_class( $other ) === get_class( $this )
18
			&& $other->display_name() === $this->display_name(); // hack
19
	}
20
21
	function partial_match( $other ) {
22
		// TODO
23
		return false;
24
	}
25
26
	// a simple name, like 'method'
27
	abstract function type();
28
29
	// e.g. Jetpack::get_file_url_for_environment()
30
	abstract function display_name();
31
}