Skip to content

Commit 38f17ec

Browse files
Maik Penzweaverryan
authored andcommitted
PSR-2 conformity and missing class doc block.
Example missing class doc block. Example was not psr-2 conform (only one argument allowed per line for a multi-line function call). Can't add the final line feed to the example thought.
1 parent c48c84c commit 38f17ec

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

contributing/code/standards.rst

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ example containing most features described below:
1818
.. code-block:: php
1919
2020
<?php
21-
21+
2222
/*
2323
* This file is part of the Symfony package.
2424
*
@@ -27,33 +27,38 @@ example containing most features described below:
2727
* For the full copyright and license information, please view the LICENSE
2828
* file that was distributed with this source code.
2929
*/
30-
30+
3131
namespace Acme;
32-
32+
33+
/**
34+
* FooBar class.
35+
*
36+
*/
3337
class FooBar
3438
{
3539
const SOME_CONST = 42;
36-
40+
3741
private $fooBar;
38-
42+
3943
/**
4044
* @param string $dummy Some argument description
4145
*/
4246
public function __construct($dummy)
4347
{
4448
$this->fooBar = $this->transformText($dummy);
4549
}
46-
50+
4751
/**
4852
* @param string $dummy Some argument description
4953
* @return string|null Transformed input
5054
*/
5155
private function transformText($dummy, $options = array())
5256
{
53-
$mergedOptions = array_merge($options, array(
54-
'some_default' => 'values',
55-
));
56-
57+
$mergedOptions = array_merge(
58+
$options,
59+
array('some_default' => 'values', )
60+
);
61+
5762
if (true === $dummy) {
5863
return;
5964
}
@@ -64,10 +69,11 @@ example containing most features described below:
6469
$dummy = ucwords($dummy);
6570
}
6671
}
67-
72+
6873
return $dummy;
6974
}
7075
}
76+
7177
7278
Structure
7379
---------

0 commit comments

Comments
 (0)