| Total Complexity | 2 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | class LocationCsvBulkLoader extends CsvBulkLoader |
||
| 12 | { |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var array |
||
| 16 | */ |
||
| 17 | public $columnMap = array( |
||
| 18 | 'Name' => 'Title', |
||
| 19 | 'City' => 'Suburb', |
||
| 20 | 'EmailAddress' => 'Email', |
||
| 21 | 'Category' => 'Category.Name', |
||
| 22 | 'Import_ID' => 'Import_ID', |
||
| 23 | ); |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @var array |
||
| 27 | */ |
||
| 28 | public $duplicateChecks = array( |
||
| 29 | 'Import_ID' => 'Import_ID' |
||
| 30 | ); |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @var array |
||
| 34 | */ |
||
| 35 | public $relationCallbacks = array( |
||
| 36 | 'Category.Name' => array( |
||
| 37 | 'relationname' => 'Category', |
||
| 38 | 'callback' => 'getCategoryByName', |
||
| 39 | ), |
||
| 40 | ); |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @param $obj |
||
| 44 | * @param $val |
||
| 45 | * @param $record |
||
| 46 | * @return \SilverStripe\ORM\DataObject|static |
||
| 47 | */ |
||
| 48 | public static function getCategoryByName(&$obj, $val, $record) |
||
| 61 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.