| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | public function register() |
||
| 21 | { |
||
| 22 | return [ |
||
| 23 | \Almendra\Validators\Types\IntegerType::class => 'integer', |
||
| 24 | \Almendra\Validators\Types\StringType::class => 'string', |
||
| 25 | \Almendra\Validators\Types\FloatType::class => 'float', |
||
| 26 | \Almendra\Validators\Types\DoubleType::class => 'double', |
||
| 27 | \Almendra\Validators\Types\FileType::class => 'file', |
||
| 28 | ]; |
||
| 29 | } |
||
| 30 | |||
| 45 |
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: