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

Debug   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
dl 0
loc 12
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A prettyPrint() 0 3 1
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