GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( a42b47...a111ac )
by Florian
03:12
created

Car::getTitle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 3
Ratio 100 %

Importance

Changes 1
Bugs 1 Features 1
Metric Value
c 1
b 1
f 1
dl 3
loc 3
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the Stinger Enity Search package.
5
 *
6
 * (c) Oliver Kotte <[email protected]>
7
 * (c) Florian Meyer <[email protected]>
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12
namespace StingerSoft\EntitySearchBundle\Tests\Fixtures\ORM;
13
14
use Doctrine\ORM\Mapping as ORM;
15
use StingerSoft\EntitySearchBundle\Model\SearchableEntity;
16
use StingerSoft\EntitySearchBundle\Model\Document;
17
18
/**
19
 * @ORM\Entity
20
 */
21 View Code Duplication
class Car implements SearchableEntity {
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
22
23
	/**
24
	 * @ORM\Id @ORM\Column(type="string")
25
	 */
26
	private $title;
27
28
	/**
29
	 * @ORM\Id @ORM\Column(type="integer")
30
	 */
31
	private $year;
32
33
	public function __construct($title, $year) {
34
		$this->title = $title;
35
		$this->year = $year;
36
	}
37
38
	public function getTitle() {
39
		return $this->title;
40
	}
41
42
	public function getYearOfProduction() {
43
		return $this->year;
44
	}
45
46
	/**
47
	 *
48
	 * {@inheritDoc}
49
	 *
50
	 * @see \StingerSoft\EntitySearchBundle\Model\SearchableEntity::indexEntity()
51
	 */
52
	public function indexEntity(Document &$document) {
53
		$document->addField(Document::FIELD_TITLE, $this->getTitle());
54
		return self::$index;
55
	}
56
}