| Conditions | 4 |
| Paths | 6 |
| Total Lines | 12 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | public function debug($stop = true) { |
||
| 28 | if(array_key_exists('debug_formatter', $this->options)) { |
||
| 29 | $this->options['debug_formatter'](); |
||
| 30 | } elseif(PHP_SAPI === 'cli') { |
||
| 31 | echo "\n{$this->__toString()}\n"; |
||
| 32 | } else { |
||
| 33 | echo "<pre>{$this->__toString()}</pre>"; |
||
| 34 | } |
||
| 35 | if($stop) { |
||
| 36 | exit; |
||
|
|
|||
| 37 | } |
||
| 38 | return $this; |
||
| 39 | } |
||
| 67 |
In general, usage of exit should be done with care and only when running in a scripting context like a CLI script.