I'm integrating with a shipping API built in php.

They have a strange coding standard where the comments are between the function name and the first curly bracket.. which - subjectively - makes the code really hard to read.

Is this a particular, albeit non-standard, commenting standard?

Here's an example of a such a function

public function qualityControlDescription($qcCode)
Converts a Quality Control code (e.g. 'U') to a descriptive string.
Input parameters (case-insensitive):
    $qcCode = a Quality Control code, as returned by invokeWebService

    Description string (e.g. 'UNSERVICEABLE'), or "" if not found
    if (is_null($qcCode))
        return "";
    $descriptionMap = $this->qualityControlDescriptionMap();
    $returnVal = $descriptionMap[strtoupper($qcCode)];
    if (is_null($returnVal))
        $returnVal = "";
    return $returnVal;

Related posts

Recent Viewed