Conditions | 4 |
Paths | 2 |
Total Lines | 7 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 4.128 |
Changes | 0 |
1 | <?php |
||
32 | 5 | protected function validateManagerType($type) |
|
33 | { |
||
34 | 5 | $managerType = $this->container->getParameter($type); |
|
35 | 5 | if ('mongodb' !== $managerType && 'orm' != $managerType && 'odm' != $managerType) { |
|
36 | throw new UnsupportedException("Unsupported manager type: $managerType"); |
||
37 | } |
||
38 | 5 | } |
|
39 | |||
49 |
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: