Skip to content

Commit ff3839b

Browse files
committed
[Contributing][CS] Added camelCase, StudlyCaps and underscores in the
example
1 parent c58d597 commit ff3839b

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

contributing/code/standards.rst

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,30 +30,34 @@ example containing most features described below:
3030
3131
namespace Acme;
3232
33-
class Foo
33+
class FooBar
3434
{
3535
const SOME_CONST = 42;
3636
37-
private $foo;
37+
private $fooBar;
3838
3939
/**
4040
* @param string $dummy Some argument description
4141
*/
4242
public function __construct($dummy)
4343
{
44-
$this->foo = $this->transform($dummy);
44+
$this->fooBar = $this->transform($dummy);
4545
}
4646
4747
/**
4848
* @param string $dummy Some argument description
4949
* @return string|null Transformed input
5050
*/
51-
private function transform($dummy)
51+
private function transformText($dummy, $options = array())
5252
{
53+
$mergedOptions = array_merge($options, array(
54+
'some_default' => 'values',
55+
));
56+
5357
if (true === $dummy) {
5458
return;
5559
}
56-
if ('string' === $dummy) {
60+
if ('string' === $dummy && mergedOptions['some_default'] === 'values') {
5761
$dummy = substr($dummy, 0, 5);
5862
}
5963

0 commit comments

Comments
 (0)