Completed
Push — master ( eaef00...15db70 )
by Dennis
01:23
created

IconSvg::path()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace lloc\Msls\Component\Icon;
4
5
use lloc\Msls\Component\Icon;
6
use lloc\Msls\MslsPlugin;
7
8
/**
9
 * Class IconSvg
10
 * @package lloc\Msls\Component
11
 */
12
class IconSvg extends Icon {
13
14
	/**
15
	 * @return string
16
	 */
17
	protected function get_include(): string {
18
		return MslsPlugin::plugin_dir_path( 'css-flags/flags.php' );
19
	}
20
21
	/**
22
	 * @param string $language
23
	 *
24
	 * @return string
25
	 */
26
	public function get( string $language ): string {
27
		if ( isset( $this->map[ $language ] ) ) {
28
			return $this->map[ $language ];
29
		}
30
31
		return $this->maybe( $language, 'flag-icon-' );
32
	}
33
34
}