-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Added some doc standards #2994
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added some doc standards #2994
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ Sphinx | |
shorthand); | ||
* Inline hyperlinks are **not** used. Seperate the link and their target | ||
definition, which you add on the bottom of the page; | ||
* Inline markup should be closed at the same line as the open-string; | ||
* You should use a form of *you* instead of *we*. | ||
|
||
Example | ||
|
@@ -26,8 +27,8 @@ Example | |
Example | ||
======= | ||
|
||
When you are working on the docs, you should follow the `Symfony Docs`_ | ||
standards. | ||
When you are working on the docs, you should follow the | ||
`Symfony Documentation`_ standards. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. singular standard There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. standards should be correct |
||
|
||
Level 2 | ||
------- | ||
|
@@ -43,7 +44,7 @@ Example | |
|
||
echo 'You cannot use the :: shortcut here'; | ||
|
||
.. _`Symfony Docs`: http://symfony.com/doc/current/contributing/documentation/standards.html | ||
.. _`Symfony Documentation`: http://symfony.com/doc/current/contributing/documentation/standards.html | ||
|
||
Code Examples | ||
------------- | ||
|
@@ -60,6 +61,10 @@ Code Examples | |
* Description of the folded code: (optional) | ||
If you fold several lines: the description of the fold can be placed after the ``...`` | ||
If you fold only part of a line: the description can be placed before the line; | ||
* If usefull, a PHP file should start with the namespace declaration; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. useful There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. extra ;? |
||
* When using use statements, only the first code block of an article shows the | ||
full statement block. In further examples, this block is folded with a | ||
``// ...`` comment and only new use statements are displayed; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe there is something special with ; There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. every list item, except the last one, should end with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks, i did not know this |
||
* If useful, a ``codeblock`` should begin with a comment containing the filename | ||
of the file in the code block. Don't place a blank line after this comment, | ||
unless the next line is also a comment; | ||
|
@@ -82,8 +87,11 @@ Example | |
.. code-block:: php | ||
|
||
// src/Foo/Bar.php | ||
namespace Foo; | ||
|
||
use Acme\Demo\Cat; | ||
// ... | ||
|
||
class Bar | ||
{ | ||
// ... | ||
|
@@ -93,9 +101,11 @@ Example | |
// set foo with a value of bar | ||
$foo = ...; | ||
|
||
$cat = new Cat($foo); | ||
|
||
// ... check if $bar has the correct value | ||
|
||
return $foo->baz($bar, ...); | ||
return $cat->baz($bar, ...); | ||
} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1st person i
2nd person you
3rd person he/she/it
I think this should be switched to 2nd person, so
you should use second person in your writing.