| 1 | <?php |
||
| 7 | class ReferenceManipulator |
||
| 8 | { |
||
| 9 | public function __construct(ReferenceRepository $referenceRepository) |
||
| 13 | |||
| 14 | public function createReferenceName($className, array $attributes = array()) |
||
| 22 | |||
| 23 | private function generateUniqueReferenceName($referenceName) |
||
| 33 | |||
| 34 | private function incrementReferenceName($referenceName) |
||
| 50 | } |
||
| 51 |
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: