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...
42
{
43
$class = new static($addressString);
44
$class->setCountry($country);
45
return $class->_parse($addressString);
46
}
47
48
/**
49
* CarpCai <2018/12/1 10:19 PM>
50
*/
51
public function parse($addressString)
52
{
53
return $this->_parse($addressString);
54
}
55
56
/**
57
* CarpCai <2018/12/1 10:46 PM>
58
* @param $addressString
59
* @param string $country
60
* @return AddressStruct
61
*/
62
private function _parse($addressString, $country = AddressStruct::US)
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.