Passed
Push — master ( d021a5...a13070 )
by Sam
03:47 queued 12s
created

Actor   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 1
Metric Value
eloc 8
c 2
b 0
f 1
dl 0
loc 34
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __toString() 0 3 1
A getName() 0 3 1
1
<?php
2
3
/**
4
 * Represents an actor
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 Actor implements ITypeaheadData
11
{
12
13
	const MEDIA_TYPE_MOVIE = 'movie';
14
	const MEDIA_TYPE_TVSHOW = 'tvshow';
15
16
	/**
17
	 * @var string
18
	 */
19
	public $name;
20
21
	/**
22
	 * @var string
23
	 */
24
	public $role;
25
26
	/**
27
	 * @var string
28
	 */
29
	public $thumbnail;
30
	
31
	public function getName()
32
	{
33
		return $this->name;
34
	}
35
36
	/**
37
	 * Converts the object to a string. This is necessary in order to filter 
38
	 * duplicate actors with functions such as array_unique()
39
	 * @return string the string representation of the actor
40
	 */
41
	public function __toString()
42
	{
43
		return $this->name;
44
	}
45
46
}
47