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

Actor::getName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
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