1 | <?php |
||
4 | class Creator |
||
5 | { |
||
6 | protected $points = array(), |
||
|
|||
7 | $labels = array(); |
||
8 | |||
9 | public function __construct($points = null) |
||
19 | |||
20 | protected function pointNotExists($point) |
||
32 | |||
33 | protected function addPoint($point) |
||
41 | |||
42 | public function add($point) |
||
54 | |||
55 | public function get($id) |
||
66 | |||
67 | public function getOrFail($id) |
||
77 | } |
||
78 |
Only declaring a single property per statement allows you to later on add doc comments more easily.
It is also recommended by PSR2, so it is a common style that many people expect.