Skip to content

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

Merged
merged 1 commit into from
Nov 16, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions contributing/documentation/standards.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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*.
Copy link
Contributor

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.


Example
Expand All @@ -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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

singular standard

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

standards should be correct


Level 2
-------
Expand All @@ -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
-------------
Expand All @@ -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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useful

Copy link
Contributor

Choose a reason for hiding this comment

The 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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe there is something special with ;

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

every list item, except the last one, should end with ;

Copy link
Contributor

Choose a reason for hiding this comment

The 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;
Expand All @@ -82,8 +87,11 @@ Example
.. code-block:: php

// src/Foo/Bar.php
namespace Foo;

use Acme\Demo\Cat;
// ...

class Bar
{
// ...
Expand All @@ -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, ...);
}
}

Expand Down