| Conditions | 3 | 
| Paths | 3 | 
| Total Lines | 12 | 
| Code Lines | 6 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 18 | public function run($request)  | 
            ||
| 19 |     { | 
            ||
| 20 |         $path = sprintf('%s/%s', BASE_PATH, BasePage::config()->get('generated_pdf_path')); | 
            ||
| 21 |         if (!file_exists($path)) { | 
            ||
| 22 | return false;  | 
            ||
| 23 | }  | 
            ||
| 24 | |||
| 25 |         exec(sprintf('if [ "$(ls -A %s 2> /dev/null)" != "" ]; then rm %s/*; fi', $path, $path), $output, $return_val); | 
            ||
| 26 | |||
| 27 | // output any errors  | 
            ||
| 28 |         if ($return_val != 0) { | 
            ||
| 29 |             user_error(sprintf('%s failed: ', get_class($this)) . implode("\n", $output), E_USER_ERROR); | 
            ||
| 30 | }  | 
            ||
| 33 |