| Conditions | 5 | 
| Paths | 5 | 
| Total Lines | 20 | 
| Code Lines | 10 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 0 | 
| CRAP Score | 30 | 
| Changes | 0 | ||
| 1 | <?php | ||
| 26 | } | ||
| 27 | |||
| 28 | private function parseOptions(string $param) | ||
| 29 |     { | ||
| 30 |         if ($param == 'nullable') { | ||
| 31 | return $this->nullable = true; | ||
| 32 | } | ||
| 33 | |||
| 34 |         if ($param == 'unique') { | ||
| 35 | return $this->unique = true; | ||
| 36 | } | ||
| 37 | |||
| 38 |         if (starts_with($param, 'default(')) { | ||
| 39 |             preg_match('/\((.*)\)/', $param, $match); | ||
| 40 | |||
| 41 | return $this->default = $match[1]; | ||
|  | |||
| 42 | } | ||
| 43 | } | ||
| 44 | |||
| 45 | /** | ||
| 46 | * @return string | ||
| 69 | 
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: