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

@@ -16,7 +16,7 @@ use Avanzu\AdminThemeBundle\Model\MenuItemModel;
*/
class ConfigureAdminMenuEvent extends ConfigureMenuEvent
{
const CONFIGURE = 'app.admin_menu_configure';
public const CONFIGURE = 'app.admin_menu_configure';
/**
* This function will either return a MenuItem or null.

View File

@@ -14,5 +14,5 @@ namespace App\Event;
*/
class ConfigureMainMenuEvent extends ConfigureMenuEvent
{
const CONFIGURE = 'app.main_menu_configure';
public const CONFIGURE = 'app.main_menu_configure';
}

View File

@@ -12,7 +12,6 @@ namespace App\Event;
use Avanzu\AdminThemeBundle\Event\SidebarMenuEvent;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Component\Security\Core\Authorization\AuthorizationChecker;
/**
* The ConfigureMenuEvent is used for populating navigations.

View File

@@ -18,7 +18,7 @@ use Symfony\Component\EventDispatcher\Event;
*/
class UserPreferenceEvent extends Event
{
const CONFIGURE = 'app.user_preferences';
public const CONFIGURE = 'app.user_preferences';
/**
* @var User
@@ -64,7 +64,7 @@ class UserPreferenceEvent extends Event
foreach ($this->preferences as $pref) {
if ($pref->getName() == $preference->getName()) {
throw new \InvalidArgumentException(
'Cannot add preference, a preference with the name "'.$preference->getName().'" is already existing'
'Cannot add preference, one with the name "' . $preference->getName() . '" is already existing'
);
}
}