Passed
Pull Request — main (#4)
by Peter
03:15
created

Debug::prettyPrint()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 3
dl 0
loc 3
rs 10
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AbterPhp\Framework\Helper;
6
7
class Debug
8
{
9
    /**
10
     * @param string $str
11
     * @param mixed  $val
12
     * @param mixed  ...$extra
13
     *
14
     * @return string
15
     */
16
    public static function prettyPrint(string $str, $val, ...$extra): string
17
    {
18
        return sprintf($str, print_r($val, true), ...$extra);
19
    }
20
}
21