1 | <?php |
||
20 | class SyncElementToHubSpotJob extends BaseJob implements \Serializable |
||
21 | { |
||
22 | use FieldAttributeTrait, |
||
23 | ElementAttributeTrait; |
||
24 | |||
25 | /** |
||
26 | * @var string|null |
||
27 | */ |
||
28 | public $objectId; |
||
29 | |||
30 | /** |
||
31 | * @var callable|array|string |
||
32 | */ |
||
33 | public $transformer; |
||
34 | |||
35 | /** |
||
36 | * @inheritdoc |
||
37 | * @return bool |
||
38 | */ |
||
39 | public function execute($queue) |
||
53 | |||
54 | /** |
||
55 | * @inheritdoc |
||
56 | */ |
||
57 | public function serialize() |
||
66 | |||
67 | /** |
||
68 | * @inheritdoc |
||
69 | */ |
||
70 | public function unserialize($serialized) |
||
77 | } |
||
78 |
Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code: