| Conditions | 6 |
| Paths | 6 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 54 | public function requireDefaultRecords() |
||
| 55 | { |
||
| 56 | parent::requireDefaultRecords(); |
||
| 57 | if ($a = Config::inst()->get("AdvertisementStyle", "array_of_js_file_options")) { |
||
| 58 | if (is_array($a)) { |
||
| 59 | if (count($a)) { |
||
| 60 | foreach ($a as $k => $v) { |
||
| 61 | if (!AdvertisementStyle::get()->where("Title = '".$k."' OR FileLocation = '".$v."'")->First()) { |
||
| 62 | $o = new AdvertisementStyle(); |
||
| 63 | $o->Title = $k; |
||
| 64 | $o->FileLocation = $v; |
||
| 65 | $o->write(); |
||
| 66 | } |
||
| 67 | } |
||
| 68 | } |
||
| 69 | } |
||
| 70 | } |
||
| 71 | } |
||
| 72 | } |
||
| 73 |
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.