Completed
Push — master ( 6a4efb...35b143 )
by Dennis
01:26
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
7
/**
8
 * Class IconSvg
9
 * @package lloc\Msls\Component
10
 */
11
class IconSvg extends Icon {
12
13
	/**
14
	 * @return string
15
	 */
16
	protected function path(): string {
17
		return plugin_dir_path( MSLS_PLUGIN__FILE__ ) . 'css-flags/flags.php';
18
	}
19
20
	/**
21
	 * @param string $language
22
	 *
23
	 * @return string
24
	 */
25
	public function get( string $language ): string {
26
		if ( isset( $this->map[ $language ] ) ) {
27
			return $this->map[ $language ];
28
		}
29
30
		return $this->maybe( $language, 'flag-icon' );
31
	}
32
33
}