Skip to content

Commit

Permalink
Update php-cs-fixer (2.14.2 is not compatible with Composer 2) (#180)
Browse files Browse the repository at this point in the history
* Update php-cs-fixer (2.14.2 is not compatible with Composer 2)
* Fix CS
  • Loading branch information
blankse authored Nov 10, 2020
1 parent 72ae58e commit a89e0e0
Show file tree
Hide file tree
Showing 183 changed files with 212 additions and 558 deletions.
27 changes: 2 additions & 25 deletions .php_cs
Original file line number Diff line number Diff line change
@@ -1,28 +1,6 @@
<?php
return PhpCsFixer\Config::create()
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'concat_space' => ['spacing' => 'one'],
'simplified_null_return' => false,
'phpdoc_align' => false,
'phpdoc_separation' => false,
'phpdoc_to_comment' => false,
'cast_spaces' => false,
'blank_line_after_opening_tag' => false,
'single_blank_line_before_namespace' => false,
'phpdoc_annotation_without_dot' => false,
'phpdoc_no_alias_tag' => false,
'space_after_semicolon' => false,
'yoda_style' => false,
'no_break_comment' => false,

// 2019 style updates with cs-fixer 2.14, all above are in sync with kernel
'@PHPUnit57Migration:risky' => true,
'array_syntax' => ['syntax' => 'short'],
'static_lambda' => true,
])
->setRiskyAllowed(true)
return EzSystems\EzPlatformCodeStyle\PhpCsFixer\EzPlatformInternalConfigFactory::build()
->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__)
Expand All @@ -32,5 +10,4 @@ return PhpCsFixer\Config::create()
'bundle/Resources/init_ini',
])
->files()->name('*.php')
)
;
);
6 changes: 1 addition & 5 deletions bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
<?php

/**
* File containing the bootstrapping of eZ Publish API for unit test use.
*
* Setups class loading.
*
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/
use eZ\Publish\Core\MVC\Legacy\Kernel as LegacyKernel;
use eZ\Publish\Core\MVC\Legacy\Kernel\CLIHandler as LegacyKernelCLI;
Expand Down
4 changes: 1 addition & 3 deletions bundle/Cache/LegacyCachePurger.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<?php

/**
* File containing the LegacyCachePurger class.
*
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/
namespace eZ\Bundle\EzPublishLegacyBundle\Cache;

Expand Down
8 changes: 5 additions & 3 deletions bundle/Cache/PersistenceCachePurger.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<?php

/**
* File containing the PersistenceCachePurger class.
*
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/
namespace eZ\Bundle\EzPublishLegacyBundle\Cache;

Expand Down Expand Up @@ -179,6 +177,7 @@ public function contentVersion($contentId, $versionNo)
* Also used when clearing content type meta data cache in admin cache interface (no id).
*
* @param int|null $id Purges all contentType cache if null
*
* @throws \eZ\Publish\Core\Base\Exceptions\InvalidArgumentType On invalid $id type
*/
public function contentType($id = null)
Expand All @@ -202,6 +201,7 @@ public function contentType($id = null)
* In legacy kernel used when editing/removing content type group, so there is always an id.
*
* @param int $id
*
* @throws \eZ\Publish\Core\Base\Exceptions\InvalidArgumentType On invalid $id type
*/
public function contentTypeGroup($id)
Expand All @@ -224,6 +224,7 @@ public function contentTypeGroup($id)
* In legacy kernel used when editing section, so there is always an id.
*
* @param int $id
*
* @throws \eZ\Publish\Core\Base\Exceptions\InvalidArgumentType On invalid $id type
*/
public function section($id)
Expand Down Expand Up @@ -283,6 +284,7 @@ public function stateAssign($contentId)
* In legacy kernel used when clearing meta info cache on users in eZUser, never with id.
*
* @param int|null $id Purges all users cache if null
*
* @throws \eZ\Publish\Core\Base\Exceptions\InvalidArgumentType On invalid $id type
*/
public function user($id = null)
Expand Down
5 changes: 3 additions & 2 deletions bundle/Cache/Switchable.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php

/**
* This file is part of the eZ Publish Kernel package.
*
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
Expand All @@ -24,6 +23,7 @@ public function switchOff()

/**
* Checks if the switch is off.
*
* @return bool
*/
public function isSwitchedOn()
Expand All @@ -33,6 +33,7 @@ public function isSwitchedOn()

/**
* Checks if the switch is off.
*
* @return bool
*/
public function isSwitchedOff()
Expand Down
3 changes: 1 addition & 2 deletions bundle/Cache/SwitchableHttpCachePurger.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php

/**
* This file is part of the EzPublishLegacyBridge package.
*
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
Expand Down
4 changes: 1 addition & 3 deletions bundle/Collector/LegacyTemplatesCollector.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<?php

/**
* This file is part of the eZ Publish Kernel package.
*
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/
namespace eZ\Bundle\EzPublishLegacyBundle\Collector;

Expand Down
4 changes: 1 addition & 3 deletions bundle/Collector/TemplateDebugInfo.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<?php

/**
* This file is part of the eZ Publish Kernel package.
*
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/
namespace eZ\Bundle\EzPublishLegacyBundle\Collector;

Expand Down
6 changes: 3 additions & 3 deletions bundle/Command/LegacyBundleInstallCommand.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<?php

/**
* File containing the LegacyBundleInstallCommand class.
*
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/
namespace eZ\Bundle\EzPublishLegacyBundle\Command;

Expand Down Expand Up @@ -65,6 +63,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
* @param OutputInterface $output
*
* @throws \RuntimeException If a target link/directory exists and $options[force] isn't set to true
*
* @return string The resulting link/directory
*/
protected function linkLegacyExtension($extensionPath, array $options = [], OutputInterface $output)
Expand Down Expand Up @@ -135,6 +134,7 @@ protected function linkLegacyExtension($extensionPath, array $options = [], Outp

/**
* Removes the cwd from $path.
*
* @param string $path
*/
private function removeCwd($path)
Expand Down
4 changes: 1 addition & 3 deletions bundle/Command/LegacyConfigurationCommand.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<?php

/**
* File containing the LegacyConfigurationCommand class.
*
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/
namespace eZ\Bundle\EzPublishLegacyBundle\Command;

Expand Down
4 changes: 1 addition & 3 deletions bundle/Command/LegacyEmbedScriptCommand.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<?php

/**
* File containing the LegacyEmbedScriptCommand class.
*
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/
namespace eZ\Bundle\EzPublishLegacyBundle\Command;

Expand Down
3 changes: 1 addition & 2 deletions bundle/Command/LegacyInitCommand.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php

/**
* File containing the LegacyInitCommand class.
*
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
Expand Down
3 changes: 1 addition & 2 deletions bundle/Command/LegacySrcSymlinkCommand.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php

/**
* File containing the LegacySrcSymlinkCommand class.
*
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
Expand Down
4 changes: 1 addition & 3 deletions bundle/Command/LegacyWrapperInstallCommand.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<?php

/**
* File containing the LegacyWrapperInstallCommand class.
*
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/
namespace eZ\Bundle\EzPublishLegacyBundle\Command;

Expand Down
4 changes: 1 addition & 3 deletions bundle/Composer/ScriptHandler.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<?php

/**
* File containing the ScriptHandler class.
*
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/
namespace eZ\Bundle\EzPublishLegacyBundle\Composer;

Expand Down
4 changes: 1 addition & 3 deletions bundle/Controller.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<?php

/**
* This file is part of the eZ Publish Kernel package.
*
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/
namespace eZ\Bundle\EzPublishLegacyBundle;

Expand Down
4 changes: 1 addition & 3 deletions bundle/Controller/LegacyKernelController.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<?php

/**
* File containing the LegacyKernelController class.
*
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/
namespace eZ\Bundle\EzPublishLegacyBundle\Controller;

Expand Down
4 changes: 1 addition & 3 deletions bundle/Controller/LegacyRestController.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<?php

/**
* File containing the LegacyRestController class.
*
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/
namespace eZ\Bundle\EzPublishLegacyBundle\Controller;

Expand Down
4 changes: 1 addition & 3 deletions bundle/Controller/LegacySetupController.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<?php

/**
* File containing the LegacySetupController class.
*
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/
namespace eZ\Bundle\EzPublishLegacyBundle\Controller;

Expand Down
4 changes: 1 addition & 3 deletions bundle/Controller/LegacyTreeMenuController.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<?php

/**
* File containing the LegacyTreeMenuController class.
*
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/
namespace eZ\Bundle\EzPublishLegacyBundle\Controller;

Expand Down
4 changes: 1 addition & 3 deletions bundle/Controller/PreviewController.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<?php

/**
* File containing the PreviewController class.
*
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/
namespace eZ\Bundle\EzPublishLegacyBundle\Controller;

Expand Down
4 changes: 1 addition & 3 deletions bundle/Controller/WebsiteToolbarController.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<?php

/**
* File containing the WebsiteToolbarController class.
*
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/
namespace eZ\Bundle\EzPublishLegacyBundle\Controller;

Expand Down
4 changes: 1 addition & 3 deletions bundle/DependencyInjection/Compiler/LegacyBundlesPass.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<?php

/**
* File containing the LegacyBundlesPass class.
*
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/
namespace eZ\Bundle\EzPublishLegacyBundle\DependencyInjection\Compiler;

Expand Down
4 changes: 1 addition & 3 deletions bundle/DependencyInjection/Compiler/LegacyPass.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<?php

/**
* File containing the LegacyPass class.
*
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/
namespace eZ\Bundle\EzPublishLegacyBundle\DependencyInjection\Compiler;

Expand Down
4 changes: 1 addition & 3 deletions bundle/DependencyInjection/Compiler/LegacySessionPass.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<?php

/**
* This file is part of the eZ Publish LegacyBridge package.
*
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/
namespace eZ\Bundle\EzPublishLegacyBundle\DependencyInjection\Compiler;

Expand Down
4 changes: 1 addition & 3 deletions bundle/DependencyInjection/Compiler/PageServicePass.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<?php

/**
* This file is part of the eZ LegacyBridge package.
*
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/
namespace eZ\Bundle\EzPublishLegacyBundle\DependencyInjection\Compiler;

Expand Down
Loading

0 comments on commit a89e0e0

Please sign in to comment.