| Conditions | 3 |
| Paths | 4 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 37 | public function add($line) |
||
| 38 | { |
||
| 39 | // split into parameter and path |
||
| 40 | $array = array_map('trim', mb_split('\s+', $line, 2)); |
||
| 41 | // strip any invalid characters from path prefix |
||
| 42 | $path = isset($array[1]) ? $this->urlEncode(preg_replace('/[^A-Za-z0-9\.-\/\*\_]/', '', $array[1])) : "/"; |
||
| 43 | $param = array_map('trim', mb_split('&', $array[0])); |
||
| 44 | foreach ($param as $key) { |
||
| 45 | $this->cleanParam[$key][] = $path; |
||
| 46 | } |
||
| 47 | return true; |
||
| 48 | } |
||
| 49 | |||
| 77 |