FontAwesomeAdapter   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A format() 0 3 1
1
<?php
2
3
namespace hamburgscleanest\DataTables\Models\ColumnFormatters\Adapters\Icon;
4
5
/**
6
 * Class IconAdapter
7
 * @package hamburgscleanest\DataTables\Models\ColumnFormatters
8
 */
9
class FontAwesomeAdapter implements IconAdapter {
10
11
    /**
12
     * Return the icon,
13
     * e.g. FontAwesome: <i class="fa fa-{$iconName}"></i>
14
     *
15
     * @param string $iconName
16
     * @return string
17
     */
18 1
    public function format(string $iconName) : string
19
    {
20 1
        return '<i class="fa fa-' . $iconName . '"></i>';
21
    }
22
}