| Conditions | 5 |
| Paths | 5 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 5 |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | 14 | public function dispatchDebug($data, $tags = null, $ignoreTraceCalls = 0) { |
|
| 29 | 14 | if($this->isActive()) { |
|
| 30 | 13 | $message = new DebugMessage(); |
|
| 31 | 13 | $message->data = $this->dumper->dump($data); |
|
| 32 | 13 | if($tags) { |
|
|
|
|||
| 33 | 7 | $message->tags = explode('.', $tags); |
|
| 34 | } |
||
| 35 | 13 | if($this->detectTraceAndSource && $ignoreTraceCalls !== null) { |
|
| 36 | 4 | $message->trace = $this->fetchTrace(debug_backtrace(), $message->file, $message->line, $ignoreTraceCalls); |
|
| 37 | } |
||
| 38 | 13 | $this->sendMessage($message); |
|
| 39 | } |
||
| 40 | 14 | } |
|
| 41 | } |
||
| 42 |
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
stringvalues, the empty string''is a special case, in particular the following results might be unexpected: