@@ -3008,6 +3008,8 @@ List of Available Rules
Empty body of class, interface, trait, enum or function must be abbreviated as ``{}`` and placed on the same line as the previous symbol, separated by a single space.
+ Part of rule set `@PhpCsFixer <./ruleSets/PhpCsFixer.rst>`_
+
`Source PhpCsFixer\\Fixer\\Basic\\SingleLineEmptyBodyFixer <./../src/Fixer/Basic/SingleLineEmptyBodyFixer.php>`_
- `single_line_throw <./rules/function_notation/single_line_throw.rst>`_
@@ -58,6 +58,7 @@ Rules
- `return_assignment <./../rules/return_notation/return_assignment.rst>`_
- `self_static_accessor <./../rules/class_notation/self_static_accessor.rst>`_
- `single_line_comment_style <./../rules/comment/single_line_comment_style.rst>`_
+- `single_line_empty_body <./../rules/basic/single_line_empty_body.rst>`_
- `whitespace_after_comma_in_array <./../rules/array_notation/whitespace_after_comma_in_array.rst>`_ with config:
``['ensure_single_space' => true]``
@@ -22,3 +22,11 @@ Example #1
-{
-}
+) {}
+Rule sets
+---------
+The rule is part of the following rule set:
+- `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_
@@ -26,7 +26,5 @@ final class NullCacheManager implements CacheManagerInterface
return true;
}
- public function setFile(string $file, string $fileContent): void
- {
- }
+ public function setFile(string $file, string $fileContent): void {}
@@ -19,6 +19,4 @@ namespace PhpCsFixer\ConfigurationException;
*
* @internal
*/
-final class InvalidForEnvFixerConfigurationException extends InvalidFixerConfigurationException
+final class InvalidForEnvFixerConfigurationException extends InvalidFixerConfigurationException {}
-final class RequiredFixerConfigurationException extends InvalidFixerConfigurationException
+final class RequiredFixerConfigurationException extends InvalidFixerConfigurationException {}
@@ -21,11 +21,7 @@ use PhpCsFixer\FixerFileProcessedEvent;
final class NullOutput implements ProgressOutputInterface
{
- public function printLegend(): void
+ public function printLegend(): void {}
- public function onFixerFileProcessed(FixerFileProcessedEvent $event): void
+ public function onFixerFileProcessed(FixerFileProcessedEvent $event): void {}
@@ -39,9 +39,7 @@ final class PhpUnitTargetVersion
public const VERSION_8_4 = '8.4';
public const VERSION_NEWEST = 'newest';
- private function __construct()
+ private function __construct() {}
public static function fulfills(string $candidate, string $target): bool
@@ -21,6 +21,4 @@ use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;
-final class InvalidOptionsForEnvException extends InvalidOptionsException
+final class InvalidOptionsForEnvException extends InvalidOptionsException {}
@@ -21,6 +21,4 @@ namespace PhpCsFixer\Linter;
* @TODO 4.0 make class "final"
-class LintingException extends \RuntimeException
+class LintingException extends \RuntimeException {}