Example code:
<?php
class A extends WP_Widget {
}
When override form()
method from parent, LSP will generate:
<?php
class A extends WP_Widget {
public function form(array )
}
This function signature is incorrect because the array
signature comes from PHPDoc:
/**
* Outputs the settings update form.
*
* @since 2.8.0
*
* @param array $instance Current settings.
* @return string Default return is 'noform'.
*/
public function form($instance)
{
}
Perhaps you should copy the entire signature including the phpdoc in the function of the parent class to the extended class when overriding