1 | <?php |
||
10 | trait DNSisAlreadyConfigured |
||
11 | { |
||
12 | /** |
||
13 | * Check if DNS is already configured. |
||
14 | * |
||
15 | * @param null $domain |
||
16 | * @param null $ip |
||
17 | * @return bool |
||
18 | */ |
||
19 | protected function dnsResolutionIsOk($domain = null, $ip = null) |
||
37 | |||
38 | /** |
||
39 | * Obtain domain. |
||
40 | * |
||
41 | * @return mixed |
||
42 | */ |
||
43 | protected function obtainDomain() |
||
47 | |||
48 | /** |
||
49 | * Obtain IP. |
||
50 | * |
||
51 | * @return mixed |
||
52 | */ |
||
53 | protected function obtainIp() |
||
57 | } |
||
58 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: