Skip to content

Commit

Permalink
IBX-8121: Fixed code style for 5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Steveb-p authored May 7, 2024
1 parent c219f0b commit 3550450
Show file tree
Hide file tree
Showing 28 changed files with 38 additions and 28 deletions.
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@
"twig/twig": "^3.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.0",
"ibexa/code-style": "^1.0",
"ibexa/code-style": "~2.0.0",
"ibexa/doctrine-schema": "~5.0.x-dev",
"mikey179/vfsstream": "^1.6",
"phpunit/phpunit": "^8.1"
"phpunit/phpunit": "^9.6"
},
"autoload": {
"psr-4": {
Expand Down
23 changes: 4 additions & 19 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,14 @@

<!-- http://www.phpunit.de/manual/current/en/appendixes.configuration.html -->
<phpunit
backupGlobals="false"
backupStaticAttributes="false"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd"
bootstrap="tests/bootstrap.php"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
colors="false"
>
>

<testsuites>
<testsuite name="IbexaDesignEngine tests suite">
<directory suffix="Test.php">./tests</directory>
<directory>./tests</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory>./</directory>
<exclude>
<directory>tests/</directory>
<directory>vendor/</directory>
</exclude>
</whitelist>
</filter>

</phpunit>
1 change: 1 addition & 0 deletions src/bundle/DataCollector/TwigDataCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/

namespace Ibexa\Bundle\DesignEngine\DataCollector;

use Ibexa\DesignEngine\Templating\TemplatePathRegistryInterface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/

namespace Ibexa\Bundle\DesignEngine\DependencyInjection\Compiler;

use Ibexa\DesignEngine\Asset\AssetPathProvisionerInterface;
Expand Down
1 change: 1 addition & 0 deletions src/bundle/DependencyInjection/Compiler/AssetThemePass.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/

namespace Ibexa\Bundle\DesignEngine\DependencyInjection\Compiler;

use Ibexa\Contracts\DesignEngine\DesignAwareInterface;
Expand Down
1 change: 1 addition & 0 deletions src/bundle/DependencyInjection/Compiler/TwigThemePass.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/

namespace Ibexa\Bundle\DesignEngine\DependencyInjection\Compiler;

use Ibexa\Bundle\DesignEngine\DataCollector\TwigDataCollector;
Expand Down
1 change: 1 addition & 0 deletions src/bundle/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/

namespace Ibexa\Bundle\DesignEngine\DependencyInjection;

use Ibexa\Bundle\Core\DependencyInjection\Configuration\SiteAccessAware\Configuration as SiteAccessConfiguration;
Expand Down
1 change: 1 addition & 0 deletions src/bundle/DependencyInjection/DesignConfigParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/

namespace Ibexa\Bundle\DesignEngine\DependencyInjection;

use Ibexa\Bundle\Core\DependencyInjection\Configuration\ParserInterface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/

namespace Ibexa\Bundle\DesignEngine\DependencyInjection;

use Ibexa\Bundle\Core\DependencyInjection\Configuration\SiteAccessAware\ConfigurationProcessor;
Expand Down
1 change: 1 addition & 0 deletions src/bundle/IbexaDesignEngineBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/

namespace Ibexa\Bundle\DesignEngine;

use Ibexa\Bundle\DesignEngine\DependencyInjection\Compiler\AssetPathResolutionPass;
Expand Down
1 change: 1 addition & 0 deletions src/contracts/DesignAwareInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/

namespace Ibexa\Contracts\DesignEngine;

interface DesignAwareInterface
Expand Down
1 change: 1 addition & 0 deletions src/lib/Asset/AssetPathProvisionerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/

namespace Ibexa\DesignEngine\Asset;

interface AssetPathProvisionerInterface
Expand Down
1 change: 1 addition & 0 deletions src/lib/Asset/AssetPathResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/

namespace Ibexa\DesignEngine\Asset;

use Ibexa\DesignEngine\Exception\InvalidDesignException;
Expand Down
1 change: 1 addition & 0 deletions src/lib/Asset/AssetPathResolverInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/

namespace Ibexa\DesignEngine\Asset;

/**
Expand Down
1 change: 1 addition & 0 deletions src/lib/Asset/ProvisionedPathResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/

namespace Ibexa\DesignEngine\Asset;

use Symfony\Component\Finder\Finder;
Expand Down
1 change: 1 addition & 0 deletions src/lib/Asset/ThemePackage.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/

namespace Ibexa\DesignEngine\Asset;

use Ibexa\Contracts\DesignEngine\DesignAwareInterface;
Expand Down
1 change: 1 addition & 0 deletions src/lib/DesignAwareTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/

namespace Ibexa\DesignEngine;

use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface;
Expand Down
1 change: 1 addition & 0 deletions src/lib/Exception/InvalidDesignException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/

namespace Ibexa\DesignEngine\Exception;

use InvalidArgumentException;
Expand Down
1 change: 1 addition & 0 deletions src/lib/Templating/TemplateNameResolverInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/

namespace Ibexa\DesignEngine\Templating;

use Ibexa\Contracts\DesignEngine\DesignAwareInterface;
Expand Down
1 change: 1 addition & 0 deletions src/lib/Templating/TemplatePathRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/

namespace Ibexa\DesignEngine\Templating;

use Serializable;
Expand Down
1 change: 1 addition & 0 deletions src/lib/Templating/TemplatePathRegistryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/

namespace Ibexa\DesignEngine\Templating;

/**
Expand Down
1 change: 1 addition & 0 deletions src/lib/Templating/ThemeTemplateNameResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/

namespace Ibexa\DesignEngine\Templating;

use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface;
Expand Down
1 change: 1 addition & 0 deletions src/lib/Templating/Twig/TwigThemeLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/

namespace Ibexa\DesignEngine\Templating\Twig;

use Ibexa\DesignEngine\Templating\TemplateNameResolverInterface;
Expand Down
3 changes: 2 additions & 1 deletion tests/lib/Asset/AssetPathResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/

namespace Ibexa\Tests\DesignEngine\Asset;

use Ibexa\DesignEngine\Asset\AssetPathResolver;
Expand All @@ -18,7 +19,7 @@ public function testResolveAssetPathFail()
{
$logger = $this->createMock(LoggerInterface::class);
$logger
->expects($this->once())
->expects(self::once())
->method('warning');

$resolver = new AssetPathResolver(['foo' => []], __DIR__, $logger);
Expand Down
3 changes: 2 additions & 1 deletion tests/lib/Asset/ProvisionedPathResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/

namespace Ibexa\Tests\DesignEngine\Asset;

use Ibexa\DesignEngine\Asset\AssetPathResolver;
Expand Down Expand Up @@ -37,7 +38,7 @@ public function testResolvePathNotProvisioned()
$design = 'foo';
$expected = 'some/path/images/some_image.jpg';
$this->innerResolver
->expects($this->once())
->expects(self::once())
->method('resolveAssetPath')
->with($assetLogicalPath, $design)
->willReturn($expected);
Expand Down
9 changes: 5 additions & 4 deletions tests/lib/Asset/ThemePackageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/

namespace Ibexa\Tests\DesignEngine\Asset;

use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface;
Expand Down Expand Up @@ -45,12 +46,12 @@ public function testGetUrl()
$currentDesign = 'foo';

$this->assetPathResolver
->expects($this->once())
->expects(self::once())
->method('resolveAssetPath')
->with($assetPath, $currentDesign)
->willReturn($fullAssetPath);
$this->innerPackage
->expects($this->once())
->expects(self::once())
->method('getUrl')
->with($fullAssetPath)
->willReturn("/$fullAssetPath");
Expand All @@ -71,13 +72,13 @@ public function testGetVersion()
$currentDesign = 'foo';

$this->assetPathResolver
->expects($this->once())
->expects(self::once())
->method('resolveAssetPath')
->with($assetPath, $currentDesign)
->willReturn($fullAssetPath);
$version = 'v1';
$this->innerPackage
->expects($this->once())
->expects(self::once())
->method('getVersion')
->with($fullAssetPath)
->willReturn($version);
Expand Down
1 change: 1 addition & 0 deletions tests/lib/Templating/TemplatePathRegistryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/

namespace Ibexa\Tests\DesignEngine\Templating;

use Ibexa\DesignEngine\Templating\TemplatePathRegistry;
Expand Down
1 change: 1 addition & 0 deletions tests/lib/Templating/ThemeTemplateNameResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/

namespace Ibexa\Tests\DesignEngine\Templating;

use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface;
Expand Down

0 comments on commit 3550450

Please sign in to comment.