[Phpmyadmin-devel] Refactoring: Displaying query results
Chanaka Dharmarathna
pe.chanaka.ck at gmail.com
Mon Jun 11 21:41:50 CEST 2012
On Sun, Jun 10, 2012 at 5:02 AM, Marc Delisle <marc at infomarc.info> wrote:
> Le 2012-06-09 15:44, Chanaka Dharmarathna a écrit :
> > On Fri, Jun 8, 2012 at 10:58 AM, Chanaka Dharmarathna <
> > pe.chanaka.ck at gmail.com> wrote:
> >
> >> Hi All,
> >>
> >> I have a doubt of using *@see* tag in Docblock comments for functions.
> >> In the comments of functions PMA_getTable() and PMA_getTableBody() in
> >> display_tbl.lib.php file, @see tag is used for different purposes.
> >> As I feel PMA_getTableBody() used that corrrectly.
> >> What should be the actual behavior ?
> >>
> >> Regards !
> >> --
> >> ____________________________________
> >>
> >> Chanaka Indrajith
> >> Bsc.Computer Engineering Undergraduate
> >> Faculty of Engineering
> >> University of Peradeniya
> >> Sri Lanka
> >> ____________________________________
> >>
> >>
> > Hi All,
> >
> > I am fixing some code violations in my code now.
> > For remove code violation of large comparison in a if condition, what
> would
> > be the better approach ?
> >
> > Ex:-
> > if ((PMA_strlen($wkbval) > $GLOBALS['cfg']['LimitChars'])
> > && ($_SESSION['tmp_user_values']['display_text'] ==
> > self::DISPLAY_PARTIAL_TEXT)
> > ) {
> > // code
> > }
> >
> > Is that good to use tempory variable insted of using
> > $_SESSION['tmp_user_values']['display_text'] ?
> >
> > Regards !
>
> Chanaka,
> what kind of code violation is it? A line too long?
>
> If it's the case, well we should adjust our violations tests because for
> me, introducing an unneeded temporary variable just for that would
> reduce readability.
>
> --
> Marc Delisle
> http://infomarc.info
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Phpmyadmin-devel mailing list
> Phpmyadmin-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
>
Hi Marc,
Thanks for replying.
Yes, code sniffer gives warning saying line is too long.
I also feel its not a good idea to use temporary variable if only it is not
used couple of time.
Shall we define convention for this kind of scenario so that everywhere
handle this kind of situation in same way.
Regards !
--
____________________________________
Chanaka Indrajith
Bsc.Computer Engineering Undergraduate
Faculty of Engineering
University of Peradeniya
Sri Lanka
____________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20120612/53605bc2/attachment.html>
More information about the Developers
mailing list