[RCD] Codebase cleanup, PSR-1/2 compliance - and before you say no, I'm offering to do the work

David Deutsch skoremail at gmail.com
Tue Sep 3 14:32:45 CEST 2013


Yes, as per usual in programming: If you do something over and over again
and it's kinda cumbersome, you have an opportunity for optimization.

As for this concrete example - I haven't yet seen enough from the codebase
in-depth to make a call, but I would agree that a more concise input
handler would probably make sense. A good reference might be:
http://www.phptherightway.com/#data_filtering

Like other things discussed earlier, all this talk is definitely v2.0 talk,
of course.

-David



On Tue, Sep 3, 2013 at 2:24 PM, Cor Bosman <cor at xs4all.nl> wrote:

> 1. Linebreaks separating variable declaration blocks
>
> Discussion:
> https://github.com/roundcube/roundcubemail/pull/109#discussion-diff-6064999
>
> I think for this, we will end up reverting some of the changes that I
> made. But we still have to discuss the details - It's just mainly about the
> other devs telling me in what instances it would be permissible to separate
> blocks.
>
>
> I agree with Thomas that maybe this should happen in two phases. A lot of
> the time those variable declaration blocks should maybe be done in a
> totally different way anyways so maybe we should worry about that when we
> get to that. Maybe when we get to use composer more and can actually re-use
> composer elements from other projects.
>
> Example..
>
> $headers        = rcube_utils::get_input_value('_header', rcube_utils::INPUT_POST);
>
> To me this seems overly convoluted.  Ive always wondered why there isnt an
> input class.
>
> $header = Input::post('_header');
>
> Cor
>
>
> _______________________________________________
> Roundcube Development discussion mailing list
> dev at lists.roundcube.net
> http://lists.roundcube.net/mailman/listinfo/dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.roundcube.net/pipermail/dev/attachments/20130903/d4d41a27/attachment-0001.html>


More information about the dev mailing list