Issues (3627)

plugins/MauticCrmBundle/Entity/PipedriveOwner.php (1 issue)

1
<?php
2
3
namespace  MauticPlugin\MauticCrmBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use Mautic\CoreBundle\Doctrine\Mapping\ClassMetadataBuilder;
7
8
class PipedriveOwner
9
{
10
    /**
11
     * @var int
12
     */
13
    private $id;
14
15
    /**
16
     * @var string
17
     */
18
    private $email;
19
20
    /**
21
     * @var int
22
     */
23
    private $ownerId;
24
25
    public static function loadMetadata(ORM\ClassMetadata $metadata)
26
    {
27
        $builder = new ClassMetadataBuilder($metadata);
28
        $builder
29
            ->setTable('plugin_crm_pipedrive_owners')
30
            ->addIndex(['email'], 'email')
31
            ->addIndex(['owner_id'], 'owner_id')
32
        ;
33
34
        $builder->addId();
35
        $builder->addNamedField('email', 'string', 'email');
36
        $builder->addNamedField('ownerId', 'integer', 'owner_id', true);
37
    }
38
39
    /**
40
     * @return mixed
41
     */
42
    public function getId()
43
    {
44
        return $this->id;
45
    }
46
47
    /**
48
     * @return string
49
     */
50
    public function getEmail()
51
    {
52
        return $this->email;
53
    }
54
55
    /**
56
     * @param string $email
57
     *
58
     * @return Widget
59
     */
60
    public function setEmail($email)
61
    {
62
        $this->email = $email;
63
64
        return $this;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this returns the type MauticPlugin\MauticCrmBundle\Entity\PipedriveOwner which is incompatible with the documented return type MauticPlugin\MauticCrmBundle\Entity\Widget.
Loading history...
65
    }
66
67
    /**
68
     * @return string
69
     */
70
    public function getOwnerId()
71
    {
72
        return $this->ownerId;
73
    }
74
75
    /**
76
     * @param string $ownerId
77
     *
78
     * @return PipedriveOwner
79
     */
80
    public function setOwnerId($ownerId)
81
    {
82
        $this->ownerId = $ownerId;
83
84
        return $this;
85
    }
86
}
87