WU2: Version Control API and family changes

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
marvil07's picture

Coding:

Comments

Good progress, it looks

sdboyer's picture

Good progress, it looks like. Some comments, keeping in mind that at least some of these things are probably just by virtue of the fact that we've got copy/pasted code and you just haven't had time to get to em yet...

  1. Really, I don't think we're getting much with VersioncontrolAccount::userAccountsLoad(). If it's a menu loader function, just leave it as a function; unless/until the menu system supports doing things like this, then all we're really doing is introducing an extra couple method calls. Given that, at least right now, we're not storing any of that data into static vars in VersioncontrolAccount::getAccounts(). (Unless I missed it).

  2. Things like the static $successor_action_priority array in VersioncontrolItem::getItemHistory() should be declared as class constants.

  3. I don't think including the @access tag is necessary by drupal coding standards. If it helps your doxygen generation, tho, all good.

  4. There are prolly other ones, but one coding convention we have is to get rid of the prepended underscore on function names when they become methods, and just make em protected. f.e. VersioncontrolItem::_badItemWarning.

  5. I would have figured, based on last week's conversation, that it's not just VersioncontrolBackend that's abstract, but also VersioncontrolOperation, VersioncontrolItem, VersioncontrolRepository, etc; that these, too, will be extended by the backends as needed. Although that doesn't require them to be abstract, of course - just that they hold all the shared code that's common to all the vcses.