Skip to content

Commit

Permalink
Merge branch 'feature-php-cs' into 'master'
Browse files Browse the repository at this point in the history
phpcs implementation

See merge request head.trackingsoft/micro-plugin-event-emitter!2
  • Loading branch information
Asisyas committed Feb 2, 2022
2 parents 359bc3f + 1bddcef commit af7ca8b
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 1 deletion.
64 changes: 64 additions & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="pcsg-generated-ruleset">
<file>src/</file>
<arg name="basepath" value="."/>
<arg name="colors"/>
<arg name="no-cache"/>
<description>
Micro Framework - сode formatting rules.
</description>
<rule ref="Generic.CodeAnalysis.EmptyStatement"/>
<rule ref="Generic.CodeAnalysis.JumbledIncrementer"/>
<rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/>
<rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/>
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod"/>
<rule ref="Generic.ControlStructures.InlineControlStructure"/>
<rule ref="Generic.Files.ByteOrderMark"/>
<rule ref="Generic.Files.LineEndings"/>
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="120"/>
<property name="absoluteLineLimit" value="150"/>
</properties>
</rule>
<rule ref="Generic.Formatting.DisallowMultipleStatements"/>
<rule ref="Generic.Formatting.MultipleStatementAlignment"/>
<rule ref="Generic.Formatting.NoSpaceAfterCast"/>
<rule ref="Generic.Functions.CallTimePassByReference"/>
<rule ref="Generic.Functions.OpeningFunctionBraceBsdAllman"/>
<rule ref="Generic.Metrics.CyclomaticComplexity"/>
<rule ref="Generic.Metrics.NestingLevel"/>
<rule ref="Generic.NamingConventions.ConstructorName"/>
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
<rule ref="Generic.NamingConventions.CamelCapsFunctionName"/>
<rule ref="Generic.PHP.DeprecatedFunctions"/>
<rule ref="Generic.PHP.DisallowShortOpenTag"/>
<rule ref="Generic.PHP.ForbiddenFunctions"/>
<rule ref="Generic.PHP.LowerCaseConstant"/>
<rule ref="Generic.PHP.NoSilencedErrors"/>
<rule ref="Generic.Strings.UnnecessaryStringConcat"/>
<rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
<rule ref="MySource.PHP.EvalObjectFactory"/>
<rule ref="MySource.PHP.GetRequestData"/>
<rule ref="PEAR.Classes.ClassDeclaration"/>
<rule ref="PEAR.Commenting.InlineComment"/>
<rule ref="PEAR.ControlStructures.MultiLineCondition"/>
<rule ref="PEAR.Files.IncludingFile"/>
<rule ref="PEAR.Formatting.MultiLineAssignment"/>
<rule ref="PEAR.Functions.ValidDefaultValue"/>
<rule ref="PEAR.NamingConventions.ValidClassName"/>
<rule ref="PEAR.WhiteSpace.ObjectOperatorIndent"/>
<rule ref="PEAR.WhiteSpace.ScopeClosingBrace"/>
<rule ref="PEAR.WhiteSpace.ScopeIndent"/>
<rule ref="PSR1.Classes.ClassDeclaration"/>
<rule ref="PSR1.Files.SideEffects"/>
<rule ref="PSR2.Classes.ClassDeclaration"/>
<rule ref="PSR2.Classes.PropertyDeclaration"/>
<rule ref="PSR2.ControlStructures.ControlStructureSpacing"/>
<rule ref="PSR2.ControlStructures.ElseIfDeclaration"/>
<rule ref="PSR2.ControlStructures.SwitchDeclaration"/>
<rule ref="PSR2.Files.EndFileNewline"/>
<rule ref="PSR2.Methods.MethodDeclaration"/>
<rule ref="PSR2.Namespaces.NamespaceDeclaration"/>
<rule ref="PSR2.Namespaces.UseDeclaration"/>
</ruleset>
2 changes: 1 addition & 1 deletion src/Business/Facade/EventsFacade.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class EventsFacade implements EventsFacadeInterface
* @param EventEmitterFactoryInterface $eventEmitterFactory
*/
public function __construct(
private EventEmitterFactoryInterface $eventEmitterFactory
private EventEmitterFactoryInterface $eventEmitterFactory
)
{
$this->eventEmitter = $this->eventEmitterFactory->create();
Expand Down

0 comments on commit af7ca8b

Please sign in to comment.