Coding Standard Question
| From: | Pedro Padron | Date: | Fri, 14 Nov 2008 01:57:49 +0000 |
| Subject: | Coding Standard Question | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-51079@lists.php.net to get a copy of this message | ||
Hi there,
I have just finished a package that will be proposed to PEAR, but since this
is my first experience with the PEAR coding standard, I have a question.
When running phpcs against my code, I get 2 errors for the following code
snippet:
function setShippingAddress(array $shippingAddress = array())
{
$this->_setAddress(
$shippingInfo,
Payment_PagamentoCerto_Order::ADDRESS_TYPE_SHIPPING
);
}
The errors are:
ERROR | Space after opening parenthesis of function call prohibited
ERROR | Space before closing parenthesis of function call prohibited
If I put both parameters in the same line, it will exceed 85 characters.
If I try to avoid both errors, I end up with ugly code:
$this->_setAddress($shippingInfo,
Payment_PagamentoCerto_Order::ADDRESS_TYPE_SHIPPING);
In this particular case, how should I proceed?
Thanks,
Pedro Padron