Skip to content

Commit ef68e91

Browse files
author
roadiz-ci
committed
Merge branch hotfix/2.7.39
1 parent 89a2ba6 commit ef68e91

7 files changed

Lines changed: 13 additions & 103 deletions

File tree

.github/workflows/run-test.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright © 2025 Ambroise Maupate, Julien Blanchet
3+
Copyright © 2026 Ambroise Maupate, Julien Blanchet
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
66

phpstan.neon

Lines changed: 0 additions & 39 deletions
This file was deleted.

src/Controller/AbstractSingleNodeTypeController.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,7 @@ protected function getEditRouteName(): string
186186

187187
protected function getShadowContainer(): Node
188188
{
189-
if (null === $this->shadowContainer) {
190-
$this->shadowContainer = $this->nodeRepository->findOneByNodeName($this->getShadowRootNodeName()) ?? throw new \RuntimeException(sprintf('No shadow root node "%s" found.', $this->getShadowRootNodeName()));
191-
}
189+
$this->shadowContainer ??= $this->nodeRepository->findOneByNodeName($this->getShadowRootNodeName()) ?? throw new \RuntimeException(sprintf('No shadow root node "%s" found.', $this->getShadowRootNodeName()));
192190

193191
return $this->shadowContainer;
194192
}

src/Controller/EntityThumbnail/EntityThumbnailController.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,7 @@ public function __invoke(Request $request): JsonResponse
5656
// Get thumbnail data - provider is responsible for fetching entity
5757
$thumbnail = $this->entityThumbnailProvider->getThumbnail($entityClass, $entityId);
5858

59-
if (null === $thumbnail) {
60-
$thumbnail = new EntityThumbnail();
61-
}
59+
$thumbnail ??= new EntityThumbnail();
6260

6361
$response = new JsonResponse(
6462
$this->serializer->serialize($thumbnail, 'json'),

src/RozierServiceRegistry.php

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -58,31 +58,25 @@ public function getAdminImage(): ?DocumentInterface
5858

5959
public function getSettingGroups(): array
6060
{
61-
if (null === $this->settingGroups) {
62-
$this->settingGroups = $this->managerRegistry->getRepository(SettingGroup::class)
63-
->findBy(
64-
['inMenu' => true],
65-
['name' => 'ASC']
66-
);
67-
}
61+
$this->settingGroups ??= $this->managerRegistry->getRepository(SettingGroup::class)
62+
->findBy(
63+
['inMenu' => true],
64+
['name' => 'ASC']
65+
);
6866

6967
return $this->settingGroups;
7068
}
7169

7270
public function getTagTree(): TagTreeWidget
7371
{
74-
if (null === $this->tagTree) {
75-
$this->tagTree = $this->treeWidgetFactory->createTagTree();
76-
}
72+
$this->tagTree ??= $this->treeWidgetFactory->createTagTree();
7773

7874
return $this->tagTree;
7975
}
8076

8177
public function getFolderTree(): FolderTreeWidget
8278
{
83-
if (null === $this->folderTree) {
84-
$this->folderTree = $this->treeWidgetFactory->createFolderTree();
85-
}
79+
$this->folderTree ??= $this->treeWidgetFactory->createFolderTree();
8680

8781
return $this->folderTree;
8882
}

src/Widget/FolderTreeWidget.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,9 @@ public function getRootFolder(): ?Folder
4242
*/
4343
public function getFolders(): iterable
4444
{
45-
if (null === $this->folders) {
46-
$this->folders = $this->getManagerRegistry()
47-
->getRepository(Folder::class)
48-
->findByParentAndTranslation($this->getRootFolder(), $this->getTranslation());
49-
}
45+
$this->folders ??= $this->getManagerRegistry()
46+
->getRepository(Folder::class)
47+
->findByParentAndTranslation($this->getRootFolder(), $this->getTranslation());
5048

5149
return $this->folders;
5250
}

0 commit comments

Comments
 (0)