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 |
||
0 ignored issues
–
show
|
|||
59 | */ |
||
60 | public function setEmail($email) |
||
61 | { |
||
62 | $this->email = $email; |
||
63 | |||
64 | return $this; |
||
0 ignored issues
–
show
|
|||
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; |
||
0 ignored issues
–
show
The property
$ownerId was declared of type integer , but $ownerId is of type string . Maybe add a type cast?
This check looks for assignments to scalar types that may be of the wrong type. To ensure the code behaves as expected, it may be a good idea to add an explicit type cast. $answer = 42;
$correct = false;
$correct = (bool) $answer;
Loading history...
|
|||
83 | |||
84 | return $this; |
||
85 | } |
||
86 | } |
||
87 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths