| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 48 | public static function getCategoryByName(&$obj, $val, $record) |
||
|
|
|||
| 49 | { |
||
| 50 | $val = Convert::raw2sql($val); |
||
| 51 | $category = LocationCategory::get()->filter(array('Name' => $val))->First(); |
||
| 52 | if (!$category) { |
||
| 53 | $category = LocationCategory::create(); |
||
| 54 | $category->Name = $val; |
||
| 55 | $category->write(); |
||
| 56 | } |
||
| 57 | |||
| 58 | return $category; |
||
| 59 | } |
||
| 61 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.