Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IBX-8121: Fixed code style for 5.0 #48

Merged
merged 1 commit into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,12 @@
"toflar/psr6-symfony-http-cache-store": "^2.2 || ^3.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.0",
"ibexa/ci-scripts": "^0.2@dev",
"ibexa/code-style": "^1.0",
"ibexa/code-style": "~2.0.0",
"ibexa/doctrine-schema": "~5.0.x-dev",
"matthiasnoback/symfony-dependency-injection-test": "^4.3",
"phpspec/phpspec": "^7.1",
"phpunit/phpunit": "^8.5",
"phpunit/phpunit": "^9.6",
"symfony/phpunit-bridge": "^5.1"
},
"autoload": {
Expand Down Expand Up @@ -70,6 +69,7 @@
}
},
"config": {
"sort-packages": true
"sort-packages": true,
"allow-plugins": false
}
}
1 change: 1 addition & 0 deletions src/bundle/AppCache.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\HttpCache;

use FOS\HttpCache\SymfonyCache\CacheInvalidation;
Expand Down
1 change: 1 addition & 0 deletions src/bundle/Controller/InvalidateTokenController.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\HttpCache\Controller;

use FOS\HttpCache\ResponseTagger;
Expand Down
1 change: 1 addition & 0 deletions src/bundle/DependencyInjection/Compiler/DriverPass.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\HttpCache\DependencyInjection\Compiler;

use Ibexa\Contracts\HttpCache\Handler\ContentTagInterface;
Expand Down
1 change: 1 addition & 0 deletions src/bundle/DependencyInjection/Compiler/KernelPass.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\HttpCache\DependencyInjection\Compiler;

use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
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\HttpCache\DependencyInjection\Compiler;

use Ibexa\HttpCache\ResponseTagger\Delegator\DispatcherTagger;
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\HttpCache\DependencyInjection\Compiler;

use InvalidArgumentException;
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\HttpCache\DependencyInjection\ConfigResolver;

use Ibexa\Bundle\Core\DependencyInjection\Configuration\ParserInterface;
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\HttpCache\DependencyInjection;

use Symfony\Component\Config\Definition\Builder\TreeBuilder;
Expand Down
1 change: 1 addition & 0 deletions src/bundle/DependencyInjection/IbexaHttpCacheExtension.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\HttpCache\DependencyInjection;

use FOS\HttpCache\TagHeaderFormatter\TagHeaderFormatter;
Expand Down
1 change: 1 addition & 0 deletions src/bundle/IbexaHttpCacheBundle.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\HttpCache;

use Ibexa\Bundle\HttpCache\DependencyInjection\Compiler\DriverPass;
Expand Down
1 change: 1 addition & 0 deletions src/contracts/Handler/ContentTagInterface.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\HttpCache\Handler;

interface ContentTagInterface
Expand Down
1 change: 1 addition & 0 deletions src/contracts/PurgeClient/PurgeClientInterface.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\HttpCache\PurgeClient;

