| 1 | <?php |
||
| 25 | trait QueryTrait |
||
| 26 | { |
||
| 27 | /** |
||
| 28 | * Returns the status tag. |
||
| 29 | * |
||
| 30 | * @return Tag |
||
| 31 | */ |
||
| 32 | 1 | public function getStatusTag() |
|
| 33 | { |
||
| 34 | 1 | return $this->getTagOfGroup(Tag::GROUP_STATUS); |
|
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Returns the type tag. |
||
| 39 | * |
||
| 40 | * @return Tag |
||
| 41 | */ |
||
| 42 | public function getTypeTag() |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Returns the resolution tag. |
||
| 49 | * |
||
| 50 | * @return Tag |
||
| 51 | */ |
||
| 52 | 1 | public function getResolutionTag() |
|
| 56 | |||
| 57 | /** |
||
| 58 | * Return tag by it group name. |
||
| 59 | * |
||
| 60 | * @param string $group |
||
| 61 | * |
||
| 62 | * @return Tag |
||
| 63 | */ |
||
| 64 | 1 | protected function getTagOfGroup($group) |
|
| 70 | } |
||
| 71 |
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: