| Conditions | 1 |
| Paths | 1 |
| Total Lines | 9 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | public function __construct($filename) |
||
| 17 | { |
||
| 18 | $items = explode('_', $filename); |
||
| 19 | $this->version = $items[0]; |
||
| 20 | |||
| 21 | $this->name = ltrim($filename, $this->version . '_'); |
||
|
|
|||
| 22 | $this->name = basename($this->name, '.php'); |
||
| 23 | $this->className = S::upperCamelize($this->name) . 'Migration'; |
||
| 24 | } |
||
| 25 | |||
| 56 |
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: