improved code styles #158 (#172)

* use php-cs-fixer instead of phpcodesniffer
* updated scrutinizer config
* adjusted code yules to all files
* updated CONTRIBUTING guidelines
This commit is contained in:
Kevin Papst
2018-06-22 21:09:10 +02:00
committed by GitHub
parent 773d27bb0e
commit cd7cbeae88
142 changed files with 775 additions and 467 deletions

View File

@@ -22,7 +22,6 @@ use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInt
*/
class ThemeOptionsSubscriber implements EventSubscriberInterface
{
/**
* @var TokenStorageInterface
*/
@@ -69,11 +68,11 @@ class ThemeOptionsSubscriber implements EventSubscriberInterface
$skin = '';
foreach ($user->getPreferences() as $ref) {
$name = $ref->getName();
if ($name === UserPreference::SKIN) {
if (UserPreference::SKIN === $name) {
$skin = 'skin-' . $ref->getValue();
}
if (strpos($name, 'theme.') !== false) {
if (false !== strpos($name, 'theme.')) {
$this->helper->setOption(str_replace('theme.', '', $name), $ref->getValue());
}
}
@@ -97,7 +96,7 @@ class ThemeOptionsSubscriber implements EventSubscriberInterface
}
// ignore events like the toolbar where we do not have a token
if ($this->storage->getToken() === null) {
if (null === $this->storage->getToken()) {
return false;
}