MediaFlagAudioSource   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 11
rs 10
wmc 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A getIcon() 0 8 3
1
<?php
2
3
/**
4
 * Audio source flag
5
 *
6
 * @author Stefan Spühler <[email protected]>
7
 * @copyright Copyright &copy; Stefan Spühler 2013-
8
 * @license https://www.gnu.org/licenses/gpl.html The GNU General Public License v3.0
9
 */
10
11
class MediaFlagAudioSource extends MediaFlag
12
{
13
14
	protected function getIcon()
15
	{
16
		if (preg_match('/\.MD\.|\.mic\.dubbed\./i', $this->file))
17
			return 'MD';
18
		else if (preg_match('/\.LD\.|\.line\.dubbed\./i', $this->file))
19
			return 'LD';
20
		else
21
			return false;
22
	}
23
24
}
25