[Phpmyadmin-devel] coding standards for phpmyadmin

Dieter Adriaenssens dieter.adriaenssens at gmail.com
Sun Sep 1 15:50:28 CEST 2013


2013/9/1 Mohamed Ashraf <mohamed.ashraf.213 at gmail.com>:
>
> On Sunday, September 1, 2013 at 2:52 PM, Dieter Adriaenssens wrote:
>
> 2013/9/1 Mohamed Ashraf <mohamed.ashraf.213 at gmail.com>:
>
>
> On Sun, Sep 1, 2013 at 2:11 PM, Dieter Adriaenssens
> <dieter.adriaenssens at gmail.com> wrote:
>
>
> 2013/8/31 Mohamed Ashraf <mohamed.ashraf.213 at gmail.com>:
>
> I was looking but didnt find the phpma coding standard for things like
> docs,
> function names and conventions.
>
> The question I was looking for was the function name convention for
> library
> function since I saw two standards being followed in the codebase and I
> am
> not sure which is correct.
>
>
> If I'm not mistaken, PHP library methods should have this form
> (following the PEAR standard) :
>
> PMA_someFunction()
>
> - PMA prefix
> - camelCasing
>
> What other kind of standard did you find?
>
> PMA_generate_common_hidden_inputs
> I did not know if we are using underscores or camel casing. I looked at the
> pear standard and found out about the rest of the conventions for code. but
> not the documentation convention.
>
>
> Yes, camelCase. But phpMyAdmin has a history of 15 years and
> refactoring is still ongoing, so you might find some other styles as
> well.
>
> for example if a function returns two things how is that represented in the
> documentation.
>
>
> I don't understand what you mean? A function can have only one return value.
> Do you mean that a function returns an array? Or an object? Or has a
> 'byReference' parameter? Or sets a global variable?
>
> The array way. How would that be documented.

Describe the structure (item names and types) of the array. If you
think it is difficult to add it after the @returns tag, explain the
array structure in the description of the method and refer to it from
the comment after ther @returns tag.



-- 
Kind regards,

Dieter Adriaenssens




More information about the Developers mailing list