[PHPCodeSniffer](https://www.mediawiki.org/wiki/Continuous_integration/PHP_CodeSniffer) helps us stick to same coding standards across MediaWiki and it's extensions. Currently `PageImages` [phpcs config](https://phabricator.wikimedia.org/diffusion/EPIM/browse/master/.phpcs.xml) differs from the MediaWiki one - the following sniffs are disabled:
[x] MediaWiki.Commenting.FunctionComment.MissingParamComment
[x] MediaWiki.Commenting.FunctionComment.MissingParamTag
[x] MediaWiki.Commenting.FunctionComment.MissingReturn
[x] MediaWiki.Commenting.FunctionComment.ParamNameNoMatch
[x] MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic
[x] MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName
[x] MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment
[] MediaWiki.Files.ClassMatchesFilename.NotMatch" />
[ ] MediaWiki.Files.ClassMatchesFilename.WrongCase" />
[ ] MediaWiki.Files.OneClassPerFile.MultipleFound" />
Runing `phpcs` without those sniffs gives 47 errors and 3 warnings in 8 files.
== Google Code In
@jdlrobson will mentor this.
The task should be timeboxed till 2-3hrs - work on re-enabling one sniff at a time. If you exceed the timebox push what you managed - every little bit helps!
To get setup install https://github.com/squizlabs/PHP_CodeSniffer globally and then run the following inside the MobileFrontend repo
```
phpcs -p -s
```
They should all pass as we are excluding certain rules inside .phpcs.xml
== Plan (YMMV)
[] Remove a sniff from the `.phpcs.xml` file, run `composer phpcs` or `phpcs -p -s`, get a list of violations,
provide patches in [Wikimedia Gerrit](https://www.mediawiki.org/wiki/Gerrit/Tutorial) to fix the violations. **If** you fix all violations for one sniff, also commit the removal of the exclusion from `.phpcs.xml` too.
== AC
[] As many of the sniffs are made to pass as is possible.
[] If a sniff can't be made to pass for some reason, then document it as close as possible to the line disabling the sniff.