1 | <?php |
||
9 | class kOpt implements AlgorithmTravelingSalesman |
||
10 | { |
||
11 | /* |
||
12 | * For more info see |
||
13 | * http://en.wikipedia.org/wiki/k-opt |
||
14 | */ |
||
15 | |||
16 | private |
||
17 | $existingRoute, |
||
18 | $graph; |
||
19 | |||
20 | public function setExistingRoute(NodePath $existingRoute) |
||
24 | |||
25 | public function setGraph(NodeGraph $graph) |
||
29 | |||
30 | public function computeRoute() |
||
34 | } |
||
35 |
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.