Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
42 | public function __sleep() { |
||
43 | // Instead of serializing the referenced plugin, we just serialize the |
||
44 | // plugin id and configuration. |
||
45 | if ($this->plugin instanceof TypeSystemPluginInterface) { |
||
46 | $this->plugin = [ |
||
|
|||
47 | 'id' => $this->plugin->getPluginId(), |
||
48 | 'type' => $this->plugin->getPluginDefinition()['pluginType'], |
||
49 | 'configuration' => $this->plugin instanceof ConfigurablePluginInterface ? $this->plugin->getConfiguration() : [], |
||
50 | ]; |
||
51 | } |
||
52 | |||
53 | return array_keys(get_object_vars($this)); |
||
54 | } |
||
55 | |||
56 | } |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..