| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 41 | |||
| 42 | // Remove anything which isn't a word, whitespace, number |
||
| 43 | // or any of the following caracters -_~,;[](). |
||
| 44 | $file = preg_replace("([^\w\s\d\-_~,;\[\]\(\).])", '', $file); |
||
| 45 | |||
| 46 | // Remove any runs of periods |
||
| 47 | $file = preg_replace("([\.]{2,})", '', $file); |
||
| 48 | |||
| 49 | return $file; |
||
| 50 | } |
||
| 51 | |||
| 52 | public function exists(): bool |
||
| 53 | { |
||
| 54 | return $this->filesystem->has($this->filename()); |
||
| 67 |