Skip to content

Commit

Permalink
Updated coding standard
Browse files Browse the repository at this point in the history
Specify using "sprintf" in Exception
messages as per @fabpot's recommendation on the mailing list.
  • Loading branch information
dantleech authored and weaverryan committed Apr 11, 2013
1 parent ecea24b commit 3227cf2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions contributing/code/standards.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ example containing most features described below:
} else {
$dummy = ucwords($dummy);
}
} else {
throw new \RuntimeException(sprintf('Unrecognized dummy option "%s"', $dummy));
}

return $dummy;
Expand Down Expand Up @@ -100,10 +102,12 @@ Structure

* Declare class properties before methods;

* Declare public methods first, then protected ones and finally private ones.
* Declare public methods first, then protected ones and finally private ones;

* Use parentheses when instantiating classes regardless of the number of
arguments the constructor has.
arguments the constructor has;

* Exception message strings should be concatenated using :phpfunction:`sprintf`.

Naming Conventions
------------------
Expand Down

0 comments on commit 3227cf2

Please sign in to comment.