MediaFlagAudioChannels::getIcon()   A
last analyzed

Complexity

Conditions 6
Paths 6

Size

Total Lines 16
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 6
eloc 13
c 1
b 0
f 0
nc 6
nop 0
dl 0
loc 16
rs 9.2222
1
<?php
2
3
/**
4
 * Audio channels count flag
5
 *
6
 * @author Sam Stenvall <[email protected]>
7
 * @copyright Copyright &copy; Sam Stenvall 2013-
8
 * @license https://www.gnu.org/licenses/gpl.html The GNU General Public License v3.0
9
 */
10
class MediaFlagAudioChannels extends MediaFlagStreamDetails
11
{
12
13
	protected function getIcon()
14
	{
15
		$channels = $this->audio->channels;
16
17
		if ($channels == 10)
18
			return '50px-10';
19
		else if ($channels == 8)
20
			return '50px-8';
21
		else if ($channels == 6)
22
			return '50px-6';
23
		else if ($channels == 2)
24
			return '50px-2';
25
		else if ($channels == 1)
26
			return '50px-1';
27
		else
28
			return false;
29
	}
30
31
}