We have PHPCS setup now in https://gerrit.wikimedia.org/r/c/mediawiki/skins/Cosmos/+/633045, with some issues fixed so far. There's still much more left though. Let's work on enabling all of these.
- Merged: patchset 633316
- Generic.Arrays.DisallowLongArraySyntax.Found
- Generic.Functions.FunctionCallArgumentSpacing.SpaceBeforeComma
- Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed
- Merged: patchset 633302
- Generic.PHP.ForbiddenFunctions.FoundWithAlternative
- MediaWiki.Usage.ForbiddenFunctions.sizeof
- Merged: patchset 633305
- Generic.ControlStructures.InlineControlStructure.NotAllowed
- MediaWiki.ControlStructures.IfElseStructure.SpaceBeforeElse
- Merged: patchset 633050
- MediaWiki.Classes.UnusedUseStatement.UnnecessaryUse
- MediaWiki.Classes.UnsortedUseStatements.UnsortedUse
- MediaWiki.Classes.UnusedUseStatement.UnusedUse
- Merged: patchset 633324
- MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment
- MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.SingleSpaceBeforeSingleLineComment
- Merged: patchset 633289
- PSR12.Files.ImportStatement.LeadingSlash
- PSR12.Properties.ConstantVisibility.NotFound
- Merged: patchset 633051
- PSR2.Classes.PropertyDeclaration.ScopeMissing
- PSR2.ControlStructures.ElseIfDeclaration.NotAllowed
- PSR2.Files.EndFileNewline.TooMany
- PSR2.Methods.FunctionClosingBrace.SpacingBeforeClose
- PSR2.Namespaces.NamespaceDeclaration.BlankLineAfter
- PSR2.Namespaces.UseDeclaration.SpaceAfterLastUse
- Merged: patchset 633290
- Squiz.Classes.SelfMemberReference.SpaceBefore
- Squiz.Classes.SelfMemberReference.NotUsed