this issue lists all sniffs currently implemented in this repository as described in the documentation section of the symfony coding standard.
this issue can be marked as resolved once the example class at the bottom triggers all mentioned errors when checked with this standard (be sure to remove all comment lines before checking and ignore the multiple classes per file error).
the requirement of a license is debatable as it's specific to contributing to the symfony code base.
we might want to consider implementing this sniff and make it a type warning in the ruleset.xml so it can easily be ignored for builds by a phpcs --config-set show_warnings 0 ?
Documentation
[x] Add PHPDoc blocks for all classes, methods, and functions;.
[x] Group annotations together so that annotations of the same type immediately follow each other, and annotations of a different type are separated by a single blank line;.
[x] Omit the @return tag if the method does not return anything;.
[x] The @package and @subpackage annotations are not used..
[x] The license block has to be present at the top of every PHP file, before the namespace.
<?php
// the license block has to be present at the top of every PHP file, before the namespace
namespace Symfony;
// Add PHPDoc blocks for all classes, methods, and functions;
class Foo
{
/**
* Group annotations together so that annotations of the same type immediately follow each other, and annotations of a different type are separated by a single blank line
* @Baz("qux")
* @Corge("grault")
* @Baz("qux")
*/
private $bar;
/**
* Omit the @return tag if the method does not return anything
*
* @return void
*/
public function __construct($bar)
{
$this->bar = $bar;
}
// Add PHPDoc blocks for all classes, methods, and functions;
protected function bar()
{
}
// Add PHPDoc blocks for all classes, methods, and functions;
private function baz()
{
}
}
/**
* @package baz
*/
class Bar
{
}
this issue lists all sniffs currently implemented in this repository as described in the documentation section of the symfony coding standard.
this issue can be marked as resolved once the example class at the bottom triggers all mentioned errors when checked with this standard (be sure to remove all comment lines before checking and ignore the multiple classes per file error).
the requirement of a license is debatable as it's specific to contributing to the symfony code base. we might want to consider implementing this sniff and make it a type
warning
in theruleset.xml
so it can easily be ignored for builds by aphpcs --config-set show_warnings 0
?Documentation