Browse Source

RuleSet - extend Symfony

Dariusz Ruminski 8 years ago
parent
commit
0553e035ef
3 changed files with 6 additions and 4 deletions
  1. 0 1
      .php_cs.dist
  2. 3 3
      README.rst
  3. 3 0
      src/RuleSet.php

+ 0 - 1
.php_cs.dist

@@ -29,7 +29,6 @@ return PhpCsFixer\Config::create()
         'ordered_imports' => true,
         'php_unit_strict' => true,
         'phpdoc_add_missing_param_annotation' => true,
-        'phpdoc_no_useless_inheritdoc' => true,
         'phpdoc_order' => true,
         'psr4' => true,
         'strict_comparison' => true,

+ 3 - 3
README.rst

@@ -270,7 +270,7 @@ Choose from the list of available rules:
 * **indentation_type** [@PSR2, @Symfony]
    | Code MUST use configured indentation type.
 
-* **is_null**
+* **is_null** [@Symfony:risky]
    | Replaces is_null(parameter) expression with ``null === parameter``.
    | *Rule is: configurable, risky.*
 
@@ -486,14 +486,14 @@ Choose from the list of available rules:
 * **phpdoc_no_package** [@Symfony]
    | @package and @subpackage annotations should be omitted from phpdocs.
 
-* **phpdoc_no_useless_inheritdoc**
+* **phpdoc_no_useless_inheritdoc** [@Symfony]
    | Classy that does not inherit must not have inheritdoc tags.
 
 * **phpdoc_order**
    | Annotations in phpdocs should be ordered so that param annotations come
    | first, then throws annotations, then return annotations.
 
-* **phpdoc_return_self_reference**
+* **phpdoc_return_self_reference** [@Symfony]
    | The type of ``@return`` annotations of methods returning a reference to
    | itself must the configured one.
    | *Rule is: configurable.*

+ 3 - 0
src/RuleSet.php

@@ -110,6 +110,8 @@ final class RuleSet implements RuleSetInterface
             'phpdoc_no_alias_tag' => true,
             'phpdoc_no_empty_return' => true,
             'phpdoc_no_package' => true,
+            'phpdoc_no_useless_inheritdoc' => true,
+            'phpdoc_return_self_reference' => true,
             'phpdoc_scalar' => true,
             'phpdoc_separation' => true,
             'phpdoc_single_line_var_spacing' => true,
@@ -134,6 +136,7 @@ final class RuleSet implements RuleSetInterface
             'whitespace_after_comma_in_array' => true,
         ),
         '@Symfony:risky' => array(
+            'is_null' => true,
             'no_alias_functions' => true,
             'php_unit_construct' => true,
             'php_unit_dedicate_assert' => true,