MediaFlagStreamDetails   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A init() 0 6 1
1
<?php
2
3
/**
4
 * Base class for media flag widgets that use the media's stream details.
5
 *
6
 * @author Sam Stenvall <[email protected]>
7
 * @copyright Copyright &copy; Sam Stenvall 2014-
8
 * @license https://www.gnu.org/licenses/gpl.html The GNU General Public License v3.0
9
 */
10
abstract class MediaFlagStreamDetails extends MediaFlag
11
{
12
13
	/**
14
	 * @var stdClass stream details for a media file
15
	 */
16
	public $streamDetails;
17
18
	/**
19
	 * @var stdClass the audio part of the stream details
20
	 */
21
	protected $audio;
22
23
	/**
24
	 * @var stdClass the video part of the stream details
25
	 */
26
	protected $video;
27
28
	/**
29
	 * Initializes the widget
30
	 */
31
	public function init()
32
	{
33
		parent::init();
34
35
		$this->audio = $this->streamDetails->audio[0];
36
		$this->video = $this->streamDetails->video[0];
37
	}
38
39
}
40