Not exactly sure how to respond to that...

Look - This your project and I can only make recommendations. I understand the proposal here isn't like your style - that's kind of the whole point :wink:

I think it might make more sense to discuss the merit of the suggestion itself, not its relation to the existing codebase. Because if we continue to compare it with the way you did it for years, we end up with no changes at all.

This example to me is pretty straight forward, as I've said above. The reason why the statements were clumped together was because in a lot of places in the code, you just create tons and tons of variables that are reused. If that's the style then yes, leaving it like that is *consistent*. It is however actually a problem in the codebase. Of course, in this example it is only three lines, but the underlying remedy is the same: Get the things you need where you actually need them. I have already moved lots of variable declarations into if statements when they weren't used except for that one case. In this example, the $users declaration belongs to the foreach, but needs to be placed outside of the if statement since we use it as an empty array if ldap isn't intialized. It is also a separate operation from calling in environmental variables. For me, all that is the reason for putting it right outside of the if and not together with the statements above.

I would be happy to discuss any reasoning to the contrary, but "we used to do it differently"... doesn't really give me anything to discuss.

For a reference, I pushed a commit with [the proposed changes](https://github.com/daviddeutsch/roundcubemail/blob/20de28b9e94a5f001161ca49f0cba183a504a014/plugins/acl/acl.php#L107).