Completed
Push — master ( d613bc...416f8c )
by Kirill
09:34
created

Game   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 62
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
lcom 0
cbo 0
dl 62
loc 62
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 4 4 1
A setId() 5 5 1
A getChatId() 4 4 1
A setChatId() 5 5 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
3
namespace AppBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
7
/**
8
 * Class Game
9
 * @package AppBundle\Entity
10
 *
11
 * @ORM\Entity
12
 * @ORM\Table(name="game")
13
 */
14 View Code Duplication
class Game
1 ignored issue
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...
15
{
16
    /**
17
     * @return mixed
18
     */
19
    public function getId()
20
    {
21
        return $this->id;
22
    }
23
24
    /**
25
     * @param mixed $id
26
     * @return Game
27
     */
28
    public function setId($id)
29
    {
30
        $this->id = $id;
31
        return $this;
32
    }
33
34
    /**
35
     * @return int
36
     */
37
    public function getChatId()
38
    {
39
        return $this->chatId;
40
    }
41
42
    /**
43
     * @param int $chatId
44
     * @return User
45
     */
46
    public function setChatId($chatId)
47
    {
48
        $this->chatId = $chatId;
49
        return $this;
50
    }
51
    /**
52
     * @ORM\Id
53
     * @ORM\Column(type="integer")
54
     * @ORM\GeneratedValue(strategy="AUTO")
55
     */
56
    protected $id;
57
58
    /**
59
     * @var integer
60
     *
61
     * @ORM\Column(name="chat_id", type="bigint", nullable=false)
62
     */
63
    protected $chatId;
64
    /**
65
     * @var string
66
     *
67
     * @ORM\Column(name="name", type="text")
68
     */
69
    protected $name;
70
    /**
71
     * @ORM\OneToMany(targetEntity="AppBundle\Entity\User", mappedBy="gameId")
72
     */
73
    public $users;
74
    
75
}
76