Completed
Push — develop ( d1baa7...5a0a71 )
by Peter
11:28
created

functions.php ➔ p()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 2
c 1
b 0
f 1
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
/**
3
 * Webino (http://webino.sk/)
4
 *
5
 * @link        https://github.com/webino/WebinoDev/ for the canonical source repository
6
 * @copyright   Copyright (c) 2014 Webino, s. r. o. (http://webino.sk/)
7
 * @license     BSD-3-Clause
8
 */
9
10
/**
11
 * Alias for var_dump()
12
 *
13
 * @param mixed $subject
14
 */
15
function d($subject) {
16
    var_dump($subject);
17
}
18
19
/**
20
 * Diyng var_dump()
21
 *
22
 * @param mixed $subject
23
 */
24
function dd($subject) {
25
    var_dump($subject);
26
    exit;
27
}
28
29
/**
30
 * Alias for print_r() scream
31
 *
32
 * @param mixed $subject
33
 */
34
function p($subject) {
35
    print_r($subject);
36
}
37
38
/**
39
 * Dying print_r() scream
40
 *
41
 * @param mixed $subject
42
 */
43
function pd($subject) {
44
    print_r($subject);
45
    exit;
46
}
47
48
/**
49
 * Alias for print_r() return
50
 *
51
 * @param mixed $subject
52
 * @return string
53
 */
54
function pr($subject) {
55
    return print_r($subject, true);
56
}
57
58
/**
59
 * Web debugger break point
60
 *
61
 * Sometimes is useful by throwing an exception to check a backtrace.
62
 *
63
 * @link https://github.com/webino/WebinoDebug Web debugger
64
 * @param string $msg
65
 */
66
function e($msg = '') {
67
    throw new \WebinoDev\Exception\DevelopmentException($msg);
68
}
69
70
/**
71
 * For testing purposes only
72
 *
73
 * @return bool
74
 */
75
function isSelenium()
76
{
77
    return file_exists('tmp/common/selenium.lock');
78
}
79