/**
Expand Down
1 change: 1 addition & 0 deletions src/contracts/ResponseTagger/ResponseTagger.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\HttpCache\ResponseTagger;

/**
Expand Down
1 change: 1 addition & 0 deletions src/lib/ContextProvider/RoleIdentify.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\HttpCache\ContextProvider;

use FOS\HttpCache\UserContext\ContextProvider;
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\HttpCache\EventListener;

use Symfony\Component\EventDispatcher\EventSubscriberInterface;
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\HttpCache\EventSubscriber;

use Ibexa\Core\MVC\Exception\HiddenLocationException;
Expand Down
1 change: 1 addition & 0 deletions src/lib/EventSubscriber/HttpCacheResponseSubscriber.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\HttpCache\EventSubscriber;

use Ibexa\Contracts\HttpCache\ResponseTagger\ResponseTagger;
Expand Down
1 change: 1 addition & 0 deletions src/lib/EventSubscriber/RestKernelViewSubscriber.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\HttpCache\EventSubscriber;

use FOS\HttpCache\ResponseTagger;
Expand Down
1 change: 1 addition & 0 deletions src/lib/EventSubscriber/UserContextSubscriber.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\HttpCache\EventSubscriber;

use FOS\HttpCache\TagHeaderFormatter\TagHeaderFormatter;
Expand Down
1 change: 1 addition & 0 deletions src/lib/EventSubscriber/XLocationIdResponseSubscriber.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\HttpCache\EventSubscriber;

use FOS\HttpCache\ResponseTagger;
Expand Down
1 change: 1 addition & 0 deletions src/lib/Handler/TagHandler.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\HttpCache\Handler;

use FOS\HttpCacheBundle\Http\SymfonyResponseTagger;
Expand Down
1 change: 1 addition & 0 deletions src/lib/Proxy/UserContextListener.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\HttpCache\Proxy;

use FOS\HttpCache\SymfonyCache\UserContextListener as BaseUserContextListener;
Expand Down
1 change: 1 addition & 0 deletions src/lib/PurgeClient/LocalPurgeClient.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\HttpCache\PurgeClient;

use Ibexa\Contracts\HttpCache\PurgeClient\PurgeClientInterface;
Expand Down
1 change: 1 addition & 0 deletions src/lib/PurgeClient/RepositoryPrefixDecorator.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\HttpCache\PurgeClient;

use Ibexa\Contracts\HttpCache\PurgeClient\PurgeClientInterface;
Expand Down
1 change: 1 addition & 0 deletions src/lib/PurgeClient/VarnishPurgeClient.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\HttpCache\PurgeClient;

use FOS\HttpCacheBundle\CacheManager;
Expand Down
1 change: 1 addition & 0 deletions src/lib/RepositoryTagPrefix.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\HttpCache;

use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface;
Expand Down
1 change: 1 addition & 0 deletions src/lib/ResponseConfigurator/ResponseCacheConfigurator.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\HttpCache\ResponseConfigurator;

use Symfony\Component\HttpFoundation\Response;
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\HttpCache\ResponseTagger\Delegator;

use Ibexa\Contracts\Core\Repository\Values\Content\Content;
Expand Down
1 change: 1 addition & 0 deletions src/lib/ResponseTagger/Delegator/DispatcherTagger.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\HttpCache\ResponseTagger\Delegator;

use Ibexa\Contracts\HttpCache\ResponseTagger\ResponseTagger;
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\HttpCache\ResponseTagger\Delegator;

use Ibexa\Contracts\Core\Repository\Values\Content\Location;
Expand Down
1 change: 1 addition & 0 deletions src/lib/ResponseTagger/Value/AbstractValueTagger.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\HttpCache\ResponseTagger\Value;

use FOS\HttpCache\ResponseTagger as FosResponseTagger;
Expand Down
1 change: 1 addition & 0 deletions src/lib/ResponseTagger/Value/ContentInfoTagger.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\HttpCache\ResponseTagger\Value;

use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo;
Expand Down
1 change: 1 addition & 0 deletions src/lib/ResponseTagger/Value/LocationTagger.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\HttpCache\ResponseTagger\Value;

use Ibexa\Contracts\Core\Repository\Values\Content\Location;
Expand Down
1 change: 1 addition & 0 deletions src/lib/Twig/ContentTaggingExtension.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\HttpCache\Twig;

use Ibexa\Contracts\Core\Repository\Values\Content\Location;
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\Tests\Bundle\HttpCache\EventListener;

use Ibexa\HttpCache\EventListener\ConditionallyRemoveVaryHeaderListener;
Expand Down
19 changes: 10 additions & 9 deletions tests/lib/ContextProvider/RoleIdentifyTest.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\HttpCache\ContextProvider;

use FOS\HttpCache\UserContext\UserContext;
Expand Down Expand Up @@ -46,7 +47,7 @@ protected function setUp(): void
$this->roleServiceMock = $this->createMock(RoleService::class);

$this->repositoryMock
->expects($this->any())
->expects(self::any())
->method('getRoleService')
->willReturn($this->roleServiceMock);
}
Expand All @@ -63,7 +64,7 @@ public function testSetIdentity()
->willReturn($userReference);

$this->repositoryMock
->expects($this->any())
->expects(self::any())
->method('getPermissionResolver')
->willReturn($permissionResolver);

Expand Down Expand Up @@ -118,25 +119,25 @@ public function testSetIdentity()
];

$this->roleServiceMock
->expects($this->once())
->expects(self::once())
->method('getRoleAssignmentsForUser')
->with($user, true)
->willReturn($returnedRoleAssignments);

$this->assertSame([], $userContext->getParameters());
self::assertSame([], $userContext->getParameters());
$contextProvider = new RoleIdentify(
$this->repositoryMock,
$permissionResolver,
$userService
);
$contextProvider->updateUserContext($userContext);
$userContextParams = $userContext->getParameters();
$this->assertArrayHasKey('roleIdList', $userContextParams);
$this->assertSame([$roleId1, $roleId2, $roleId3], $userContextParams['roleIdList']);
$this->assertArrayHasKey('roleLimitationList', $userContextParams);
self::assertArrayHasKey('roleIdList', $userContextParams);
self::assertSame([$roleId1, $roleId2, $roleId3], $userContextParams['roleIdList']);
self::assertArrayHasKey('roleLimitationList', $userContextParams);
$limitationIdentifierForRole2 = \get_class($limitationForRole2);
$limitationIdentifierForRole3 = \get_class($limitationForRole3);
$this->assertSame(
self::assertSame(
[
"$roleId2-$limitationIdentifierForRole2" => ['/1/2', '/1/2/43'],
"$roleId3-$limitationIdentifierForRole3" => ['foo', 'bar'],
Expand Down Expand Up @@ -168,7 +169,7 @@ private function generateLimitationMock(array $properties = [])
->setConstructorArgs([$properties])
->getMockForAbstractClass();
$limitationMock
->expects($this->any())
->expects(self::any())
->method('getIdentifier')
->willReturn(\get_class($limitationMock));

Expand Down
3 changes: 2 additions & 1 deletion tests/lib/PurgeClient/LocalPurgeClientTest.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\HttpCache\PurgeClient;

use Ibexa\HttpCache\PurgeClient\LocalPurgeClient;
Expand Down Expand Up @@ -31,7 +32,7 @@ static function ($id) {
);

$this->store
->expects($this->once())
->expects(self::once())
->method('invalidateTags')
->with($keys);

Expand Down
Loading
Loading