Skip to content

Commit

Permalink
Merge pull request cakephp#1203 from dereuromark/master-cleanups
Browse files Browse the repository at this point in the history
unify handling of expressions
  • Loading branch information
markstory committed Mar 29, 2014
2 parents fb23d28 + d933956 commit 009289b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions en/contributing/cakephp-coding-conventions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -167,18 +167,18 @@ sign (=).
Method definition
=================

Example of a function definition::
Example of a method definition::

function someFunction($arg1, $arg2 = '') {
public function someFunction($arg1, $arg2 = '') {
if (expr) {
statement;
}
return $var;
}

Parameters with a default value, should be placed last in function
definition. Try to make your functions return something, at least true
or false = so it can be determined whether the function call was
definition. Try to make your functions return something, at least ``true``
or ``false``, so it can be determined whether the function call was
successful::

public function connection($dns, $persistent = false) {
Expand Down Expand Up @@ -265,7 +265,7 @@ When including files with classes or libraries, use only and always the
PHP tags
========

Always use long tags (``<?php ?>``) Instead of short tags (<? ?>).
Always use long tags (``<?php ?>``) Instead of short tags (``<? ?>``).

Naming convention
=================
Expand Down Expand Up @@ -304,7 +304,7 @@ Member visibility
-----------------

Use PHP5's private and protected keywords for methods and variables. Additionally,
protected method or variable names start with a single underscore ("\_"). Example::
protected method or variable names start with a single underscore (``_``). Example::

class A {
protected $_iAmAProtectedVariable;
Expand All @@ -314,7 +314,7 @@ protected method or variable names start with a single underscore ("\_"). Exampl
}
}

Private methods or variable names start with double underscore ("\_\_"). Example::
Private methods or variable names start with double underscore (``__``). Example::

class A {
private $__iAmAPrivateVariable;
Expand Down Expand Up @@ -349,7 +349,7 @@ and "example.net", for example:
* WWW: `http://www.example.com <http://www.example.com>`_
* FTP: `ftp://ftp.example.com <ftp://ftp.example.com>`_

The ``example.com`` domain name has been reserved for this (see :rfc:`2606`) and is recommended
The "example.com" domain name has been reserved for this (see :rfc:`2606`) and is recommended
for use in documentation or as examples.

Files
Expand Down

0 comments on commit 009289b

Please sign in to comment.