| 1 | <?php |
||
| 24 | class HashtableReplacer extends Replacer { |
||
| 25 | private $table, $index; |
||
|
|
|||
| 26 | |||
| 27 | /** |
||
| 28 | * @param array $table |
||
| 29 | * @param int $index |
||
| 30 | */ |
||
| 31 | public function __construct( $table, $index = 0 ) { |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @param array $matches |
||
| 38 | * @return mixed |
||
| 39 | */ |
||
| 40 | public function replace( array $matches ) { |
||
| 43 | } |
||
| 44 |
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.