Skip to content

Commit

Permalink
Merge pull request #1 from saltybeagle/master
Browse files Browse the repository at this point in the history
Minor spelling corrections
  • Loading branch information
pmjones committed Mar 6, 2012
2 parents af71f89 + 69be98c commit 550dc72
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Expand Up @@ -7,7 +7,7 @@ Some projects prefix function and method names with a single underscore to indic

Whatever naming convention is used should be applied consistently within a reasonable scope. That scope may be vendor-level, package-level, class-level, or function-level.

Class properties should explictly note the visibility keyword.
Class properties should explicitly note the visibility keyword.

<?php
namespace Vendor\Package;
Expand Down
Expand Up @@ -17,7 +17,7 @@ To support readability, contiguous assignments may be aligned on the equals sign
Multi-Line Assignment
---------------------

Assigments may be split onto several lines when the line length limit is exceeded. The equal sign has to be positioned onto the following line, and indented once.
Assignments may be split onto several lines when the line length limit is exceeded. The equal sign has to be positioned onto the following line, and indented once.

$this->longArrayPropertyName[$this->someOtherPropertyValue]
= $object->getFunctionResult(ClassName::CONSTANT_VALUE);
Expand Down Expand Up @@ -62,7 +62,7 @@ When assigning by reference, the `&` should be attached to the variable, not the
Array Assignment
----------------

Array assignemnts may be split across subsequent lines; they should be indented once per array, and should be aligned on the `=>` double arrow. The last value in each array should have a trailing comma; this is valid syntax and reduces the chance of syntax violations when adding new elements.
Array assignments may be split across subsequent lines; they should be indented once per array, and should be aligned on the `=>` double arrow. The last value in each array should have a trailing comma; this is valid syntax and reduces the chance of syntax violations when adding new elements.

$an_array = [
'foo' => 'bar',
Expand Down
Expand Up @@ -25,7 +25,7 @@ Strongly consider using static class methods rather than functions; this will he
Methods
-------

Class methods are always be prefixed with an explicit vsibility keyword:
Class methods are always be prefixed with an explicit visibility keyword:

<?php
public function fooBarBaz($arg1, $arg2, $arg3 = [], $arg4 = null)
Expand Down
Expand Up @@ -134,7 +134,7 @@ A `foreach` statement looks like the following. Note the placement of parenthes
Formatting of Conditions
------------------------

Conditon sets for `if`, `switch`, etc. statements should fit on one line. If the set of conditions cannot fit on one line, extract the conditions into an explaining variable and use that variable as the condition. For example, the following long condition set ...
Condition sets for `if`, `switch`, etc. statements should fit on one line. If the set of conditions cannot fit on one line, extract the conditions into an explaining variable and use that variable as the condition. For example, the following long condition set ...

if (($condition1 && $condition2 && very_long_function_name())
|| $condition3 || $condition4) {
Expand Down

0 comments on commit 550dc72

Please sign in to comment.