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 | /** |
||
26 | * @param ORM\ClassMetadata $metadata |
||
27 | */ |
||
28 | public static function loadMetadata(ORM\ClassMetadata $metadata) |
||
29 | { |
||
30 | $builder = new ClassMetadataBuilder($metadata); |
||
31 | $builder |
||
32 | ->setTable('plugin_crm_pipedrive_owners') |
||
33 | ->addIndex(['email'], 'email') |
||
34 | ->addIndex(['owner_id'], 'owner_id') |
||
35 | ; |
||
36 | |||
37 | $builder->addId(); |
||
38 | $builder->addNamedField('email', 'string', 'email'); |
||
39 | $builder->addNamedField('ownerId', 'integer', 'owner_id', true); |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * @return mixed |
||
44 | */ |
||
45 | public function getId() |
||
46 | { |
||
47 | return $this->id; |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * @return string |
||
52 | */ |
||
53 | public function getEmail() |
||
54 | { |
||
55 | return $this->email; |
||
56 | } |
||
57 | |||
58 | /** |
||
59 | * @param string $email |
||
60 | * |
||
61 | * @return Widget |
||
0 ignored issues
–
show
|
|||
62 | */ |
||
63 | public function setEmail($email) |
||
64 | { |
||
65 | $this->email = $email; |
||
66 | |||
67 | return $this; |
||
0 ignored issues
–
show
|
|||
68 | } |
||
69 | |||
70 | /** |
||
71 | * @return string |
||
72 | */ |
||
73 | public function getOwnerId() |
||
74 | { |
||
75 | return $this->ownerId; |
||
76 | } |
||
77 | |||
78 | /** |
||
79 | * @param string $ownerId |
||
80 | * |
||
81 | * @return PipedriveOwner |
||
82 | */ |
||
83 | public function setOwnerId($ownerId) |
||
84 | { |
||
85 | $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...
|
|||
86 | |||
87 | return $this; |
||
88 | } |
||
89 | } |
||
90 |
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