Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
22 | 4 | public static function debug(array $strings, array $placeholders = []) |
|
23 | { |
||
24 | // Initialize messages storage. |
||
25 | 4 | if (!isset($_SESSION[__TRAIT__])) { |
|
26 | 4 | $_SESSION[__TRAIT__] = []; |
|
27 | 4 | } |
|
28 | |||
29 | // Mark debug message. |
||
30 | 4 | array_unshift($strings, '<question>DEBUG:</question>'); |
|
31 | |||
32 | 4 | $_SESSION[__TRAIT__][] = new Message('comment', 4, $strings, $placeholders, (bool) getenv('BEHAT_DEBUG')); |
|
33 | 4 | } |
|
34 | |||
63 |