Skip to content

Commit

Permalink
PHP CS Fixer v2 (ezsystems#89)
Browse files Browse the repository at this point in the history
* Update PHP CS Fixer to v2

* Ran CS fixer
  • Loading branch information
emodric authored and andrerom committed Apr 13, 2017
1 parent 9683ad3 commit 1b060ab
Show file tree
Hide file tree
Showing 174 changed files with 298 additions and 130 deletions.
36 changes: 16 additions & 20 deletions .php_cs
@@ -1,29 +1,25 @@
<?php

return Symfony\CS\Config\Config::create()
->setUsingLinter(false)
->setUsingCache(true)
->level(Symfony\CS\FixerInterface::SYMFONY_LEVEL)
->fixers([
'concat_with_spaces',
'-concat_without_spaces',
'-empty_return',
'-phpdoc_params',
'-phpdoc_separation',
'-phpdoc_to_comment',
'-spaces_cast',
'-blankline_after_open_tag',
'-single_blank_line_before_namespace',
// psr0 has weird issues with our PSR-4 layout, so deactivating it.
'-psr0',
return PhpCsFixer\Config::create()
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'concat_space' => ['spacing' => 'one'],
'array_syntax' => false,
'simplified_null_return' => false,
'phpdoc_align' => false,
'phpdoc_separation' => false,
'phpdoc_to_comment' => false,
'cast_spaces' => false,
'blank_line_after_opening_tag' => false,
'phpdoc_no_alias_tag' => false,
])
->finder(
Symfony\CS\Finder\DefaultFinder::create()
->setRiskyAllowed(true)
->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude([
'vendor',
])
->files()->name('*.php')
)
;

3 changes: 2 additions & 1 deletion bundle/Cache/LegacyCachePurger.php
Expand Up @@ -6,6 +6,7 @@
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/

namespace eZ\Bundle\EzPublishLegacyBundle\Cache;

use eZ\Bundle\EzPublishLegacyBundle\LegacyMapper\Configuration;
Expand Down Expand Up @@ -57,7 +58,7 @@ private function getLegacyKernel()
/**
* Clears any caches necessary.
*
* @param string $cacheDir The cache directory.
* @param string $cacheDir the cache directory
*/
public function clear($cacheDir)
{
Expand Down
3 changes: 2 additions & 1 deletion bundle/Cache/PersistenceCachePurger.php
Expand Up @@ -6,6 +6,7 @@
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/

namespace eZ\Bundle\EzPublishLegacyBundle\Cache;

use Symfony\Component\HttpKernel\CacheClearer\CacheClearerInterface;
Expand Down Expand Up @@ -285,7 +286,7 @@ public function user($id = null)
/**
* Clears any caches necessary.
*
* @param string $cacheDir The cache directory.
* @param string $cacheDir the cache directory
*/
public function clear($cacheDir)
{
Expand Down
1 change: 1 addition & 0 deletions bundle/Cache/Switchable.php
Expand Up @@ -5,6 +5,7 @@
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/

namespace eZ\Bundle\EzPublishLegacyBundle\Cache;

trait Switchable
Expand Down
1 change: 1 addition & 0 deletions bundle/Cache/SwitchableHttpCachePurger.php
Expand Up @@ -5,6 +5,7 @@
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/

namespace eZ\Bundle\EzPublishLegacyBundle\Cache;

use eZ\Publish\Core\MVC\Symfony\Cache\GatewayCachePurger;
Expand Down
1 change: 1 addition & 0 deletions bundle/Collector/LegacyTemplatesCollector.php
Expand Up @@ -6,6 +6,7 @@
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/

namespace eZ\Bundle\EzPublishLegacyBundle\Collector;

use Symfony\Component\HttpFoundation\Request;
Expand Down
1 change: 1 addition & 0 deletions bundle/Collector/TemplateDebugInfo.php
Expand Up @@ -6,6 +6,7 @@
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/

namespace eZ\Bundle\EzPublishLegacyBundle\Collector;

use eZ\Publish\Core\MVC\Legacy\Kernel as LegacyKernel;
Expand Down
1 change: 1 addition & 0 deletions bundle/Command/LegacyBundleInstallCommand.php
Expand Up @@ -6,6 +6,7 @@
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/

namespace eZ\Bundle\EzPublishLegacyBundle\Command;

use RuntimeException;
Expand Down
1 change: 1 addition & 0 deletions bundle/Command/LegacyConfigurationCommand.php
Expand Up @@ -6,6 +6,7 @@
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/

namespace eZ\Bundle\EzPublishLegacyBundle\Command;

use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
Expand Down
1 change: 1 addition & 0 deletions bundle/Command/LegacyEmbedScriptCommand.php
Expand Up @@ -6,6 +6,7 @@
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/

namespace eZ\Bundle\EzPublishLegacyBundle\Command;

use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
Expand Down
1 change: 1 addition & 0 deletions bundle/Command/LegacyWrapperInstallCommand.php
Expand Up @@ -6,6 +6,7 @@
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/

namespace eZ\Bundle\EzPublishLegacyBundle\Command;

use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
Expand Down
1 change: 1 addition & 0 deletions bundle/Composer/ScriptHandler.php
Expand Up @@ -6,6 +6,7 @@
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/

namespace eZ\Bundle\EzPublishLegacyBundle\Composer;

use Sensio\Bundle\DistributionBundle\Composer\ScriptHandler as DistributionBundleScriptHandler;
Expand Down
1 change: 1 addition & 0 deletions bundle/Controller.php
Expand Up @@ -6,6 +6,7 @@
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/

namespace eZ\Bundle\EzPublishLegacyBundle;

use eZ\Bundle\EzPublishCoreBundle\Controller as BaseController;
Expand Down
3 changes: 2 additions & 1 deletion bundle/Controller/LegacyKernelController.php
Expand Up @@ -6,6 +6,7 @@
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/

namespace eZ\Bundle\EzPublishLegacyBundle\Controller;

use eZ\Bundle\EzPublishLegacyBundle\LegacyResponse\LegacyResponseManager;
Expand Down Expand Up @@ -46,7 +47,7 @@ class LegacyKernelController
*/
private $legacyResponseManager;

/** @var \eZ\Publish\Core\MVC\Legacy\Templating\LegacyHelper; */
/** @var \eZ\Publish\Core\MVC\Legacy\Templating\LegacyHelper; */
private $legacyHelper;

/**
Expand Down
1 change: 1 addition & 0 deletions bundle/Controller/LegacyRestController.php
Expand Up @@ -6,6 +6,7 @@
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/

namespace eZ\Bundle\EzPublishLegacyBundle\Controller;

use eZ\Publish\Core\MVC\Symfony\Controller\Controller;
Expand Down
1 change: 1 addition & 0 deletions bundle/Controller/LegacySetupController.php
Expand Up @@ -6,6 +6,7 @@
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/

namespace eZ\Bundle\EzPublishLegacyBundle\Controller;

use eZ\Publish\Core\MVC\Legacy\Kernel\Loader;
Expand Down
1 change: 1 addition & 0 deletions bundle/Controller/LegacyTreeMenuController.php
Expand Up @@ -6,6 +6,7 @@
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/

namespace eZ\Bundle\EzPublishLegacyBundle\Controller;

use eZ\Publish\Core\MVC\Symfony\Controller\Controller;
Expand Down
1 change: 1 addition & 0 deletions bundle/Controller/PreviewController.php
Expand Up @@ -6,6 +6,7 @@
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/

namespace eZ\Bundle\EzPublishLegacyBundle\Controller;

use eZ\Publish\API\Repository\Values\Content\Content;
Expand Down
1 change: 1 addition & 0 deletions bundle/Controller/WebsiteToolbarController.php
Expand Up @@ -6,6 +6,7 @@
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/

namespace eZ\Bundle\EzPublishLegacyBundle\Controller;

use eZ\Publish\API\Repository\ContentService;
Expand Down
1 change: 1 addition & 0 deletions bundle/DependencyInjection/Compiler/LegacyBundlesPass.php
Expand Up @@ -6,6 +6,7 @@
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/

namespace eZ\Bundle\EzPublishLegacyBundle\DependencyInjection\Compiler;

use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
Expand Down
1 change: 1 addition & 0 deletions bundle/DependencyInjection/Compiler/LegacyPass.php
Expand Up @@ -6,6 +6,7 @@
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/

namespace eZ\Bundle\EzPublishLegacyBundle\DependencyInjection\Compiler;

use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
Expand Down
1 change: 1 addition & 0 deletions bundle/DependencyInjection/Compiler/LegacySessionPass.php
Expand Up @@ -6,6 +6,7 @@
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/

namespace eZ\Bundle\EzPublishLegacyBundle\DependencyInjection\Compiler;

use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
Expand Down
Expand Up @@ -6,6 +6,7 @@
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/

namespace eZ\Bundle\EzPublishLegacyBundle\DependencyInjection\Compiler;

use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
Expand Down
Expand Up @@ -6,6 +6,7 @@
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/

namespace eZ\Bundle\EzPublishLegacyBundle\DependencyInjection\Compiler;

use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
Expand Down
1 change: 1 addition & 0 deletions bundle/DependencyInjection/Compiler/RoutingPass.php
Expand Up @@ -6,6 +6,7 @@
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/

namespace eZ\Bundle\EzPublishLegacyBundle\DependencyInjection\Compiler;

use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
Expand Down
1 change: 1 addition & 0 deletions bundle/DependencyInjection/Compiler/TwigPass.php
Expand Up @@ -6,6 +6,7 @@
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/

namespace eZ\Bundle\EzPublishLegacyBundle\DependencyInjection\Compiler;

use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
Expand Down
1 change: 1 addition & 0 deletions bundle/DependencyInjection/Configuration.php
Expand Up @@ -6,6 +6,7 @@
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/

namespace eZ\Bundle\EzPublishLegacyBundle\DependencyInjection;

use Symfony\Component\Config\Definition\Builder\NodeBuilder;
Expand Down
Expand Up @@ -6,6 +6,7 @@
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/

namespace eZ\Bundle\EzPublishLegacyBundle\DependencyInjection\Configuration;

use eZ\Publish\Core\MVC\ConfigResolverInterface;
Expand Down Expand Up @@ -101,7 +102,7 @@ function () use ($iniGroup, $paramName, $namespace, $scope) {
/**
* Returns values for $groupName, in $namespace.
*
* @param string $groupName String containing an INI group name.
* @param string $groupName string containing an INI group name
* @param string $namespace The legacy INI file name, without the suffix (i.e. without ".ini").
* @param string $scope A specific siteaccess to look into. Defaults to the current siteaccess.
*
Expand Down Expand Up @@ -137,8 +138,8 @@ function () use ($groupName, $namespace, $scope) {
* Checks if $paramName exists in $namespace.
*
* @param string $paramName
* @param string $namespace If null, the default namespace should be used.
* @param string $scope The scope you need $paramName value for.
* @param string $namespace if null, the default namespace should be used
* @param string $scope the scope you need $paramName value for
*
* @return bool
*/
Expand Down
1 change: 1 addition & 0 deletions bundle/DependencyInjection/EzPublishLegacyExtension.php
Expand Up @@ -6,6 +6,7 @@
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/

namespace eZ\Bundle\EzPublishLegacyBundle\DependencyInjection;

use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\ConfigurationProcessor;
Expand Down
1 change: 1 addition & 0 deletions bundle/DependencyInjection/Security/SSOFactory.php
Expand Up @@ -6,6 +6,7 @@
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/

namespace eZ\Bundle\EzPublishLegacyBundle\DependencyInjection\Security;

use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\AbstractFactory;
Expand Down
1 change: 1 addition & 0 deletions bundle/EventListener/ConfigScopeListener.php
Expand Up @@ -6,6 +6,7 @@
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/

namespace eZ\Bundle\EzPublishLegacyBundle\EventListener;

use eZ\Publish\Core\MVC\Legacy\Kernel\Loader;
Expand Down
1 change: 1 addition & 0 deletions bundle/EventListener/CsrfTokenResponseListener.php
Expand Up @@ -6,6 +6,7 @@
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/

namespace eZ\Bundle\EzPublishLegacyBundle\EventListener;

use eZ\Bundle\EzPublishLegacyBundle\LegacyResponse;
Expand Down
1 change: 1 addition & 0 deletions bundle/EventListener/IndexRequestListener.php
Expand Up @@ -6,6 +6,7 @@
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/

namespace eZ\Bundle\EzPublishLegacyBundle\EventListener;

use eZ\Bundle\EzPublishCoreBundle\EventListener\IndexRequestListener as CoreIndexListener;
Expand Down
1 change: 1 addition & 0 deletions bundle/EventListener/LegacyKernelListener.php
Expand Up @@ -6,6 +6,7 @@
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/

namespace eZ\Bundle\EzPublishLegacyBundle\EventListener;

use eZ\Publish\Core\MVC\Legacy\LegacyEvents;
Expand Down
1 change: 1 addition & 0 deletions bundle/EventListener/RequestListener.php
Expand Up @@ -6,6 +6,7 @@
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/

namespace eZ\Bundle\EzPublishLegacyBundle\EventListener;

use eZ\Publish\API\Repository\Exceptions\NotFoundException;
Expand Down
1 change: 1 addition & 0 deletions bundle/EventListener/RestListener.php
Expand Up @@ -6,6 +6,7 @@
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/

namespace eZ\Bundle\EzPublishLegacyBundle\EventListener;

use Symfony\Component\EventDispatcher\EventSubscriberInterface;
Expand Down
1 change: 1 addition & 0 deletions bundle/EventListener/SetupListener.php
Expand Up @@ -5,6 +5,7 @@
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/

namespace eZ\Bundle\EzPublishLegacyBundle\EventListener;

use Symfony\Component\EventDispatcher\EventSubscriberInterface;
Expand Down
1 change: 1 addition & 0 deletions bundle/EzPublishLegacyBundle.php
Expand Up @@ -6,6 +6,7 @@
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/

namespace eZ\Bundle\EzPublishLegacyBundle;

use eZ\Bundle\EzPublishLegacyBundle\DependencyInjection\Compiler\RememberMeListenerPass;
Expand Down
1 change: 1 addition & 0 deletions bundle/Features/Context/Admin/Context.php
Expand Up @@ -6,6 +6,7 @@
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/

namespace eZ\Bundle\EzPublishLegacyBundle\Features\Context\Admin;

use eZ\Bundle\EzPublishLegacyBundle\Features\Context\Legacy;
Expand Down

0 comments on commit 1b060ab

Please sign in to comment.