| Conditions | 7 |
| Paths | 7 |
| Total Lines | 23 |
| Code Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 50 | private function getType($value) |
||
| 51 | { |
||
| 52 | if (is_object($value)) { |
||
| 53 | switch (true) { |
||
| 54 | case $value instanceof \DateTime: |
||
| 55 | return 'date'; |
||
| 56 | case $value instanceof \ArrayIterator: |
||
| 57 | return 'collection'; |
||
| 58 | default: |
||
| 59 | return 'text'; |
||
| 60 | } |
||
| 61 | } |
||
| 62 | |||
| 63 | switch (gettype($value)) { |
||
| 64 | case 'boolean': |
||
| 65 | return 'checkbox'; |
||
| 66 | case 'array': |
||
| 67 | return 'collection'; |
||
| 68 | case 'string': |
||
| 69 | default: |
||
| 70 | return 'text'; |
||
| 71 | } |
||
| 72 | } |
||
| 73 | } |
||
| 74 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.