It is generally recommended to explicitly declare the visibility for methods.
Adding explicit visibility (private, protected, or public) is generally
recommend to communicate to other developers how, and from where this method
is intended to be used.
Loading history...
39
{
40
48
$this->propertyKey = $propertyKey;
41
48
$this->propertyValue = $propertyValue;
42
48
}
43
44
/**
45
* @return string
46
*/
47
19
public function getPropertyKey()
48
{
49
19
return $this->propertyKey;
50
}
51
52
/**
53
* @return string
54
*/
55
19
public function getPropertyValue()
56
{
57
19
return $this->propertyValue;
58
}
59
60
/**
61
* {@inheritdoc}
62
*/
63
6
public function compareTo($other)
64
{
65
6
if (0 !== $keyDiff = strcmp($this->propertyKey, $other->propertyKey)) {
66
3
return $keyDiff;
67
}
68
69
6
if (0 !== $valDiff = strcmp($this->propertyValue, $other->propertyValue)) {
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.