Skip to content

Commit ca3c4d7

Browse files
committed
make coding standards example match the Symfony2 codebase conventions
1 parent 5acc483 commit ca3c4d7

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

contributing/code/standards.rst

+4-7
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,12 @@ example containing most features described below:
6868
}
6969
if ('string' === $dummy) {
7070
if ('values' === $mergedOptions['some_default']) {
71-
$dummy = substr($dummy, 0, 5);
72-
} else {
73-
$dummy = ucwords($dummy);
71+
return substr($dummy, 0, 5);
7472
}
75-
} else {
76-
throw new \RuntimeException(sprintf('Unrecognized dummy option "%s"', $dummy));
73+
74+
return ucwords($dummy);
7775
}
78-
79-
return $dummy;
76+
throw new \RuntimeException(sprintf('Unrecognized dummy option "%s"', $dummy));
8077
}
8178
}
8279

0 commit comments

Comments
 (0)