1 | <?php |
||
37 | class RmaCallback extends AbstractProductImportCallback |
||
38 | { |
||
39 | |||
40 | /** |
||
41 | * The utility instance with the RMA keys. |
||
42 | * |
||
43 | * @var \TechDivision\Import\Product\Ee\Utils\RmaKeysInterface |
||
44 | */ |
||
45 | protected $rmaKeys; |
||
46 | |||
47 | /** |
||
48 | * Initializes the callback with the RMA keys instance. |
||
49 | * |
||
50 | * @param \TechDivision\Import\Product\Ee\Utils\RmaKeysInterface $rmaKeys The instance |
||
51 | */ |
||
52 | public function __construct(RmaKeysInterface $rmaKeys) |
||
56 | |||
57 | /** |
||
58 | * Will be invoked by a observer it has been registered for. |
||
59 | * |
||
60 | * @param \TechDivision\Import\Observers\AttributeCodeAndValueAwareObserverInterface|null $observer The observer |
||
61 | * |
||
62 | * @return int The converted value |
||
63 | */ |
||
64 | public function handle(AttributeCodeAndValueAwareObserverInterface $observer = null) : int |
||
73 | |||
74 | /** |
||
75 | * Return's the instance with the RMA keys. |
||
76 | * |
||
77 | * @return \TechDivision\Import\Product\Ee\Utils\RmaKeysInterface The instance |
||
78 | */ |
||
79 | protected function getRmaKeys() : RmaKeysInterface |
||
83 | } |
||
84 |
It seems like you allow that null is being passed for a parameter, however the function which is called does not seem to accept null.
We recommend to add an additional type check (or disallow null for the parameter):