Completed
Push — master ( 8c42c0...969118 )
by Timo
14s
created

FontAwesomeAdapter   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 14
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A format() 0 4 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
}