Conditions | 6 |
Paths | 6 |
Total Lines | 19 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
44 | public function getValueFromData($data) |
||
45 | { |
||
46 | $returnValue = ""; |
||
47 | $value = (isset($data[$this->Name])) ? $data[$this->Name] : false; |
||
48 | if ($value) { |
||
49 | if (is_array($value)) { |
||
50 | foreach ($value as $key => $dataEntered) { |
||
51 | $key = str_replace("Field", "", $key); |
||
52 | $key = str_replace("m", "mother-", $key); |
||
53 | $key = str_replace("f", "father-", $key); |
||
54 | if (!$dataEntered) { |
||
55 | $dataEntered = "---"; |
||
56 | } |
||
57 | $returnValue .= "<br />$key: $dataEntered "; |
||
58 | } |
||
59 | } |
||
60 | } |
||
61 | return $returnValue; |
||
62 | } |
||
63 | |||
69 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.