| 1 | <?php |
||
| 5 | class ColumnFactory |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @param string $method A method name. |
||
| 9 | * @param array $params Parameters. |
||
| 10 | */ |
||
| 11 | public function __construct($method, $params) |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Create a new instance. |
||
| 19 | * |
||
| 20 | * @return Rentgen\Database\Column |
||
| 21 | */ |
||
| 22 | public function createInstance() |
||
| 56 | } |
||
| 57 |
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: