Completed
Push — main ( bb2763...a8dc43 )
by Peter
26s queued 13s
created

Css   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A toStyles() 0 8 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AbterPhp\Framework\Html\Helper;
6
7
class Css
8
{
9
    /**
10
     * @param array<string,string> $styles
11
     *
12
     * @return string
13
     */
14
    public static function toStyles(array $styles): string
15
    {
16
        $tmp = [];
17
        foreach ($styles as $k => $v) {
18
            $tmp[] = sprintf('%s: %s', $k, $v);
19
        }
20
21
        return implode('; ', $tmp);
22
    }
23
}
24