Last modified: 2014-04-29 15:13:20 UTC
It seems there are random instances of constructors calling grandparent constructors, for no explicit reason Ideally these should be tidied up/reviewed. Such as r78379... class RevDel_ArchiveItem extends RevDel_RevisionItem { public function __construct( $list, $row ) { - RevDel_Item::__construct( $list, $row ); + parent::__construct( $list, $row );
Hmm, well this sort of thing actually seems to be done on purpose in those classes; RevDel_ArchiveItem and RevDel_ArchivedFileItem set their 'file' or 'revision' members in a different way than their parent classes do, so calling the parent would likely not work as intended. While this works, it might make it easier on future maintenance to refactor the classes a bit: eg RevDel_RevisionItem and RevDel_ArchiveItem could *both* derive from the same parent class which contains their common code, rather than RevDel_ArchiveItem extending RevDel_RevisionItem and then replacing a couple bits. Alternatively, the bit that processes $row should be split out to a second function, so the child class need only override that single function instead of skipping over its parent's constructor. (This would be a smaller code change.)
Marking as Lowest since nobody is working or planning to work on this.