[phpMyAdmin Developers] Question about PSR1
marc at infomarc.info
Sat Dec 5 15:37:28 CET 2015
Le 2015-12-05 09:08, Hugues Peccatte a écrit :
> Le sam. 5 déc. 2015 à 13:57, Marc Delisle <marc at infomarc.info
> <mailto:marc at infomarc.info>> a écrit :
> We have some PSR1 Scrutinizer warnings in many files. For example, in
> "For compatibility and reusability of your code, PSR1 recommends that a
> file should either new symbols (like classes, functions, etc.) or have
> side-effects (like outputting something, or including other files), but
> not both at the same time. The first symbol is defined on line 20 and
> the first side effect is on line 9."
> Is it true that PSR1 objects to our having a define() statement and
> ordinary code like chdir() in the same file?
> Marc Delisle | phpMyAdmin
> Developers mailing list
> Developers at phpmyadmin.net <mailto:Developers at phpmyadmin.net>
> Yes, that's true because one of the rules is not to have declaration and
> logic code in the same file. Define is declaration, chdir is logic.
Do you suggest we ignore this rule? To respect it, we would need to
change our constants to something else.
Marc Delisle | phpMyAdmin
More information about the Developers