Skip to content

Removed obsolete parentheses around the new calls #2978

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

Merged
merged 3 commits into from
Jun 21, 2025
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
84 changes: 52 additions & 32 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docker-entrypoint-dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export XDEBUG_SESSION=PHPSTORM
COMPOSER_MEMORY_LIMIT=-1 composer install --optimize-autoloader

# Step 3
#composer audit
composer audit

# Step 4
make generate-jwt-keys
Expand Down
2 changes: 1 addition & 1 deletion src/Command/Utils/CheckDependencies.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
private function getNamespaceDirectories(): array
{
// Find all main namespace directories under 'tools' directory
$finder = (new Finder())
$finder = new Finder()
->depth(1)
->ignoreDotFiles(true)
->directories()
Expand Down
2 changes: 1 addition & 1 deletion src/EventSubscriber/JWTCreatedSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ private function setLocalizationData(array &$payload, UserInterface $user): void
private function setExpiration(array &$payload): void
{
// Set new exp value for JWT
$payload['exp'] = (new DateTime('+1 day', new DateTimeZone('UTC')))->getTimestamp();
$payload['exp'] = new DateTime('+1 day', new DateTimeZone('UTC'))->getTimestamp();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Repository/HealthzRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function create(): Entity
public function cleanup(): int
{
// Determine date
$date = (new DateTimeImmutable(timezone: new DateTimeZone('UTC')))
$date = new DateTimeImmutable(timezone: new DateTimeZone('UTC'))
->sub(new DateInterval('P7D'));

// Create query builder
Expand Down
2 changes: 1 addition & 1 deletion src/Repository/LogRequestRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function __construct(
public function cleanHistory(): int
{
// Determine date
$date = (new DateTimeImmutable(timezone: new DateTimeZone('UTC')))
$date = new DateTimeImmutable(timezone: new DateTimeZone('UTC'))
->sub(new DateInterval('P3Y'));

// Create query builder and define delete query
Expand Down
2 changes: 1 addition & 1 deletion src/Repository/Traits/RepositoryMethodsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function findByAdvanced(
*/
RepositoryHelper::resetParameterCount();

$iterator = (new Paginator($queryBuilder, true))->getIterator();
$iterator = new Paginator($queryBuilder, true)->getIterator();

assert($iterator instanceof ArrayIterator);

Expand Down
2 changes: 1 addition & 1 deletion src/Rest/RestResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function getDtoForEntity(
* @var RestDtoInterface $restDto
* @var class-string<RestDtoInterface> $dtoClass
*/
$restDto = (new $dtoClass())
$restDto = new $dtoClass()
->setId($id);

if ($patch === true) {
Expand Down
2 changes: 1 addition & 1 deletion tests/DataFixtures/ORM/LoadApiKeyData.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function getOrder(): int
private function createApiKey(ObjectManager $manager, ?string $role = null): bool
{
// Create new entity
$entity = (new ApiKey())
$entity = new ApiKey()
->setDescription('ApiKey Description: ' . ($role === null ? '' : $this->rolesService->getShort($role)))
->setToken(str_pad($role === null ? '' : $this->rolesService->getShort($role), 40, '_'));

Expand Down
2 changes: 1 addition & 1 deletion tests/DataFixtures/ORM/LoadRoleData.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function getOrder(): int
private function createRole(ObjectManager $manager, string $role): bool
{
// Create new Role entity
$entity = (new Role($role))
$entity = new Role($role)
->setDescription('Description - ' . $role);

// Persist entity
Expand Down
2 changes: 1 addition & 1 deletion tests/DataFixtures/ORM/LoadUserData.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ private function createUser(ObjectManager $manager, ?string $role = null): bool
$suffix = $role === null ? '' : '-' . $this->rolesService->getShort($role);

// Create new entity
$entity = (new User())
$entity = new User()
->setUsername('john' . $suffix)
->setFirstName('John')
->setLastName('Doe')
Expand Down
2 changes: 1 addition & 1 deletion tests/DataFixtures/ORM/LoadUserGroupData.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ private function createUserGroup(ObjectManager $manager, string $role): bool
$roleReference = $this->getReference('Role-' . $this->rolesService->getShort($role), Role::class);

// Create new entity
$entity = (new UserGroup())
$entity = new UserGroup()
->setRole($roleReference)
->setName($this->rolesService->getRoleLabel($role));

Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/Repository/HealthzRepositoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function testThatReadValueMethodReturnsExpectedWithEmptyDatabase(): void
public function testThatCreateValueReturnsExpected(): void
{
self::assertEqualsWithDelta(
(new DateTimeImmutable('now', new DateTimeZone('utc')))->getTimestamp(),
new DateTimeImmutable('now', new DateTimeZone('utc'))->getTimestamp(),
$this->getRepository()->create()->getCreatedAt()->getTimestamp(),
1,
);
Expand Down
Loading
Loading