Striktere Codeaufteilung auf Methoden

  • App
    WoltLab Suite Core



    If you take a look at many page and form classes, code is often placed in methods where it - according to the documentation - doesn't belong to. For instance, reading the database object in forms is often done at the end of wcf\page\IPage::readParameters() instead of the beginning of wcf\page\IPage::readData() (creating a database object is reading data). Furthermore, form cleanup often happens in wcf\form\IForm::save() after the data is saved while I personally think that it should be done in wcf\form\AbstractForm::saved() since it has nothing to do with saving data.

    In my opinion, changing this (which I would happily do in a pull request) improve the readability of the code like shorter code per method.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!