Topic: Remove double return in hooks.inc

The file includes/hooks.inc has it's last class method default_get_dispatchable_quantity() called only in the page's last function hook_get_dispatchable_quantity().

1. Is this set of functions necessary here?
2. The said method has two consecutive return statements - remove or comment one of them if they should be there for some alternative workaround for a different set of PHP versions.

Re: Remove double return in hooks.inc

@joe: fix redundant returns.

Re: Remove double return in hooks.inc

Excuse me, but I see no problems here.

The last function either return the $result (if not null) or return the outcome from the static function default_get_dispatchable_quantity().
This function maybe called from a derived class of Hook.

I will, however, ask Janusz for a comment on this.

/Joe

Re: Remove double return in hooks.inc

Yes, indeed in default_get_dispatchable_quantity() the last line was sparse. Fixed in repo.
While this hook is not used in main code, it can be used by extensions.
Janusz